Repository navigation
Release v23.4.0
Command, query, policy and validation contexts can now read the values a model provides with provide, resolved lazily and once per request.
Added
QueryContext.Values,AuthorizationPolicyContext.Valuesandcontext.Values()on the FluentValidation context read provided values by name, such ascontext.Values.Vessel.ProvidedValuesgives the asynchronous and typed reads, andValuesAs<T>()reads them as a typed payload. A command reads them throughCommandContext.ProvidedValuesandValuesAs<T>(), becauseCommandContext.Valuesalready holds the values of the command pipeline. (#3833)IContextValueSource, registered byAddArcAvailabilityon the Choreography engine and on the request's availability context, so gates, handlers, performers, policies and rules in one request share one value and a second request resolves again. (#3833)- An absent value reads as unknown (
null), a required value that is absent throwsRequiredContextValueAbsentException, and a failure to resolve throwsContextValueUnavailableException, which command and query results report as a retryable error, never a denial. (#3833) - Documentation: https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/context-values.md (#3833)