-
Notifications
You must be signed in to change notification settings - Fork 7
Dependency Injection
Marty Mathis edited this page Aug 27, 2020
·
11 revisions
Pipeline Framework now supports Microsoft Dependency Injection through an extensions package, PipelineFramework.Extensions.Microsoft.DependencyInjection.
Example usage:
var services = new ServiceCollection();
services
.AddPipelineFramework()
.AddAsyncPipeline<ExamplePipelinePayload, ExecutionStatusReceiver>(
cfg => cfg
.WithComponent<FooComponent>()
.WithComponent<DelayComponent>()
.WithComponent<BarComponent>(),
settings);
var provider = services.BuildServiceProvider();
var pipeline = provider.GetService<IAsyncPipeline<ExamplePipelinePayload>>();
Previous versions of Pipeline Framework supported a few popular DI containers. If you are interested in potentially using this, check out the repository here.