System.Threading.Semaphore.GetAccessControl Method

Gets the access control security for a named system semaphore.

Syntax

public System.Security.AccessControl.SemaphoreSecurity GetAccessControl ()

Returns

A System.Security.AccessControl.SemaphoreSecurity object that represents the access control security for the named system semaphore.

Remarks

The Semaphore.GetAccessControl method uses the following combination of flags (combined using the bitwise OR operation) to search for permissions: System.Security.AccessControl.AccessControlSections.Access, System.Security.AccessControl.AccessControlSections.Owner, and System.Security.AccessControl.AccessControlSections.Group.

The user must have System.Security.AccessControl.SemaphoreRights.ReadPermissions rights to call this method, and the semaphore must have been opened with System.Security.AccessControl.SemaphoreRights.ReadPermissions rights.

On a local semaphore, access control security is irrelevant. If the System.Threading.Semaphore object does not represent a named system semaphore, this method returns a System.Security.AccessControl.SemaphoreSecurity object that grants all rights to any user.

Requirements

Namespace: System.Threading
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0