Mono Class Library: System.Security NamespaceSystem.Security.CodeAccessPermission Class |
See Also: CodeAccessPermission Members
|
All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.
Note:Classes derived from System.Security.CodeAccessPermission are required to override the following methods of the System.Security.CodeAccessPermission class:
- CodeAccessPermission.Copy - Creates a System.Security.IPermission object of the same type and containing the same values as the current instance.
- CodeAccessPermission.FromXml(SecurityElement) - Reconstructs the state of a System.Security.CodeAccessPermission object using an XML encoding.
- CodeAccessPermission.Intersect(IPermission) - Returns a System.Security.IPermission object that is the intersection of the current instance and the specified object.
- CodeAccessPermission.IsSubsetOf(IPermission) - Determines if the current instance is a subset of the specified object.
- CodeAccessPermission.ToXml - Creates an XML encoding of the current instance.
- CodeAccessPermission.Union(IPermission) - Returns a System.Security.IPermission object that is the union of the current instance and the specified object.
In addition, classes derived from System.Security.CodeAccessPermission are required to implement a constructor that takes a System.Security.Permissions.PermissionState as its only parameter.
The XML encoding of a System.Security.CodeAccessPermission instance is defined below in EBNF format. The following conventions are used:
- All non-literals in the grammar below are shown in normal type.
- All literals are in bold font.
The following meta-language symbols are used:
- '*' represents a meta-language symbol suffixing an expression that can appear zero or more times.
- '?' represents a meta-language symbol suffixing an expression that can appear zero or one time.
- '+' represents a meta-language symbol suffixing an expression that can appear one or more times.
- '(',')' is used to group literals, non-literals, or a mixture of literals and non-literals.
- '|' denotes an exclusive disjunction between two expressions.
- '::= ' denotes a production rule where a left hand non-literal is replaced by a right hand expression containing literals, non-literals, or both.
ClassName is the name of the class implementing the permission, such as System.Security.Permissions.EnvironmentPermission.
AssemblyName is the name of the assembly that contains the class implementing the permission, such as mscorlib.
Version is the three part version number indicating the version of the assembly implementing the permission, such as 1.0.1.
StrongNamePublicKeyToken is the strong name public key token constituting the strong name of the assembly that implements the 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".
PermissionXML is any valid XML used by the permission to represent permission state.
The XML encoding of a System.Security.CodeAccessPermission instance is as follows:
CodeAccessPermissionXML::=
<IPermission class="
ClassName,
AssemblyName,
Version=Version,
Culture=neutral,
PublicKeyToken=StrongNamePublicKeyToken"
version="1"
(PermissionAttributes)*
>
(PermissionXML)?
</IPermission>
[Edit]
Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0