Skip to content

Release v23.4.0

Choose a tag to compare

@github-actions github-actions released this 13 Nov 01:07
99b990e

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.Values and context.Values() on the FluentValidation context read provided values by name, such as context.Values.Vessel. ProvidedValues gives the asynchronous and typed reads, and ValuesAs<T>() reads them as a typed payload. A command reads them through CommandContext.ProvidedValues and ValuesAs<T>(), because CommandContext.Values already holds the values of the command pipeline. (#3833)
  • IContextValueSource, registered by AddArcAvailability on 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 throws RequiredContextValueAbsentException, and a failure to resolve throws ContextValueUnavailableException, 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)