Export (0) Print
Expand All

CodeGroup Class

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

Namespace:  System.Security.Policy
Assembly:  mscorlib (in mscorlib.dll)

[SerializableAttribute]
[ComVisibleAttribute(true)]
public ref class CodeGroup abstract

The CodeGroup type exposes the following members.

  NameDescription
Protected methodCodeGroupInitializes a new instance of CodeGroup.
Top

  NameDescription
Public propertyAttributeStringGets a string representation of the attributes of the policy statement for the code group.
Public propertyChildrenGets or sets an ordered list of the child code groups of a code group.
Public propertyDescriptionGets or sets the description of the code group.
Public propertyMembershipConditionGets or sets the code group's membership condition.
Public propertyMergeLogicWhen overridden in a derived class, gets the merge logic for the code group.
Public propertyNameGets or sets the name of the code group.
Public propertyPermissionSetNameGets the name of the named permission set for the code group.
Public propertyPolicyStatementGets or sets the policy statement associated with the code group.
Top

  NameDescription
Public methodAddChildAdds a child code group to the current code group.
Public methodCopyWhen overridden in a derived class, makes a deep copy of the current code group.
Protected methodCreateXmlWhen overridden in a derived class, serializes properties and internal state specific to a derived code group and adds the serialization to the specified SecurityElement.
Public methodEquals(Object)Determines whether the specified code group is equivalent to the current code group. (Overrides Object::Equals(Object).)
Public methodEquals(CodeGroup, Boolean)Determines whether the specified code group is equivalent to the current code group, checking the child code groups as well, if specified.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFromXml(SecurityElement)Reconstructs a security object with a given state from an XML encoding.
Public methodFromXml(SecurityElement, PolicyLevel)Reconstructs a security object with a given state and policy level from an XML encoding.
Public methodGetHashCodeGets the hash code of the current code group. (Overrides Object::GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodParseXmlWhen overridden in a derived class, reconstructs properties and internal state specific to a derived code group from the specified SecurityElement.
Public methodRemoveChildRemoves the specified child code group.
Public methodResolveWhen overridden in a derived class, resolves policy for the code group and its descendants for a set of evidence.
Public methodResolveMatchingCodeGroupsWhen overridden in a derived class, resolves matching code groups.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodToXml()Creates an XML encoding of the security object and its current state.
Public methodToXml(PolicyLevel)Creates an XML encoding of the security object, its current state, and the policy level within which the code exists.
Top

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.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft