Table of Contents

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

Result PolicySimulationResult

The simulation result, when the request was valid.

Error string

The 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

string

Result

The simulation result, when the request was valid.

public PolicySimulationResult? Result { get; init; }

Property Value

PolicySimulationResult

Methods

Invalid(string)

Creates an outcome for a request that could not be simulated.

public static PolicySimulationOutcome Invalid(string error)

Parameters

error string

The reason.

Returns

PolicySimulationOutcome

The failed outcome.