This documentation is archived and is not being maintained.

UnionCodeGroup Class

Note: This API is now obsolete.

Represents a code group whose policy statement is the union of the current code group's policy statement and the policy statement of all its matching child code groups. This class cannot be inherited.

System.Object
  System.Security.Policy.CodeGroup
    System.Security.Policy.UnionCodeGroup

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

[SerializableAttribute]
[ObsoleteAttribute("This type is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
[ComVisibleAttribute(true)]
public sealed class UnionCodeGroup : CodeGroup

The UnionCodeGroup type exposes the following members.

  NameDescription
Public methodUnionCodeGroupInitializes a new instance of the UnionCodeGroup class.
Top

  NameDescription
Public propertyAttributeStringGets a string representation of the attributes of the policy statement for the code group. (Inherited from CodeGroup.)
Public propertyChildrenGets or sets an ordered list of the child code groups of a code group. (Inherited from CodeGroup.)
Public propertyDescriptionGets or sets the description of the code group. (Inherited from CodeGroup.)
Public propertyMembershipConditionGets or sets the code group's membership condition. (Inherited from CodeGroup.)
Public propertyMergeLogicGets the merge logic. (Overrides CodeGroup.MergeLogic.)
Public propertyNameGets or sets the name of the code group. (Inherited from CodeGroup.)
Public propertyPermissionSetNameGets the name of the named permission set for the code group. (Inherited from CodeGroup.)
Public propertyPolicyStatementGets or sets the policy statement associated with the code group. (Inherited from CodeGroup.)
Top

  NameDescription
Public methodAddChildAdds a child code group to the current code group. (Inherited from CodeGroup.)
Public methodCopyMakes a deep copy of the current code group. (Overrides CodeGroup.Copy().)
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. (Inherited from CodeGroup.)
Public methodEquals(Object)Determines whether the specified code group is equivalent to the current code group. (Inherited from CodeGroup.)
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. (Inherited from CodeGroup.)
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. (Inherited from CodeGroup.)
Public methodFromXml(SecurityElement, PolicyLevel)Reconstructs a security object with a given state and policy level from an XML encoding. (Inherited from CodeGroup.)
Public methodGetHashCodeGets the hash code of the current code group. (Inherited from CodeGroup.)
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. (Inherited from CodeGroup.)
Public methodRemoveChildRemoves the specified child code group. (Inherited from CodeGroup.)
Public methodResolveResolves policy for the code group and its descendants for a set of evidence. (Overrides CodeGroup.Resolve(Evidence).)
Public methodResolveMatchingCodeGroupsResolves matching code groups. (Overrides CodeGroup.ResolveMatchingCodeGroups(Evidence).)
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. (Inherited from CodeGroup.)
Public methodToXml(PolicyLevel)Creates an XML encoding of the security object, its current state, and the policy level within which the code exists. (Inherited from CodeGroup.)
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 (and so on), forming a tree. Each code group has a membership condition that determines if a given assembly belongs to it or not, based on the evidence for that assembly. Only code groups whose membership conditions match a given assembly and their child code groups apply policy.

UnionCodeGroup is the most common type of code group; the policy statement of all matching child code groups (and by extension their child code groups) are combined with the permission set of the matching parent code group. Thus, if its membership condition matches, this code group forms the union of its policy statement and those of all its child code groups that also match the evidence.

UnionCodeGroup code groups are the code groups created by the CASPOL utility (see Caspol.exe (Code Access Security Policy Tool)) and the .NET Framework Configuration tool (see Mscorcfg.msc (.NET Framework Configuration Tool)).

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Obsolete (compiler warning) in 4

.NET Framework Client Profile

Supported in: 3.5 SP1
Obsolete (compiler warning) in 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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: