VitreousOptions class
Namespace: Vitreous
Assembly: Vitreous.dll
Configuration options for the Vitreous mediator.
public sealed class VitreousOptionsInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties
Section titled “Properties”DefaultHandlerLifetime
Section titled “ DefaultHandlerLifetime”Default service lifetime for registered handlers.
Defaults to Scoped, which is safe for handlers that depend on
scoped services such as a DbContext. ISender and IPublisher are then
scoped too, so resolve them from a scope (minimal APIs and controllers do this automatically).
Use Singleton only when every handler is stateless and has no
scoped dependencies; the dispatcher is then a singleton as well.
public ServiceLifetime DefaultHandlerLifetime { get; set; }Property Value
Section titled “Property Value”NotificationPublishStrategy
Section titled “ NotificationPublishStrategy”Controls how notification handlers are invoked when Publish<TNotification> is called. Defaults to Sequential (fail-fast, in-order). Set to Parallel to fan-out all handlers concurrently and collect all exceptions as an AggregateException.
public NotificationPublishStrategy NotificationPublishStrategy { get; set; }