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.Security.IPermission System.Security.IStackWalk

Serves as the base class for all code access permissions.

Classes derived from are required to override the following methods of the class:

- Creates a object of the same type and containing the same values as the current instance.
- Reconstructs the state of a object using an XML encoding.
- Returns a object that is the intersection of the current instance and the specified object.
- Determines if the current instance is a subset of the specified object.
- Creates an XML encoding of the current instance.
- Returns a object that is the union of the current instance and the specified object.

In addition, classes derived from are required to implement a constructor that takes a as its only parameter.

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.

ClassName is the name of the class implementing the permission, such as .

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 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 instance is as follows:

CodeAccessPermissionXML::=

ClassName

AssemblyName

Version

StrongNamePublicKeyToken

(PermissionAttributes)*

>

(PermissionXML)?

- Constructor
  Constructs a new instance of the class.
  To be added.
  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Void

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

  Calling stops the permission check on callers that are after the code performing the assert. An assertion is effective only if the code that calls passes the security check for the permission that it is asserting.

  Even if the callers that are after the code performing the assert do not have the requisite permissions, they can still access resources through the code that calls this method. Because the assertion only applies to the callers of the code performing the assert, a security check for the asserted permission can still fail if the code calling

  has not itself been granted that permission.

  A call to is effective until the code containing the call returns to its caller.

  Caution: Because calling removes the requirement that all code be granted permission to access the specified resource, it can open up security vulnerabilities if used incorrectly or inappropriately.

  The calling code does not have . Requires permission to call . See . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Security.IPermission

  Returns a containing the same values as the current instance.

  A new instance that is value equal to the current instance.

  This method is implemented to support the interface.

  The object returned by this method is required be the same type as the current instance and to represent the same access to resources as the current instance.

  Override this method to create a copy an instance in a type derived from .

  Use this method to obtain a copy of the current instance that has values identical to those of the current instance.

  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 permission specified by the current instance.

  The permissions of the code that calls this method are not examined; the check begins from the immediate caller of that code and continues until all callers have been checked, one of the callers invokes , or a caller has been found that is not granted the demanded permission, in which case a is thrown.

  is typically used by shared libraries to ensure that callers have permission to access a resource. For example, a method in a shared library calls for the necessary before performing a file operation requested by the caller.

  This method is implemented to support the interface.

  A caller does not have the permission specified by the current instance.

  -or-

  A caller has called for the resource protected 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 specified by the current instance through the code that calls this method.

  This method prevents callers from accessing the protected resource through the code that calls this method, even if those callers have been granted permission to access it.

  The call to is effective until the calling code returns.

  is ignored for a permission not granted because a demand for that permission will not succeed.

  can limit the liability of the programmer or prevent accidental security vulnerabilities because it prevents the method that calls from being used to access the resource protected by the denied permission.

  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.

  The values of the current instance are set to the values of the permission object encoded in .

  Override this method to reconstruct subclasses of .

  This method is called by the system.

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

  does not contain the XML encoding for a instance of the same type as the current instance.

  -or-

  The version number of is not valid.

  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 `` A instance to intersect with the current instance.

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

  A new instance that represents the intersection of the current instance and . If the intersection is empty or is , returns .

  This method is implemented to support the interface.

  As described above.

  Override this method to provide a mechanism for creating an intersection of two objects that are of the same type and are derived from .

  The intersection of two permissions is a permission that secures the resources and operations secured by both permissions. Specifically, it represents the minimum permission such that any demand that passes both permissions will also pass their intersection.

  is not and is not a object. 0 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, . If the current instance is unrestricted, and is not, returns . If is unrestricted, returns .

  This method is implemented to support the interface.

  As described above.

  Override this method to implement the test for the subset relationship in types derived from .

  The current instance is a subset of if the current instance specifies a set of accesses to resources that is wholly contained by . For example, a permission that represents read access to a file is a subset of a permission that represents read and write access to the file.

  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 .

  is not and is not of type . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void 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. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void 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. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String

  Returns the XML representation of the state of the current instance.

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

  The XML representation of the current instance is obtained by first calling , then calling on the object returned by that method.

  This method overrides .

  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.

  The object returned by this method is required to use the XML encoding for the class as defined on the class page. The state of the current instance is required to be reproducible by invoking on an instance of using the object returned by this method.

  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.IPermission `` A object of the same type as the current instance to be combined with the current instance.

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

  If is , returns a copy of the current instance using the method.

  This method is implemented to support the interface.

  This method returns 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. If is , returns a copy of the current instance using the method.

  If is not , this method throws a exception; otherwise, returns a copy of the current instance.

  Override this method to provide a mechanism for creating the union of two objects that are of the same type and are derived from .

  The result of a call to is a permission that represents all of the access to resources represented by both the current instance and . Any demand that passes either permission passes their union.

  is not of type . is not . 0 1.0.5000.0 2.0.0.0 4.0.0.0
0 System.Runtime.InteropServices.ComVisible(true)