Class CapabilityScopeDeclarationConstraint
- Namespace
- ReferenceApplication.Web.Governance
- Assembly
- ReferenceApplication.Web.dll
Fails closed when a capability-protected policy marker is used without the corresponding endpoint capability scope.
public sealed class CapabilityScopeDeclarationConstraint : IGovernanceConstraint<GovernanceEvaluationContext>
- Inheritance
-
CapabilityScopeDeclarationConstraint
- Implements
-
IGovernanceConstraint<GovernanceEvaluationContext>
- Inherited Members
Fields
ConstraintName
Gets the stable name of this constraint.
public const string ConstraintName = "referenceapplication.capability.declaration"
Field Value
DeniedReasonCode
Gets the machine-readable reason code returned when the required scope is absent.
public const string DeniedReasonCode = "referenceapplication.capability.scope_required"
Field Value
Properties
Name
Gets the stable name of the constraint.
public string Name { get; }
Property Value
Methods
EvaluateAsync(GovernanceEvaluationContext, CancellationToken)
Evaluates the constraint for the supplied context.
public ValueTask<ConstraintEvaluationResult> EvaluateAsync(GovernanceEvaluationContext context, CancellationToken cancellationToken = default)
Parameters
contextGovernanceEvaluationContextThe context to evaluate.
cancellationTokenCancellationTokenA token that can cancel asynchronous evaluation.
Returns
- ValueTask<ConstraintEvaluationResult>
The constraint evaluation result.