CodeGroup CodeGroup CodeGroup CodeGroup Class

Definition

Represents the abstract base class from which all implementations of code groups must derive.

public ref class CodeGroup abstract
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public abstract class CodeGroup
type CodeGroup = class
Public MustInherit Class CodeGroup
Inheritance
CodeGroupCodeGroupCodeGroupCodeGroup
Derived
Attributes

Remarks

Code groups are the building blocks of code access security policy. Each policy level consists of a root code group that can have child code groups. Each child code group can have their own child code groups; this behavior extends to any number of levels, forming a tree. Each code group has a membership condition that determines if a given assembly belongs to it based on the evidence for that assembly.

Only those code groups whose membership conditions match a given assembly's evidence will be applied. If a matching code group has child code groups, then those children whose membership conditions also match the supplied evidence will likewise be applied.

Constructors

CodeGroup(IMembershipCondition, PolicyStatement) CodeGroup(IMembershipCondition, PolicyStatement) CodeGroup(IMembershipCondition, PolicyStatement) CodeGroup(IMembershipCondition, PolicyStatement)

Initializes a new instance of CodeGroup.

Properties

AttributeString AttributeString AttributeString AttributeString

Gets a string representation of the attributes of the policy statement for the code group.

Children Children Children Children

Gets or sets an ordered list of the child code groups of a code group.

Description Description Description Description

Gets or sets the description of the code group.

MembershipCondition MembershipCondition MembershipCondition MembershipCondition

Gets or sets the code group's membership condition.

MergeLogic MergeLogic MergeLogic MergeLogic

When overridden in a derived class, gets the merge logic for the code group.

Name Name Name Name

Gets or sets the name of the code group.

PermissionSetName PermissionSetName PermissionSetName PermissionSetName

Gets the name of the named permission set for the code group.

PolicyStatement PolicyStatement PolicyStatement PolicyStatement

Gets or sets the policy statement associated with the code group.

Methods

AddChild(CodeGroup) AddChild(CodeGroup) AddChild(CodeGroup) AddChild(CodeGroup)

Adds a child code group to the current code group.

Copy() Copy() Copy() Copy()

When overridden in a derived class, makes a deep copy of the current code group.

CreateXml(SecurityElement, PolicyLevel) CreateXml(SecurityElement, PolicyLevel) CreateXml(SecurityElement, PolicyLevel) CreateXml(SecurityElement, PolicyLevel)

When overridden in a derived class, serializes properties and internal state specific to a derived code group and adds the serialization to the specified SecurityElement.

Equals(CodeGroup, Boolean) Equals(CodeGroup, Boolean) Equals(CodeGroup, Boolean) Equals(CodeGroup, Boolean)

Determines whether the specified code group is equivalent to the current code group, checking the child code groups as well, if specified.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified code group is equivalent to the current code group.

FromXml(SecurityElement) FromXml(SecurityElement) FromXml(SecurityElement) FromXml(SecurityElement)

Reconstructs a security object with a given state from an XML encoding.

FromXml(SecurityElement, PolicyLevel) FromXml(SecurityElement, PolicyLevel) FromXml(SecurityElement, PolicyLevel) FromXml(SecurityElement, PolicyLevel)

Reconstructs a security object with a given state and policy level from an XML encoding.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Gets the hash code of the current code group.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ParseXml(SecurityElement, PolicyLevel) ParseXml(SecurityElement, PolicyLevel) ParseXml(SecurityElement, PolicyLevel) ParseXml(SecurityElement, PolicyLevel)

When overridden in a derived class, reconstructs properties and internal state specific to a derived code group from the specified SecurityElement.

RemoveChild(CodeGroup) RemoveChild(CodeGroup) RemoveChild(CodeGroup) RemoveChild(CodeGroup)

Removes the specified child code group.

Resolve(Evidence) Resolve(Evidence) Resolve(Evidence) Resolve(Evidence)

When overridden in a derived class, resolves policy for the code group and its descendants for a set of evidence.

ResolveMatchingCodeGroups(Evidence) ResolveMatchingCodeGroups(Evidence) ResolveMatchingCodeGroups(Evidence) ResolveMatchingCodeGroups(Evidence)

When overridden in a derived class, resolves matching code groups.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
ToXml() ToXml() ToXml() ToXml()

Creates an XML encoding of the security object and its current state.

ToXml(PolicyLevel) ToXml(PolicyLevel) ToXml(PolicyLevel) ToXml(PolicyLevel)

Creates an XML encoding of the security object, its current state, and the policy level within which the code exists.

Applies to