Class PolicySimulationOutcome
- Namespace
- ReferenceApplication.Web.Governance.Simulation
- Assembly
- ReferenceApplication.Web.dll
Carries either a simulation result or the reason the request could not be simulated.
public sealed record PolicySimulationOutcome : IEquatable<PolicySimulationOutcome>
- Inheritance
-
PolicySimulationOutcome
- Implements
- Inherited Members
Constructors
PolicySimulationOutcome(PolicySimulationResult?, string?)
Carries either a simulation result or the reason the request could not be simulated.
public PolicySimulationOutcome(PolicySimulationResult? Result, string? Error)
Parameters
ResultPolicySimulationResultThe simulation result, when the request was valid.
ErrorstringThe reason the request could not be simulated, when it was not.
Properties
Error
The reason the request could not be simulated, when it was not.
public string? Error { get; init; }
Property Value
Result
The simulation result, when the request was valid.
public PolicySimulationResult? Result { get; init; }
Property Value
Methods
Invalid(string)
Creates an outcome for a request that could not be simulated.
public static PolicySimulationOutcome Invalid(string error)
Parameters
errorstringThe reason.
Returns
- PolicySimulationOutcome
The failed outcome.