System.Security.Policy (mscorlib.dll)sealed class
public sealed class FileCodeGroup : CodeGroup { // Public Constructors    public FileCodeGroup(IMembershipCondition membershipCondition,       System.Security.Permissions.FileIOPermissionAccess access); // Public Instance Properties    public override string AttributeString{get; }   // overrides CodeGroup    public override string MergeLogic{get; }        // overrides CodeGroup    public override string PermissionSetName{get; } // overrides CodeGroup // Public Instance Methods    public override CodeGroup Copy(  );      // overrides CodeGroup    public override bool Equals(object o);         // overrides CodeGroup    public override int GetHashCode(  );     // overrides CodeGroup    public override PolicyStatement Resolve(Evidence evidence);  // overrides CodeGroup    public override CodeGroup ResolveMatchingCodeGroups(Evidence evidence);  // overrides CodeGroup // Protected Instance Methods    protected override void CreateXml(System.Security.SecurityElement element, PolicyLevel level);  // overrides CodeGroup    protected override void ParseXml(System.Security.SecurityElement e, PolicyLevel level);  // overrides CodeGroup }

This class is a subclass of the CodeGroup class. FileCodeGroup does not support attributes and does not contain a statically defined permission set, and so there is no need to assign it a PolicyStatement. With each call to Resolve( ), the FileCodeGroup object determines if the provided Evidence collection contains Url evidence that represents a URL with the "file://" protocol. If so, the FileCodeGroup dynamically generates a permission set that contains a System.Security.Permissions.FileIOPermission that grants access to the directory specified in the Url evidence. The type of file access to grant (read, write, and so on) is specified in the FileCodeGroup constructor using a member of the System.Security.Permissions.FileIOPermissionAccess enumeration.

Members of a FileCodeGroup are tested for membership against all of its child code groups. The final permission set granted by the FileCodeGroup is the union of its permission set and the permission sets of the children to which the assembly or application domain also qualifies for membership.


System.Object CodeGroup FileCodeGroup

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

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: