System.Security.Policy (mscorlib.dll)sealed class
public sealed class PolicyStatement : System.Security.ISecurityEncodable,      System.Security.ISecurityPolicyEncodable { // Public Constructors    public PolicyStatement(System.Security.PermissionSet permSet);    public PolicyStatement(System.Security.PermissionSet permSet, PolicyStatementAttribute attributes); // Public Instance Properties    public PolicyStatementAttribute Attributes{set; get; }    public string AttributeString{get; }    public PermissionSet PermissionSet{set; get; } // Public Instance Methods    public PolicyStatement Copy(  );    public void FromXml(System.Security.SecurityElement et);    // implements System.Security.ISecurityEncodable    public void FromXml(System.Security.SecurityElement et,  PolicyLevel level);  // implements System.Security.ISecurityPolicyEncodable    public SecurityElement ToXml(  );        // implements System.Security.ISecurityEncodable    public SecurityElement ToXml(PolicyLevel level);        // implements System.Security.ISecurityPolicyEncodable }

The PolicyStatement class defines the set of permissions that a code group grants to its members, as well as the attributes of the code group. Of the four concrete CodeGroup implementations, only the UnionCodeGroup and FirstMatchCodeGroup classes require a PolicyStatement object. The FileCodeGroup and NetCodeGroup classes generate their permission sets dynamically, and do not support attributes. A PolicyStatement is assigned to a UnionCodeGroup or FirstMatchCodeGroup object as an argument of the code group's constructor, or through the CodeGroup.PolicyStatement property.

A PolicyStatement object contains a System.Security.PermissionSet object that specifies the permissions to grant to the code group's members and a value from the PolicyStatementAttribute enumeration that specifies the attributes assigned to the code group. Both values can be set as arguments of the PolicyStatement constructor or after construction through the PermissionSet and Attributes properties. The AttributeString property returns a human-readable representation of the value held in the Attributes property.

Returned By

CodeGroup.{PolicyStatement, Resolve( )}, PolicyLevel.Resolve( )

Passed To

CodeGroup.{CodeGroup( ), PolicyStatement}, FirstMatchCodeGroup.FirstMatchCodeGroup( ), UnionCodeGroup.UnionCodeGroup( )

Programming. NET Security
Programming .Net Security
ISBN: 0596004427
EAN: 2147483647
Year: 2005
Pages: 346

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net