Pipeline - eduardosbcabral/pipelineRD GitHub Wiki
Instantiating
We can choose between some options to use the Pipeline class.
- You can call directly in the constructor using dependency injection.
public PipelineExample(IPipeline<ContextExample> pipeline)
{
// ...
}
- Or we have a 'helper' implementation that you can use by just calling the interface
IPipelineInitializer
.
public PipelineExample(IPipelineInitializer<ContextExample> pipelineInitializer)
{
// ...
}
When using in this way, it is possible to implement a pipeline with a external request key by calling the method Initializer
and passing the value.
// Without request key
PipelineInitializer.Initialize();
// With external request key
PipelineInitializer.Initialize(requestKey);
- But if you really need to see the real implementation it is possible to use like this
new Pipeline(serviceProvider, optionalRequestKey);