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!

UnionCodeGroup.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 union code groups, all child code groups whose membership condition match the evidence are also resolved and all resulting policy statements are unioned with the policy statement of the parent union code group. Each 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.

[Visual Basic]
Overridable Public Function Resolve( _
   ByVal evidence As Evidence _
) As PolicyStatement
[C#]
public virtual PolicyStatement Resolve(
   Evidence evidence
);
[C++]
public: virtual PolicyStatement* Resolve(
   Evidence* evidence
);
[JScript]
public function Resolve(
   evidence : Evidence
) : PolicyStatement;

Parameters

evidence
evidence for the assembly

Return Value

Policy statement consisting of permission granted by the code group, with optional attributes. Or a NULL value if the code group does not apply (membership condition does not match evidence).

Remarks

This method operates as follows:

if membership condition does not match evidence, return NULL,

else set P = code group's policy statement, and continue

resolve each child code group with the same evidence

for each non-NULL result, set P = P union child code group policy statement

return P (the union of this code group's policy statement & all child resolves)

See Also

UnionCodeGroup Class | UnionCodeGroup Members | System.Security.Policy Namespace