BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Object System.Collections.ICollection System.Runtime.Serialization.IDeserializationCallback System.Security.ISecurityEncodable System.Security.IStackWalk

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

Use to perform operations on different permission types as a group.

The XML encoding of a 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.

The XML encoding of a instance is as follows:

PermissionSet::=

(

)

|

(

DnsPermissionXML ?

SocketPermissionXML ?

WebPermissionXML ?

EnvironmentPermissionXML ?

FileIOPermissionXML ?

ReflectionPermissionXML ?

SecurityPermissionXML ?

CustomPermissionXML *

)

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 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 ::=

ClassName

AssemblyName

Version

StrongNamePublicKeyToken

version

(PermissionAttributes)*

>

(PermissionXML)?

- Constructor

  A value. This value is either or , to specify fully restricted or fully unrestricted access.

  Constructs a new instance of the class with the specified value.

  The new instance contains no permissions. To add a permission to the new instance, use .

  is not a valid value.
  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  The instance with which to initialize the values of the new instance, or to initialize an empty permission set.

  Constructs a new instance of the class with the values of the specified instance.

  If is not , the new instance is initialized with copies of the objects in , not references to those objects. If is , the new instance contains no permissions.

  To add a permission to an empty , use .

  is not and is not an instance of .
  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Security.IPermission `` The object to add.

  Adds the specified object to the current instance if that permission does not already exist in the current instance.

  If is , returns . If a permission of the same type as already exists in the current instance, the union of the existing permission and is added to the current instance and is returned.

  The is added if is not and a permission of the same type as does not already exist in the current instance.

  Use this method to add permission objects to the current instance.

  is not a object. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void

  Asserts that calling code can access the resources identified by the permissions contained in the current instance through the code that calls this method, even if callers have not been granted permission to access the resource.

  This method is the only way to assert multiple permissions at the same time within a frame because only a single assert can be active on a frame at one time; subsequent asserts will result in an exception.

  As described above.

  Use this method to insure that all callers can access a set of secured resources.

  The asserting code does not have sufficient permission to call this method.

  -or-

  This method was called with permissions already asserted for the current stack frame.

  Requires permission to perform the assertion security operation. See . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Byte[] `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Security.PermissionSet

  Returns a new containing copies of the objects in the current instance.

  A new that is value equal to the current instance.

  This method creates copies of the permission objects in the current instance, and adds them to the new instance.

  This method calls the constructor that takes a argument, and passes the current instance as that parameter.

  Use this method to create a new instance containing permissions that are identical to the permissions contained in the current instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Void `` `` The destination . A that specifies the zero-based starting position in the array at which to begin copying.

  Copies the permission objects in the current instance to the specified location in the specified .

  This method is implemented to support the interface.

  As described above.

  The default implementation uses the (, ) method to add the value to the array.

  Override this method to customize the manner in which elements are added to .

  has more than one dimension. is outside the range of allowable values for . is . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Int32 Implemented to support the interface. [Note: For more information, see .] To be added. To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void

  Forces a if all callers do not have the permissions specified by the objects contained in the current instance.

  The permission check for begins with the immediate caller of the code that calls this method and continues until all callers have been checked or a caller has been found that is not granted the demanded permission, in which case a exception is thrown.

  If the current instance is empty, a call to succeeds.

  Use this method to ensure in a single operation that all callers have all permissions contained in a permission set.

  A caller does not have the permission specified by the current instance. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void

  Denies access to the resources secured by the objects contained in the current instance through the code that calls this method.

  This is the only way to deny multiple permissions at the same time within a frame because only a single deny can be active on a frame at one time; subsequent denies will result in an exception.

  This method is required to prevent callers from accessing all resources protected by the objects in the current instance even if the callers had been granted permission to access them.

  A call to is effective until the calling code returns.

  Use this method to force all security checks for the objects contained in the current instance to fail.

  A previous call to has already restricted the permissions for the current stack frame.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Boolean `` To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Void ``

  A instance containing the XML encoding to use to reconstruct the state of a object.

  Reconstructs the state of a object using the specified XML encoding.

  For the XML encoding for this class, see the class page.

  When this call completes, the objects in the current instance are required to be identical to the objects in the encoded in .

  Override this method to reconstruct subclasses of .

  Applications do not typically call this method; it is called by the system.

  is .

  does not contain an XML encoding for a instance.

  -or-

  An error occurred while reconstructing .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Collections.IEnumerator

  Returns an enumerator used to iterate over the permissions in the current instance.

  A object for the permissions of the set.

  This method is implemented to support the interface, which supports the interface.

  As described above.

  Override this method to customize the enumerator returned by this method.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Security.IPermission `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Security.PermissionSet `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Boolean ``

  A instance that is to be tested for the subset relationship.

  Determines whether the current instance is a subset of the specified object.

  if the current instance is a subset of ; otherwise, .

  The current instance is a subset if all demands that succeed for the current instance also succeed for . That is, the current instance is a subset of if contains at least the permissions contained in the current instance.

  If this method returns , the current instance does not describe a level of access to a set of resources that is not already described by .

  As described above.

  Use this method to determine if the all permissions contained in the current instance are also contained in .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Boolean Implemented to support the interface. [Note: For more information, see .] To be added. To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void

  Specifies that only the resources described by the current instance can be accessed by calling code, even if the code has been granted permission to access other resources.

  is similar to in that both methods cause access to fail where it might otherwise succeed. The difference is that specifies permissions for which to refuse access, while specifies the only permissions that will succeed.

  This is the only way to permit multiple permissions at the same time within a stack frame because only a single permit at a time can be active on a frame; subsequent permits will result in an exception.

  Callers are required to be prevented from accessing resources not secured by the contents of the current instance, even if a caller has been granted permission to access such resources.

  A is in effect until the calling code returns to its caller.

  Use this method to limit access to a specified set of resources.

  A previous call to has already set the permissions for the current stack frame.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Security.IPermission `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Security.IPermission `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Object Implemented to support the interface. [Note: For more information, see .] To be added. To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void `` To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String

  Returns a representation of the state of the current instance.

  A containing the XML representation of the state of the current instance.

  This method overrides .

  The following example displays the XML that encodes the state of a .

  `using System; using System.Security; using System.Security.Permissions; public class PermissionSetToStringExample { public static void Main() { PermissionSet ps = new PermissionSet(PermissionState.Unrestricted); Console.WriteLine(ps.ToString()); } }`

  The output is

  <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Security.SecurityElement

  Returns the XML encoding of the current instance.

  A containing an XML encoding of the state of the current instance.

  As described above.

  Override this method to return an object containing the XML encoding for types derived from .

  This method is called by the system.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Security.PermissionSet `` A instance to be combined with the current instance.

  Returns a object that is the union of the current instance and the specified object.

  A new instance that represents the union of the current instance and . If the current instance or is unrestricted, returns a instance that is unrestricted.

  The result of a call to is a new instance that represents all the operations represented by the current instance as well as all the operations represented by . If either set is unrestricted, the union is unrestricted, as well.

  As described above.

  Use this method to create a instance that contains all of the permissions of the current instance and .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
0 System.Runtime.InteropServices.ComVisible(true)