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.
For a list of all members of this type, see FirstMatchCodeGroup Members.
[Visual Basic] <Serializable> NotInheritable Public Class FirstMatchCodeGroup Inherits CodeGroup [C#] [Serializable] public sealed class FirstMatchCodeGroup : CodeGroup [C++] [Serializable] public __gc __sealed class FirstMatchCodeGroup : public CodeGroup [JScript] public Serializable class FirstMatchCodeGroup extends CodeGroup
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
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.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: Mscorlib (in Mscorlib.dll)