Mono Class Library: System.Security Namespace

System.Security.PermissionSet Class

Represents a collection that can contain different kinds of permissions and perform security operations.

See Also: PermissionSet Members

[System.Runtime.InteropServices.ComVisible(true)]
public class PermissionSet : ICollection, System.Runtime.Serialization.IDeserializationCallback, ISecurityEncodable, IStackWalk

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Remarks

Note: Use System.Security.PermissionSet to perform operations on different permission types as a group.

The XML encoding of a System.Security.PermissionSet instance is defined below in EBNF format. The following conventions are used:

The following meta-language symbols are used:

The XML encoding of a System.Security.PermissionSet instance is as follows:

PermissionSet::=
(
<PermissionSet
class="System.Security.PermissionSet"
version="1" Unrestricted="true"/>
)
|
(
<PermissionSet
class="System.Security.PermissionSet"
version="1">
DnsPermissionXML ?
SocketPermissionXML ?
WebPermissionXML ?
EnvironmentPermissionXML ?
FileIOPermissionXML ?
ReflectionPermissionXML ?
SecurityPermissionXML ?
CustomPermissionXML *
</PermissionSet>
)

CustomPermissionXML represents any custom permission. The XML encoding for custom permissions makes use of the following symbols:

ClassName is the name of the class implementing the permission.

AssemblyName is the name of the assembly that contains the class implementing the permission.

Version is the version number indicating the version of the assembly implementing the permission.

StrongNamePublicKeyToken is the strong name public key token constituting the strong name of the assembly that implements the permission.

version is version information for the custom permission. Format and content are defined by the author of the custom permission.

PermissionAttributes is any attribute and attribute value on the System.Security.IPermission element used by the permission to represent a particular permission state, for example, unrestricted= "true". Format and content are defined by the author of the custom permission.

PermissionXML is any valid XML used by the permission to represent permission state. Format and content are defined by the author of the custom permission.

The XML encoding of a custom permission instance is as follows:

CustomPermissionXML ::=
<IPermission class="
ClassName,
AssemblyName,
Version=Version,
Culture=neutral,
PublicKeyToken=StrongNamePublicKeyToken"
version="version"
(PermissionAttributes)*
>
(PermissionXML)?
</IPermission>

Requirements

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0