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
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
servicesIServiceCollectionThe service collection to configure.
configurationIConfigurationThe application configuration.
environmentIHostEnvironmentThe 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
configurationIConfigurationThe application configuration.
environmentIHostEnvironmentThe host environment.
Returns
MapApplicationDecisionReplay(WebApplication)
Maps the administrator-only replay routes only when decision replay is active in Development.
public static WebApplication MapApplicationDecisionReplay(this WebApplication app)
Parameters
appWebApplicationThe application.
Returns
- WebApplication
The same application so calls can be chained.