Skip to content
This repository was archived by the owner on Feb 14, 2022. It is now read-only.

Commit be1ddae

Browse files
authored
Merge branch 'rel/3.1' into dev/3.1
2 parents 0d7f55e + bd3a1ed commit be1ddae

2 files changed

Lines changed: 41 additions & 37 deletions

File tree

.github/dependabot.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
version: 2
77
updates:
88

9-
# root dependencies
9+
10+
# prod
1011
- package-ecosystem: "nuget"
1112
directory: "/StackInjector"
1213
schedule:
@@ -15,8 +16,8 @@ updates:
1516
labels:
1617
- "dependencies"
1718

18-
19-
# test dependencies
19+
20+
# test blackbox
2021
- package-ecosystem: "nuget"
2122
directory: "/tests/StackInjector.TEST.BlackBox"
2223
schedule:
@@ -26,8 +27,11 @@ updates:
2627
- "dependencies"
2728
- "testing"
2829

29-
30-
# github actions dependencies
30+
31+
#todo: add TEST.WhiteBox
32+
33+
34+
# ci
3135
- package-ecosystem: "github-actions"
3236
# Workflow files stored in the
3337
# default location of `.github/workflows`
@@ -37,6 +41,5 @@ updates:
3741
labels:
3842
- "dependencies"
3943
- "actions"
40-
open-pull-requests-limit: 1
4144

4245

README.md

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,15 @@
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
8285
using StackInjector.Attributes;
8386

84-
// you can optionally specify a version for your service implementation!
85-
[Service(Version=1.0)]
87+
[Service]
8688
class 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
134136
await foreach ( var result in app.Elaborated() )
135137
Console.WriteLine( result );
136138
```
137139

138140

139-
140141
## Contributing
141142

142143
Any contribution is appreciated! Especially bug reports, which mean you've been using this library I've been hard working on!
143144

144145
But 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

Comments
 (0)