Class CapabilityPolicyEvaluator
Namespace: Cephalon.Engine.Trust
Assembly: Cephalon.Engine.dll
Evaluates capability and package trust decisions against the current trust policy snapshot.
public sealed class CapabilityPolicyEvaluatorInheritance
Section titled “Inheritance”object ← CapabilityPolicyEvaluator
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”CapabilityPolicyEvaluator(TrustSnapshot)
Section titled “ CapabilityPolicyEvaluator(TrustSnapshot)”Initializes a new instance of the
public CapabilityPolicyEvaluator(TrustSnapshot snapshot)Parameters
Section titled “Parameters”snapshot TrustSnapshot
The trust snapshot to evaluate against.
Properties
Section titled “Properties”Snapshot
Section titled “ Snapshot”Gets the trust snapshot being evaluated.
public TrustSnapshot Snapshot { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”CreateSnapshot(TrustPolicy, IReadOnlyList<PackageManifest>, IReadOnlyList<ModuleManifest>, IReadOnlyList<CapabilityManifest>)
Section titled “ CreateSnapshot(TrustPolicy, IReadOnlyList<PackageManifest>, IReadOnlyList<ModuleManifest>, IReadOnlyList<CapabilityManifest>)”Creates a trust snapshot from the supplied policy, packages, modules, and capabilities.
public static TrustSnapshot CreateSnapshot(TrustPolicy policy, IReadOnlyList<PackageManifest> packages, IReadOnlyList<ModuleManifest> modules, IReadOnlyList<CapabilityManifest> capabilities)Parameters
Section titled “Parameters”policy TrustPolicy
The trust policy to apply.
packages IReadOnlyList<PackageManifest>
The package manifests visible to the runtime.
modules IReadOnlyList<ModuleManifest>
The module manifests visible to the runtime.
capabilities IReadOnlyList<CapabilityManifest>
The capability manifests visible to the runtime.
Returns
Section titled “Returns”A computed trust snapshot.
IsAllowed(string)
Section titled “ IsAllowed(string)”Determines whether a capability is allowed under the current trust policy.
public bool IsAllowed(string capabilityKey)Parameters
Section titled “Parameters”capabilityKey string
The capability key to evaluate.
Returns
Section titled “Returns”true when the capability is allowed; otherwise, false.
TryGetDecision(string, out CapabilityPolicyDecision)
Section titled “ TryGetDecision(string, out CapabilityPolicyDecision)”Attempts to resolve the trust decision for a capability.
public bool TryGetDecision(string capabilityKey, out CapabilityPolicyDecision decision)Parameters
Section titled “Parameters”capabilityKey string
The capability key to evaluate.
decision CapabilityPolicyDecision
The resolved trust decision.
Returns
Section titled “Returns”true when a decision was produced.