NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

FirstMatchCodeGroup Members

Public:

Constructor

FirstMatchCodeGroup Constructor Initializes an instance of the FirstMatchCodeGroup class.

Properties

AttributeString Gets a string representation of the attributes of the policy statement for the code group.
Children Gets an ordered list of the child code groups of a code group.
MembershipCondition The code group's membership condition.
MergeLogic [To be supplied.]
PermissionSetName Name of the named permission set for the code group.
PolicyStatement The policy statement associated with the code group. Policy statement applies to code in assemblies when evidence matches the membership condition.

Methods

AddChild Adds a child code group to this code group.
Copy Makes a deep copy of the code group.
Equals (inherited from Object) Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality).
FromXml Overloaded. Reconstructs a security object with a given state from an XML encoding.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) Gets the Type of the Object.
RemoveChild Removes the specified child code group.
Resolve Resolve policy for the code group and its descendants for a set of evidence. Given evidence for an assembly to be loaded, this method evalutes the code group by first checking the membership condition against the evidence and if it matches returning a policy statement for the code group, including evaluation of child code groups.

For first-match code groups, each child code groups membership condition is tested in order against the evidence, and (only) the first one to match is resolved with the evidence set. If none match, then the policy statement of the parent first-match code group applies. The matching child code group type determines how its (grand)child groups are applied, depending on how their respective Resolve() methods work.

The system uses Resolve() on the policy levels to determine what permissions to grant to loaded code from the resultant policy statements and the code request on the assembly.

ToString (inherited from Object) Returns a String that represents the current Object.
ToXml Overloaded. Creates an XML encoding, of the security object and its current state.

Protected:

Methods

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

FirstMatchCodeGroup Class | System.Security.Policy Namespace