This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
PermissionSet Methods
The methods of the PermissionSet class are listed below. For a complete list of PermissionSet class members, see the PermissionSet Members topic.
Public:
AddPermission |
Adds a specified permission to the permission set if it does not exist. If a permission of the same type already exists in the permission set, then the existing permission object is returned and no change is made. |
Assert |
Asserts all permissions of the set. |
ContainsNonCodeAccessPermissions |
[To be supplied.] |
ConvertPermissionSet |
This method is only for internal use. |
Copy |
Creates a copy of the permission set. |
CopyTo |
Copies the permission objects of the set to the indicated location in an Array. |
Demand |
Demands that all callers have permissions of the set. |
DemandImmediate |
Check if immediate caller has permissions of the set. |
Deny |
Denies permissions in the set to effectively not have them granted to the code. A subsequent demand for any permission in the set will fail, even if the permission was granted to the code making the call to Deny. |
Equals (inherited from Object) |
Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality). |
FromXml |
Reconstructs a security object with a given state from an XML encoding. |
GetEnumerator |
Returns an enumerator for the permissions of the set. |
GetHashCode (inherited from Object) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetPermission |
Gets a permission object of the specified type if it exists in the set. |
GetType (inherited from Object) |
Gets the Type of the Object. |
Intersect |
Computes the intersection of two permission sets. |
IsEmpty |
Returns true if the permission set is empty. |
IsSubsetOf |
Determines whether the current permission object is a subset of- that is, specifies a set of operations that is wholly contained by- the specified permission object. |
IsUnrestricted |
Determines whether the permission set is unrestricted. |
PermitOnly |
Permit only the permissions in the set to be effective. Subsequent demand of any permission not in the set will fail, even if the permission was granted to the code. The duration of permit-only is until another permit-only in the same stack frame, or until return from the stack frame. |
RemovePermission |
Removes a permission of a certain type from the set. |
SetPermission |
Sets a permission on the permission set. |
SetUnrestricted |
Sets the permission set to fully restricted or unrestricted state. |
ToString |
System.Security.String representation of the permission set. |
ToXml |
Creates an XML encoding, of the security object and its current state. |
Union |
Computes the union of two permission sets. |
Protected:
Finalize (inherited from Object) |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere. |
MemberwiseClone (inherited from Object) |
Creates a shallow copy of the current Object. |
See Also
PermissionSet Class | System.Security Namespace