Class DefaultGovernancePolicyEvaluator<TContext>
- Namespace
- AsiBackbone.Core.Evaluation
- Assembly
- AsiBackbone.Core.dll
Default policy evaluator that runs the active constraint structure and composes the result into a governance decision.
public sealed class DefaultGovernancePolicyEvaluator<TContext> : IGovernancePolicyEvaluator<TContext> where TContext : IGovernanceEvaluationContext
Type Parameters
TContextThe framework-neutral evaluation context type.
- Inheritance
-
DefaultGovernancePolicyEvaluator<TContext>
- Implements
-
IGovernancePolicyEvaluator<TContext>
- Inherited Members
Constructors
DefaultGovernancePolicyEvaluator(IEnumerable<IGovernanceConstraint<TContext>>, IEnumerable<IThreatModelContributor<TContext>>?, IGovernanceDecisionPolicy<TContext>?, GovernancePolicyOptions?, ILogger<DefaultGovernancePolicyEvaluator<TContext>>?)
Initializes a new instance of the DefaultGovernancePolicyEvaluator<TContext> class.
public DefaultGovernancePolicyEvaluator(IEnumerable<IGovernanceConstraint<TContext>> constraints, IEnumerable<IThreatModelContributor<TContext>>? threatModelContributors, IGovernanceDecisionPolicy<TContext>? decisionPolicy, GovernancePolicyOptions? options, ILogger<DefaultGovernancePolicyEvaluator<TContext>>? logger)
Parameters
constraintsIEnumerable<IGovernanceConstraint<TContext>>The constraints that make up the active policy structure.
threatModelContributorsIEnumerable<IThreatModelContributor<TContext>>Threat model contributors that inspect the context before constraint composition.
decisionPolicyIGovernanceDecisionPolicy<TContext>Optional decision policy applied after composition.
optionsGovernancePolicyOptionsEvaluator options applied during composition.
loggerILogger<DefaultGovernancePolicyEvaluator<TContext>>Optional logger used to emit operational warning signals.
Methods
EvaluateAsync(TContext, CancellationToken)
Evaluates the supplied context and returns the composed governance decision.
public ValueTask<GovernanceDecision> EvaluateAsync(TContext context, CancellationToken cancellationToken = default)
Parameters
contextTContextThe framework-neutral evaluation context.
cancellationTokenCancellationTokenA token that can cancel asynchronous evaluation.
Returns
- ValueTask<GovernanceDecision>
The composed governance decision.