Click or drag to resize

IComponentRegistryBuilderRegisterServiceMiddleware Method

Register a piece of service middleware that will be invoked for all registrations of a service when they are resolved.

Namespace:  Autofac.Core.Registration
Assembly:  Autofac (in Autofac.dll) Version: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
Syntax
void RegisterServiceMiddleware(
	Service service,
	IResolveMiddleware middleware,
	MiddlewareInsertionMode insertionMode = MiddlewareInsertionMode.EndOfPhase
)

Parameters

service
Type: Autofac.CoreService
The service to register middleware for.
middleware
Type: Autofac.Core.Resolving.PipelineIResolveMiddleware
The middleware to register.
insertionMode (Optional)
Type: Autofac.Core.Resolving.PipelineMiddlewareInsertionMode
The mode of insertion into the pipeline.
See Also