1- ![ GitHub] ( https://img.shields.io/github/license/jacopowolf/stackinjector?style=flat-square )
2- ![ GitHub contributors] ( https://img.shields.io/github/contributors-anon/jacopowolf/stackinjector?color=informational&style=flat-square )
3- ![ Maintenance] ( https://img.shields.io/maintenance/yes/2020?style=flat-square )
4- ![ GitHub open bug issues] ( https://img.shields.io/github/issues/jacopowolf/stackinjector/bug?style=flat-square )
5- [ ![ Nuget] ( https://img.shields.io/nuget/vpre/StackInjector?logo=nuget&style=flat-square )] ( https://www.nuget.org/packages/StackInjector )
6- [ ![ Nuget] ( https://img.shields.io/nuget/dt/StackInjector?logo=nuget&style=flat-square )] ( https://www.nuget.org/packages/StackInjector )
7-
8-
9-
101<br />
112<p align =" center " >
12- <img src =" logo/StackInjector_logo.svg " height =" 128 " />
3+ <img src =" logo/StackInjector_logo.svg " height =" 96 " />
134</p >
145
156<h1 align =" center " >Stack Injector</h1 >
167
8+
179<p align =" center " >
18- <img src =" https://img.shields.io/badge/-Standard_2.1-5C2D91?logo=.net&style=for-the-badge " />
19- <img src =" https://img.shields.io/badge/-8.0-239120?logo=c-sharp&style=for-the-badge " />
20- <img src =" https://img.shields.io/badge/made%20with-%E2%99%A5-FF69B4?style=for-the-badge " />
21- <br ><br >
22- Simple, Easy-to-use and Fast dependency injection<br >
23- <strong ><a href =" https://github.com/JacopoWolf/StackInjector/wiki " >Documentation »<a ></strong >
24- <br ><br >
10+ Modern, easy-to-use and fast dependency injection framework.<br ><br >
11+ <strong ><a href =" https://github.com/JacopoWolf/StackInjector/wiki " >Documentation<a ></strong >
12+ <br >
2513<a href =" https://www.nuget.org/packages/StackInjector " >Download</a >
2614·
2715<a href =" https://github.com/JacopoWolf/StackInjector/issues/new/choose " >Report Bug</a >
@@ -30,6 +18,21 @@ Simple, Easy-to-use and Fast dependency injection<br>
3018</p >
3119
3220
21+ ---
22+
23+
24+ <p align =center >
25+ <img src =" https://img.shields.io/github/license/jacopowolf/stackinjector " >
26+ <img src =" https://img.shields.io/maintenance/yes/2020 " >
27+ <img src =" https://img.shields.io/github/issues/jacopowolf/stackinjector/bug " >
28+ <img src =" https://img.shields.io/nuget/dt/StackInjector?logo=nuget " >
29+ <br >
30+ <img src =" https://img.shields.io/badge/-Standard_2.1-5C2D91?logo=.net " />
31+ <img src =" https://img.shields.io/badge/-8.0-239120?logo=c-sharp " />
32+ <img src =" https://img.shields.io/nuget/vpre/StackInjector?label= " >
33+ </p >
34+
35+
3336
3437---
3538
@@ -81,8 +84,7 @@ interface IFooFilter
8184``` cs
8285using StackInjector .Attributes ;
8386
84- // you can optionally specify a version for your service implementation!
85- [Service (Version = 1 . 0 )]
87+ [Service ]
8688class SimpleFooFilter : IFooFilter
8789{
8890 // by default settings, you have to explicitly annotate with [Served]
@@ -113,37 +115,36 @@ You then have multiple options on how to initialize your application, and every
113115
114116** synchronous**
115117
116- use a delegate
117- ``` cs
118- Injector .From <IMyAppEntryPoint >().Start ( app => app .Work () );
119- ```
120- or just get the instance of the entry point
118+ a simple call to a static method and you're done!
121119``` cs
122- Injector .From <IMyAppEntryPoint >().Entry .Work ();
120+ // call DoWork() on a dependency-injected instance of IMyAppEntryPoint
121+ Injector .From <IMyAppEntryPoint >().Entry .DoWork ();
123122```
124123
125124** asynchronous**
125+
126+ with C# 8's asynchronous enumerables waiting for task to complete is really this easy!
127+
126128``` cs
127- // the using keyword allows for safe disposing of the resources
128- using var app = Injector .AsyncFrom <IMyAsyncAppEntryPoint >( (e ,i ,t ) => e .Elaborate (i ,t ) );
129+ // the " using" keyword allows for safe disposing of the resources
130+ using var app = Injector .AsyncFrom <IMyAsyncAppEntryPoint >( (e ,i ,t ) => e .AsyncWork (i ,t ) );
129131
130- // can be called from anywhere and guarantee consistency
131- app .Submit ( someInput );
132+ // can be called from anywhere
133+ app .Submit ( " someInput" );
132134
133135// waiting for completed tasks is this simple
134136await foreach ( var result in app .Elaborated () )
135137 Console .WriteLine ( result );
136138```
137139
138140
139-
140141## Contributing
141142
142143Any contribution is appreciated! Especially bug reports, which mean you've been using this library I've been hard working on!
143144
144145But first read [ contributing] ( CONTRIBUTING.md ) and [ code of conduct] ( CODE_OF_CONDUCT.md ) (I promise they're short)
145146
146- * suggested editor: ![ visualStudio] ( https://img.shields.io/badge/-Visual_Studio-5C2D91?logo=visual-studio&style=flat-square ) *
147+ * suggested editor: ![ visualStudio] ( https://img.shields.io/badge/-Visual_Studio-5C2D91?logo=visual-studio ) *
147148
148149
149150
0 commit comments