UnionCodeGroup.Resolve(Evidence) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Resolves policy for the code group and its descendants for a set of evidence.
public:
override System::Security::Policy::PolicyStatement ^ Resolve(System::Security::Policy::Evidence ^ evidence);
public override System.Security.Policy.PolicyStatement Resolve (System.Security.Policy.Evidence evidence);
override this.Resolve : System.Security.Policy.Evidence -> System.Security.Policy.PolicyStatement
Public Overrides Function Resolve (evidence As Evidence) As PolicyStatement
- evidence
- Evidence
The evidence for the assembly.
A policy statement consisting of the permissions granted by the code group with optional attributes, or null
if the code group does not apply (the membership condition does not match the specified evidence).
The evidence
parameter is null
.
More than one code group (including the parent code group and any child code groups) is marked Exclusive.
Given evidence for an assembly to be loaded, this method evaluates the code group by first checking the membership condition against the specified evidence. If there is a match, this method returns 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 form a union with the policy statement of the parent union code group. Each child code group type determines how its child groups are applied, depending on how their respective Resolve methods work.
The .NET Framework security system uses Resolve on the policy levels to determine which permissions to grant to loaded code from the resulting policy statements and the code request on the assembly.
If the membership condition does not match the specified evidence, this method returns null
; otherwise, it sets the permission set to be returned (P) equal to the code group's policy statement, and then continues. For each child code group, the method resolves the code group with the same evidence; if the result is not null
, it sets P equal to the union of P and the child code group's policy statement. It then returns P, which is now the union of the current code group's policy statement and all child group policy statements.
Produto | Versões |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Comentários do .NET
O .NET é um projeto código aberto. Selecione um link para fornecer comentários: