Interface IPolicySimulator
- Namespace
- ReferenceApplication.Web.Governance.Simulation
- Assembly
- ReferenceApplication.Web.dll
Simulates the governance evaluation of a sample governed operation and reports each stage.
public interface IPolicySimulator
Properties
ConstraintNames
Gets the names of the registered constraints, in evaluation order.
IReadOnlyList<string> ConstraintNames { get; }
Property Value
Methods
SimulateAsync(HttpContext, PolicySimulationRequest, CancellationToken)
Simulates a governed request without persisting anything.
ValueTask<PolicySimulationOutcome> SimulateAsync(HttpContext requestContext, PolicySimulationRequest request, CancellationToken cancellationToken = default)
Parameters
requestContextHttpContextThe simulator request, whose signed-in actor the simulation starts from.
requestPolicySimulationRequestThe simulation inputs.
cancellationTokenCancellationTokenA token that cancels the simulation.
Returns
- ValueTask<PolicySimulationOutcome>
The stage-by-stage result, or the reason the request could not be simulated.