FirstMatchCodeGroup Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
This type is obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.
Caution
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.
Allows security policy to be defined by the union of the policy statement of a code group and that of the first child code group that matches. This class cannot be inherited.
public ref class FirstMatchCodeGroup sealed : System::Security::Policy::CodeGroup
[System.Obsolete("This type is obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public sealed class FirstMatchCodeGroup : System.Security.Policy.CodeGroup
[System.Serializable]
public sealed class FirstMatchCodeGroup : System.Security.Policy.CodeGroup
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class FirstMatchCodeGroup : System.Security.Policy.CodeGroup
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Obsolete("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.")]
public sealed class FirstMatchCodeGroup : System.Security.Policy.CodeGroup
public sealed class FirstMatchCodeGroup : System.Security.Policy.CodeGroup
[<System.Obsolete("This type is obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
type FirstMatchCodeGroup = class
inherit CodeGroup
[<System.Serializable>]
type FirstMatchCodeGroup = class
inherit CodeGroup
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type FirstMatchCodeGroup = class
inherit CodeGroup
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Obsolete("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.")>]
type FirstMatchCodeGroup = class
inherit CodeGroup
type FirstMatchCodeGroup = class
inherit CodeGroup
Public NotInheritable Class FirstMatchCodeGroup
Inherits CodeGroup
- Inheritance
- Attributes
Remarks
Caution
Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.
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 code groups whose membership conditions match a given assembly and their child code groups apply policy.
Like any code group, FirstMatchCodeGroup only applies when its membership condition matches evidence for an assembly. If there is a match, it tests the membership condition of each child in order, stopping when the first match occurs. The result of FirstMatchCodeGroup is the union of the policy statement of the root code group and the policy statement of the first child group of that code group that matches.
FirstMatchCodeGroup is intended for programmatic use by application ___domain hosts to set ___domain policy.
Constructors
FirstMatchCodeGroup(IMembershipCondition, PolicyStatement) |
Initializes a new instance of the FirstMatchCodeGroup class. |
Properties
AttributeString |
Gets a string representation of the attributes of the policy statement for the code group. (Inherited from CodeGroup) |
Children |
Gets or sets an ordered list of the child code groups of a code group. (Inherited from CodeGroup) |
Description |
Gets or sets the description of the code group. (Inherited from CodeGroup) |
MembershipCondition |
Gets or sets the code group's membership condition. (Inherited from CodeGroup) |
MergeLogic |
Gets the merge logic. |
Name |
Gets or sets the name of the code group. (Inherited from CodeGroup) |
PermissionSetName |
Gets the name of the named permission set for the code group. (Inherited from CodeGroup) |
PolicyStatement |
Gets or sets the policy statement associated with the code group. (Inherited from CodeGroup) |
Methods
AddChild(CodeGroup) |
Adds a child code group to the current code group. (Inherited from CodeGroup) |
Copy() |
Makes a deep copy of the code group. |
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. (Inherited from CodeGroup) |
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. (Inherited from CodeGroup) |
Equals(Object) |
Determines whether the specified code group is equivalent to the current code group. (Inherited from CodeGroup) |
FromXml(SecurityElement, PolicyLevel) |
Reconstructs a security object with a given state and policy level from an XML encoding. (Inherited from CodeGroup) |
FromXml(SecurityElement) |
Reconstructs a security object with a given state from an XML encoding. (Inherited from CodeGroup) |
GetHashCode() |
Gets the hash code of the current code group. (Inherited from CodeGroup) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ParseXml(SecurityElement, PolicyLevel) |
When overridden in a derived class, reconstructs properties and internal state specific to a derived code group from the specified SecurityElement. (Inherited from CodeGroup) |
RemoveChild(CodeGroup) |
Removes the specified child code group. (Inherited from CodeGroup) |
Resolve(Evidence) |
Resolves policy for the code group and its descendants for a set of evidence. |
ResolveMatchingCodeGroups(Evidence) |
Resolves matching code groups. |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
ToXml() |
Creates an XML encoding of the security object and its current state. (Inherited from CodeGroup) |
ToXml(PolicyLevel) |
Creates an XML encoding of the security object, its current state, and the policy level within which the code exists. (Inherited from CodeGroup) |