NamedPermissionSet Class

 

Defines a permission set that has a name and description associated with it. This class cannot be inherited.

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

System.Object
  System.Security.PermissionSet
    System.Security.NamedPermissionSet

<SerializableAttribute>
<ComVisibleAttribute(True)>
Public NotInheritable Class NamedPermissionSet
	Inherits PermissionSet

NameDescription
System_CAPS_pubmethodNamedPermissionSet(NamedPermissionSet)

Initializes a new instance of the NamedPermissionSet class from another named permission set.

System_CAPS_pubmethodNamedPermissionSet(String)

Initializes a new, empty instance of the NamedPermissionSet class with the specified name.

System_CAPS_pubmethodNamedPermissionSet(String, PermissionSet)

Initializes a new instance of the NamedPermissionSet class with the specified name from a permission set.

System_CAPS_pubmethodNamedPermissionSet(String, PermissionState)

Initializes a new instance of the NamedPermissionSet class with the specified name in either an unrestricted or a fully restricted state.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of permission objects contained in the permission set.(Inherited from PermissionSet.)

System_CAPS_pubpropertyDescription

Gets or sets the text description of the current named permission set.

System_CAPS_pubpropertyIsReadOnly

Gets a value indicating whether the collection is read-only.(Inherited from PermissionSet.)

System_CAPS_pubpropertyIsSynchronized

Gets a value indicating whether the collection is guaranteed to be thread safe.(Inherited from PermissionSet.)

System_CAPS_pubpropertyName

Gets or sets the name of the current named permission set.

System_CAPS_pubpropertySyncRoot

Gets the root object of the current collection.(Inherited from PermissionSet.)

NameDescription
System_CAPS_pubmethodAddPermission(IPermission)

Adds a specified permission to the PermissionSet.(Inherited from PermissionSet.)

System_CAPS_pubmethodAssert()

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.(Inherited from PermissionSet.)

System_CAPS_pubmethodContainsNonCodeAccessPermissions()

Gets a value indicating whether the PermissionSet contains permissions that are not derived from CodeAccessPermission.(Inherited from PermissionSet.)

System_CAPS_pubmethodCopy()

Creates a permission set copy from a named permission set.(Overrides PermissionSet.Copy().)

System_CAPS_pubmethodCopy(String)

Creates a copy of the named permission set with a different name but the same permissions.

System_CAPS_pubmethodCopyTo(Array, Int32)

Copies the permission objects of the set to the indicated location in an Array.(Inherited from PermissionSet.)

System_CAPS_pubmethodDemand()

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.(Inherited from PermissionSet.)

System_CAPS_pubmethodDeny()

Obsolete.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.(Inherited from PermissionSet.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified NamedPermissionSet object is equal to the current NamedPermissionSet.(Overrides PermissionSet.Equals(Object).)

System_CAPS_pubmethodFromXml(SecurityElement)

Reconstructs a named permission set with a specified state from an XML encoding.(Overrides PermissionSet.FromXml(SecurityElement).)

System_CAPS_pubmethodGetEnumerator()

Returns an enumerator for the permissions of the set.(Inherited from PermissionSet.)

System_CAPS_pubmethodGetHashCode()

Gets a hash code for the NamedPermissionSet object that is suitable for use in hashing algorithms and data structures such as a hash table.(Overrides PermissionSet.GetHashCode().)

System_CAPS_pubmethodGetPermission(Type)

Gets a permission object of the specified type, if it exists in the set.(Inherited from PermissionSet.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIntersect(PermissionSet)

Creates and returns a permission set that is the intersection of the current PermissionSet and the specified PermissionSet.(Inherited from PermissionSet.)

System_CAPS_pubmethodIsEmpty()

Gets a value indicating whether the PermissionSet is empty.(Inherited from PermissionSet.)

System_CAPS_pubmethodIsSubsetOf(PermissionSet)

Determines whether the current PermissionSet is a subset of the specified PermissionSet.(Inherited from PermissionSet.)

System_CAPS_pubmethodIsUnrestricted()

Determines whether the PermissionSet is Unrestricted.(Inherited from PermissionSet.)

System_CAPS_pubmethodPermitOnly()

Causes any Demand that passes through the calling code for any PermissionSet that is not a subset of the current PermissionSet to fail.(Inherited from PermissionSet.)

System_CAPS_pubmethodRemovePermission(Type)

Removes a permission of a certain type from the set.(Inherited from PermissionSet.)

System_CAPS_pubmethodSetPermission(IPermission)

Sets a permission to the PermissionSet, replacing any existing permission of the same type.(Inherited from PermissionSet.)

System_CAPS_pubmethodToString()

Returns a string representation of the PermissionSet.(Inherited from PermissionSet.)

System_CAPS_pubmethodToXml()

Creates an XML element description of the named permission set.(Overrides PermissionSet.ToXml().)

System_CAPS_pubmethodUnion(PermissionSet)

Creates a PermissionSet that is the union of the current PermissionSet and the specified PermissionSet.(Inherited from PermissionSet.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIDeserializationCallback.OnDeserialization(Object)

This API supports the product infrastructure and is not intended to be used directly from your code. Runs when the entire object graph has been deserialized.(Inherited from PermissionSet.)

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast(Of TResult)()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType(Of TResult)()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

Named permission sets are used in security policy administration to specify the permissions to be granted to code that belongs to certain code groups. Names are strings of alphanumeric characters. Description strings can consist of any printable characters.

The following code example shows the use of members of the NamedPermissionSet class.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: