Interface IPipelineBuilder
Fluent builder for configuring message processing pipelines.
public interface IPipelineBuilder
- Extension Methods
Properties
Name
Gets the name of this pipeline builder.
string Name { get; }
Property Value
- string
The name assigned to the pipeline builder.
Methods
Build()
Builds the configured pipeline.
IDispatchPipeline Build()
Returns
- IDispatchPipeline
The built dispatch pipeline.
Clear()
Clears all configured middleware from the pipeline.
IPipelineBuilder Clear()
Returns
- IPipelineBuilder
The pipeline builder for method chaining.
ForMessageKinds(MessageKinds)
Configures which message kinds this pipeline should process.
IPipelineBuilder ForMessageKinds(MessageKinds messageKinds)
Parameters
messageKindsMessageKindsThe message kinds to process.
Returns
- IPipelineBuilder
The pipeline builder for method chaining.
Use(Func<IServiceProvider, IDispatchMiddleware>)
Adds middleware using a factory function to the pipeline.
IPipelineBuilder Use(Func<IServiceProvider, IDispatchMiddleware> middlewareFactory)
Parameters
middlewareFactoryFunc<IServiceProvider, IDispatchMiddleware>The middleware factory function.
Returns
- IPipelineBuilder
The pipeline builder for method chaining.
UseAt<TMiddleware>(DispatchMiddlewareStage)
Adds middleware of the specified type at a specific stage in the pipeline.
IPipelineBuilder UseAt<TMiddleware>(DispatchMiddlewareStage stage) where TMiddleware : IDispatchMiddleware
Parameters
stageDispatchMiddlewareStageThe stage where the middleware should be inserted.
Returns
- IPipelineBuilder
The pipeline builder for method chaining.
Type Parameters
TMiddlewareThe middleware type. Its public constructors are preserved under trimming so the pipeline can activate it and inspect its dependencies.
UseProfile(IPipelineProfile)
Uses a pipeline profile with predefined middleware configuration.
IPipelineBuilder UseProfile(IPipelineProfile profile)
Parameters
profileIPipelineProfileThe profile to use.
Returns
- IPipelineBuilder
The pipeline builder for method chaining.
UseProfile(string)
Uses a named pipeline profile with predefined middleware configuration.
IPipelineBuilder UseProfile(string profileName)
Parameters
profileNamestringThe name of the profile to use.
Returns
- IPipelineBuilder
The pipeline builder for method chaining.
UseWhen<TMiddleware>(Func<IServiceProvider, bool>)
Conditionally adds middleware of the specified type to the pipeline.
IPipelineBuilder UseWhen<TMiddleware>(Func<IServiceProvider, bool> condition) where TMiddleware : IDispatchMiddleware
Parameters
conditionFunc<IServiceProvider, bool>The condition function that determines if middleware should be added.
Returns
- IPipelineBuilder
The pipeline builder for method chaining.
Type Parameters
TMiddlewareThe middleware type. Its public constructors are preserved under trimming so the pipeline can activate it and inspect its dependencies.
Use<TMiddleware>()
Adds middleware of the specified type to the pipeline.
IPipelineBuilder Use<TMiddleware>() where TMiddleware : IDispatchMiddleware
Returns
- IPipelineBuilder
The pipeline builder for method chaining.
Type Parameters
TMiddlewareThe middleware type. Its public constructors are preserved under trimming so the pipeline can activate it and inspect its dependencies.