gtmoose32 / pipeline-framework Goto Github PK
View Code? Open in Web Editor NEWPipeline framework allows you to easily construct and execute linear workflows
License: MIT License
Pipeline framework allows you to easily construct and execute linear workflows
License: MIT License
Scenario:
Use scope lifetime components in a pipeline injected into an ASP.NET Controller
Result:
An InvalidOperationException is thrown because it tries to get the services from the root provider scope.
Root Cause:
I suspect this is because AddPipelineFramework
instantiates the ServiceProviderPipelineComponentResolver
as a singleton and thus it does not have access to create components with a Scoped lifetime.
Work Around:
Instead of calling AddPipelineFramework
in my Startup.cs
I manually called
services.AddScoped<IPipelineComponentResolver>(provider => new ServiceProviderPipelineComponentResolver(provider))
Suggested fix:
I think it may be appropriate to register IPipelineComponentResolver
with a Transient
lifetime.
Returning null from Async Pipeline Component results in a null reference exception on line 89 of AsyncPipeline.cs
var result = await component.ExecuteAsync(payload, cancellationToken).ConfigureAwait(false);
Work around if you return Task.FromResult(null) instead.
Describe the solution you'd like
perhaps just returning Task.CompletedTask would work?
Is your feature request related to a problem? Please describe.
I use some pipeline components that implement IDisposable because they use managed resources that implement IDisposable. In looking through the code, the pipelines do not implement IDisposable, therefore they don't dispose the components, either.
Describe the solution you'd like
Add an IDisposable implementation to PipelineBase`1 to allow deterministic finalization of transitive pipelines and their components.
Describe alternatives you've considered
I use injection, so the lifetime scope should dispose the components if registered individually in the container, but I would prefer a cleaner, definitive point-in-time when the
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.