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();
}
}
[System.Security.SecuritySafeCritical] // auto-generated public static void SetAccessControl(this Mutex mutex, MutexSecurity mutexSecurity) { if (mutexSecurity == null) throw new ArgumentNullException("mutexSecurity"); Contract.EndContractBlock(); mutexSecurity.Persist(mutex.GetSafeWaitHandle()); }