Table of Contents

Class PipelineBuilderDefaultsExtensions

Namespace
Excalibur.Dispatch.Configuration
Assembly
Excalibur.Dispatch.dll

Extension methods for applying default middleware to a pipeline builder.

public static class PipelineBuilderDefaultsExtensions
Inheritance
PipelineBuilderDefaultsExtensions
Inherited Members

Methods

UseDefaults(IPipelineBuilder)

Adds sensible default middleware to the pipeline in the recommended order: validation, logging, timeout, retry, and exception mapping.

public static IPipelineBuilder UseDefaults(this IPipelineBuilder builder)

Parameters

builder IPipelineBuilder

The pipeline builder.

Returns

IPipelineBuilder

The pipeline builder for method chaining.

Remarks

This method provides a production-ready middleware stack with a single call. You can add additional middleware before or after this call:

dispatch.ConfigurePipeline("default", pipeline =>
{
    pipeline.UseDefaults();
    pipeline.Use<CustomMetricsMiddleware>();
});

The default middleware types must be registered in DI (e.g., via AddDispatchValidation()). Middleware that is not registered in DI will throw at pipeline build time.