Class ProtectedDecisionServiceCollectionExtensions
- Namespace
- Cratis.Arc.DependencyInjection
- Assembly
- Cratis.Arc.Core.dll
Opts Microsoft DI into fresh, provider-bound construction of protected decision validators.
public static class ProtectedDecisionServiceCollectionExtensions
- Inheritance
-
ProtectedDecisionServiceCollectionExtensions
- Inherited Members
Methods
AddProtectedDecisionValidator<TValidator>(IServiceCollection, Action<TValidator>)
Registers fresh Arc construction followed by configuration of that exact validator instance.
public static IServiceCollection AddProtectedDecisionValidator<TValidator>(this IServiceCollection services, Action<TValidator> configure) where TValidator : class, IValidator
Parameters
servicesIServiceCollectionThe original service collection.
configureAction<TValidator>Trusted application code run once after construction and before certification.
Returns
- IServiceCollection
The service collection for continuation.
Type Parameters
TValidatorThe discoverable validator to configure.
Remarks
Removes at most one Arc convention binding, never an application registration. The protected path requires an attested native scope, complete inspectable transient dependencies and an untrimmed JIT runtime. Ordinary DI resolution cannot construct this registration during a protected invocation.
BuildProtectedDecisionServiceProvider(IServiceCollection, ServiceProviderOptions?)
Builds the root through Arc's native-provider factory. Execute protected validation in a child scope.
public static IServiceProvider BuildProtectedDecisionServiceProvider(this IServiceCollection services, ServiceProviderOptions? options = null)
Parameters
servicesIServiceCollectionThe original service collection, including Arc and Chronicle registrations.
optionsServiceProviderOptionsMicrosoft DI options, copied by the factory.
Returns
- IServiceProvider
The native Microsoft root provider, owned by the caller.