Code Monkey home page Code Monkey logo

pipeline-framework's People

Contributors

andrewdmoreno avatar gtmoose32 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pipeline-framework's Issues

InvalidOperationException when using scoped components from ASP.NET Core Controller

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.

Implement IDisposable on pipelines

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.