MutexAccessRule Constructor (IdentityReference, MutexRights, AccessControlType)
Collapse the table of content
Expand the table of content

MutexAccessRule Constructor (IdentityReference, MutexRights, AccessControlType)

 

Initializes a new instance of the MutexAccessRule class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.

Namespace:   System.Security.AccessControl
Assembly:  mscorlib (in mscorlib.dll)

public MutexAccessRule(
	IdentityReference identity,
	MutexRights eventRights,
	AccessControlType type
)

Parameters

identity
Type: System.Security.Principal.IdentityReference

The user or group the rule applies to. Must be of type SecurityIdentifier or a type such as NTAccount that can be converted to type SecurityIdentifier.

eventRights
Type: System.Security.AccessControl.MutexRights

A bitwise combination of MutexRights values specifying the rights allowed or denied.

type
Type: System.Security.AccessControl.AccessControlType

One of the AccessControlType values specifying whether the rights are allowed or denied.

Exception Condition
ArgumentOutOfRangeException

eventRights specifies an invalid value.

-or-

type specifies an invalid value.

ArgumentNullException

identity is null.

-or-

eventRights is zero.

ArgumentException

identity is neither of type SecurityIdentifier nor of a type such as NTAccount that can be converted to type SecurityIdentifier.

To wait on a Mutex (by calling the WaitOne, WaitAny or WaitAll method), a user must have MutexRights.Synchronize access. To release the mutex, by calling the ReleaseMutex method, the user must have MutexRights.Modify access.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft