https://github.com/verticalsoftware/vertical-pipelines-dependencyinjection
Microsoft dependency injection configuration extensions
https://github.com/verticalsoftware/vertical-pipelines-dependencyinjection
Last synced: about 1 year ago
JSON representation
Microsoft dependency injection configuration extensions
- Host: GitHub
- URL: https://github.com/verticalsoftware/vertical-pipelines-dependencyinjection
- Owner: verticalsoftware
- License: mit
- Created: 2021-11-15T02:06:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-10T23:17:38.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T17:17:57.898Z (over 1 year ago)
- Language: C#
- Size: 3.61 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vertical-pipelines-dependencyinjection
Generic "middleware" pipelines.



[](https://github.com/verticalsoftware/vertical-pipelines-dependencyinjection/actions/workflows/dev-build.yml)
[](https://github.com/verticalsoftware/vertical-pipelines-dependencyinjection/actions/workflows/release.yml)
## Usage
### Install
```
$ dotnet add package vertical-pipelines-dependencyinjection -v 1.0.0
```
### Configure In Application Setup
```csharp
var serviceCollection = new ServiceCollection();
serviceCollection.ConfigurePipeline(app =>
{
app.Use((list, next, ct) =>
{
// Implementation
return next(list, ct);
});
// Register using function
app.UseMiddleware(serviceProvider => new MiddlewareA());
// Register using type
app.UseMiddleware();
});
var provider = serviceCollection.BuildServiceProvider();
using var scope = provider.CreateScope();
var context = new List();
var pipeline = scope.ServiceProvider.GetRequiredService>>();
await pipeline(context, CancellationToken.None);
```
## Issues, feedback, feature requests
File an issue [here](https://github.com/verticalsoftware/vertical-pipelines-dependencyinjection/issues).