This documentation is archived and is not being maintained.

PolicyLevel Methods

The methods of the PolicyLevel class are listed here. For a complete list of PolicyLevel class members, see the PolicyLevel Members topic.

Public Methods

public methodAddFullTrustAssembly Overloaded. Adds a StrongNameMembershipCondition to the list of StrongNameMembershipCondition objects used to determine whether an assembly is a member of the group of assemblies that should not be evaluated.
public methodAddNamedPermissionSet Adds a NamedPermissionSet to the current policy level.
public methodChangeNamedPermissionSet Replaces a NamedPermissionSet in the current policy level with the specified PermissionSet.
public methodstatic (Shared in Visual Basic)CreateAppDomainLevel Creates a new policy level for use at the application domain policy level.
public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodFromXml Reconstructs a security object with a given state from an XML encoding.
public methodGetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetNamedPermissionSet Returns the NamedPermissionSet in the current policy level with the specified name.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodRecover Replaces the configuration file for this PolicyLevel with the last backup (reflecting the state of policy prior to the last time it was saved) and returns it to the state of the last save.
public methodRemoveFullTrustAssembly Overloaded. Removes an assembly from the list of assemblies the policy level uses to evaluate policy.
public methodRemoveNamedPermissionSet Overloaded. Removes a NamedPermissionSet from the current policy level.
public methodReset Returns the current policy level to the default state.
public methodResolve Resolves policy based on evidence for the policy level, and returns the resulting PolicyStatement.
public methodResolveMatchingCodeGroups Resolves policy at the policy level and returns the root of a code group tree that matches the evidence.
public methodToString (inherited from Object) Returns a String that represents the current Object.
public methodToXml Creates an XML encoding of the security object and its current state.

Protected Methods

protected methodFinalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

PolicyLevel Class | System.Security.Policy Namespace