-
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>>();
Pipeline Framework can be used with some popular .Net dependency injection (IOC) containers. If you are interested in using containers, check out the extension projects in their own repository, Pipeline Framework Dependency Injection.