System.Security.Policy.FirstMatchCodeGroup Class

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.

See Also: FirstMatchCodeGroup Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public sealed class FirstMatchCodeGroup : CodeGroup

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 code groups whose membership conditions match a given assembly and their child code groups apply policy.

Like any code group, System.Security.Policy.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 System.Security.Policy.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.

System.Security.Policy.FirstMatchCodeGroup is intended for programmatic use by application domain hosts to set domain policy.

Requirements

Namespace: System.Security.Policy
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0