System.Security.AccessControl.EventWaitHandleSecurity.Persist C# (CSharp) Method

Persist() private method

private Persist ( SafeWaitHandle handle ) : void
handle SafeWaitHandle
return void
        internal void Persist(SafeWaitHandle handle)
        {
            //
            // Let the underlying ACL API's demand unmanaged code.
            //

            WriteLock();

            try
            {
                AccessControlSections persistSections = GetAccessControlSectionsFromChanges();

                if (persistSections == AccessControlSections.None)
                    return;  // Don't need to persist anything.

                base.Persist(handle, persistSections);

                OwnerModified = GroupModified = AuditRulesModified = AccessRulesModified = false;
            }
            finally
            {
                WriteUnlock();
            }
        }

Usage Example

        [System.Security.SecuritySafeCritical]  // auto-generated
        public static void SetAccessControl(this EventWaitHandle handle, EventWaitHandleSecurity eventSecurity)
        {
            if (eventSecurity == null)
                throw new ArgumentNullException("eventSecurity");
            Contract.EndContractBlock();

            eventSecurity.Persist(handle.GetSafeWaitHandle());
        }
All Usage Examples Of System.Security.AccessControl.EventWaitHandleSecurity::Persist