Uredi

Deli z drugimi prek


PolicyLevel.ResolveMatchingCodeGroups(Evidence) Method

Definition

Resolves policy at the policy level and returns the root of a code group tree that matches the evidence.

public:
 System::Security::Policy::CodeGroup ^ ResolveMatchingCodeGroups(System::Security::Policy::Evidence ^ evidence);
public System.Security.Policy.CodeGroup ResolveMatchingCodeGroups (System.Security.Policy.Evidence evidence);
member this.ResolveMatchingCodeGroups : System.Security.Policy.Evidence -> System.Security.Policy.CodeGroup
Public Function ResolveMatchingCodeGroups (evidence As Evidence) As CodeGroup

Parameters

evidence
Evidence

The Evidence used to resolve policy.

Returns

A CodeGroup representing the root of a tree of code groups matching the specified evidence.

Exceptions

The policy level contains multiple matching code groups marked as exclusive.

The evidence parameter is null.

Remarks

You can use this method to analyze the effect of the code groups in a policy level with respect to a certain set of evidence. For example, if the security policy is not granting an assembly the minimum code request permissions it needs, it can be difficult to tell by examination of the code groups exactly where the problem is.

Since this method returns a code group that can have child code groups, it is possible for an administrator to examine the code group and its child code groups and determine which code groups match.

Applies to