This documentation is archived and is not being maintained.

PermissionSet Members

PermissionSet overview

Public Constructors

public constructorPermissionSet Constructor Overloaded. Initializes a new instance of the PermissionSet class.

Public Properties

public propertyCount Gets the number of permission objects contained in the permission set.
public propertyIsReadOnly Gets a value indicating whether the collection is read-only.
public propertyIsSynchronized Gets a value indicating whether the collection is guaranteed to be thread safe.
public propertySyncRoot Gets the root object of the current collection.

Public Methods

public methodAddPermission Adds a specified permission to the PermissionSet.
public methodAssert Declares that the calling code can access the resource protected by a permission demand through the code that calls this method, even if callers higher in the stack have not been granted permission to access the resource. Using Assert can create security vulnerabilities.
public methodContainsNonCodeAccessPermissions Gets a value indicating whether the PermissionSet contains permissions that are not derived from CodeAccessPermission.
public methodCopy Creates a copy of the PermissionSet.
public methodCopyTo Copies the permission objects of the set to the indicated location in an Array.
public methodDemand Forces a SecurityException at run time if all callers higher in the call stack have not been granted the permissions specified by the current instance.
public methodDeny Causes any Demand that passes through the calling code for a permission that has an intersection with a permission of a type contained in the current PermissionSet to fail.
public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodFromXml Reconstructs a security object with a specified state from an XML encoding.
public methodGetEnumerator Returns an enumerator for the permissions of the set.
public methodGetHashCode (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.
public methodGetPermission Gets a permission object of the specified type, if it exists in the set.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodIntersect Creates and returns a permission that is the intersection of the current PermissionSet and the specified PermissionSet.
public methodIsEmpty Gets a value indicating whether the PermissionSet is empty.
public methodIsSubsetOf Determines whether the current PermissionSet is a subset of the specified PermissionSet.
public methodIsUnrestricted Determines whether the PermissionSet is Unrestricted.
public methodPermitOnly Causes any Demand that passes through the calling code for any PermissionSet that is not a subset of the current PermissionSet to fail.
public methodRemovePermission Removes a permission of a certain type from the set.
public methodSetPermission Sets a permission to the PermissionSet, replacing any existing permission of the same type.
public methodToString Overridden. Returns a string representation of the PermissionSet.
public methodToXml Creates an XML encoding of the security object and its current state.
public methodUnion Creates a PermissionSet that is the union of the current PermissionSet and the specified PermissionSet.

Protected Methods

protected methodFinalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

PermissionSet Class | System.Security Namespace

Show: