Table of Contents

Class DecisionReplayServiceExtensions

Namespace
ReferenceApplication.Web.Extensions
Assembly
ReferenceApplication.Web.dll

Registers and maps the explicitly enabled, Development-only decision replay.

public static class DecisionReplayServiceExtensions
Inheritance
DecisionReplayServiceExtensions
Inherited Members

Fields

DecisionsPath

Gets the route that lists persisted decisions and, with a receipt identifier, finds one.

public const string DecisionsPath = "/api/v1/decision-replay/decisions"

Field Value

string

Methods

AddApplicationDecisionReplay(IServiceCollection, IConfiguration, IHostEnvironment)

Registers decision replay only when its switch is enabled in Development.

public static IServiceCollection AddApplicationDecisionReplay(this IServiceCollection services, IConfiguration configuration, IHostEnvironment environment)

Parameters

services IServiceCollection

The service collection to configure.

configuration IConfiguration

The application configuration.

environment IHostEnvironment

The host environment.

Returns

IServiceCollection

The same service collection so calls can be chained.

Remarks

Call after AddApplicationAsiBackbone, AddApplicationGovernanceEvidence, and AddApplicationCapabilityTokens: replay reads the ledger and composes the constraints, decision policy, and capability validator they register.

IsActive(IConfiguration, IHostEnvironment)

Determines whether the feature switch is enabled in the Development environment.

public static bool IsActive(IConfiguration configuration, IHostEnvironment environment)

Parameters

configuration IConfiguration

The application configuration.

environment IHostEnvironment

The host environment.

Returns

bool

true when decision replay is active.

MapApplicationDecisionReplay(WebApplication)

Maps the administrator-only replay routes only when decision replay is active in Development.

public static WebApplication MapApplicationDecisionReplay(this WebApplication app)

Parameters

app WebApplication

The application.

Returns

WebApplication

The same application so calls can be chained.