FileCodeGroup Class

Represents a code group that is identified by a URL. This class is abstract.

Namespace: System.Security.Policy
Assembly: mscorlib.dll

Syntax

public abstract class FileCodeGroup : CodeGroup

Inheritance Hierarchy

Object
    CodeGroup
        FileCodeGroup

Remarks

A FileCodeGroup object is used to represent a code group whose membership condition is based on the URL of the code. For example, you can create a FileCodeGroup that grants specific permissions to all code originating from a particular website or a local directory.

Since FileCodeGroup is an abstract class, you will typically use one of its derived classes, such as UrlClassCodeGroup, to define the specific membership condition.

The code group membership is determined by matching the origin URL of the assembly against the URL specified in the FileCodeGroup. If there is a match, the code is considered a member of this group.

Tip: This class serves as a base class for other specific file-based code group implementations.

Constructors

The FileCodeGroup class has the following constructors. Since it is an abstract class, you cannot instantiate it directly.

Constructor Description
FileCodeGroup(IPermission, codegroup) Initializes a new instance of the FileCodeGroup class with the specified permission set and the parent code group.

Methods

The FileCodeGroup class inherits methods from CodeGroup and Object.

Public Methods

Method Description
public override policyStatement.PolicyStatement Copy() Creates a new object that is a copy of the current instance.
protected override security.policy.policyStatement.PolicyStatement CreatePolicyStatement() Creates a new policy statement for the code group.
public override security.principal.IEnumerator GetEnumerator() Returns an enumerator for the code group and its children.
public override void FromXml(security.xml.SecurityElement e) Performs XML serialization and deserialization of security objects and their binary data.
public override security.xml.SecurityElement ToXml() Converts a security object into an XML element and provides a location for the binary data.

See Also