You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 14, 2022. It is now read-only.
@@ -43,7 +46,9 @@ Simple, fast and easy-to-use dependency injection
43
46
44
47
There are a lot of dependency injection frameworks for .NET, but every single one of them has some complicated specifics you have to learn (like active registration of components) and sometimes you don't really have full control of what to inject into your instances.
45
48
46
-
If you want to use an extremely easy dependency injection framework, then *StackInjector* is made for you!
49
+
If you want to use an extremely easy dependency injection framework, and also use the latest features the C# language has to offer, then *StackInjector* is made for you!
50
+
51
+
*Also ships with some nice settings presets to suit your coding style!*
47
52
48
53
49
54
## Installation
@@ -58,11 +63,11 @@ Or visit the [Nuget page](https://www.nuget.org/packages/StackInjector) for more
58
63
59
64
## Usage
60
65
61
-
In-depth tutorials and explanations can be found in the [wiki tutorials section](https://github.com/JacopoWolf/StackInjector/wiki/Tutorial_Introduction)
66
+
In-depth tutorials and explanations can be found in the repository's [Wiki](https://github.com/JacopoWolf/StackInjector/wiki)
62
67
63
68
---
64
69
65
-
Plan your components as **interfaces** and *implement* them!
70
+
You can plan your components as **interfaces** and *implement* them!
66
71
67
72
As clean as you can get!
68
73
@@ -80,13 +85,12 @@ using StackInjector.Attributes;
80
85
[Service(Version=1.0)]
81
86
classSimpleFooFilter : IFooFilter
82
87
{
83
-
//both fields and properties, to explicitly annotate with [Served]
84
-
//if you want them injected
88
+
//by default settings, you have to explicitly annotate with [Served]
89
+
//the properties or fields you want injected
85
90
86
91
[Served]
87
-
IDatabaseAccessdatabase { get; set; }
92
+
IDatabaseAccessDatabase { get; set; }
88
93
89
-
// works with properties too!
90
94
[Served]
91
95
IFooFilterfilter;
92
96
@@ -101,52 +105,36 @@ class SimpleFooFilter : IFooFilter
101
105
}
102
106
```
103
107
104
-
Everything **must**have an attribute, allowing for **extremely readable code** and for **granular control** over the injection process.
108
+
Everything **must**be explicit (`[Service]`,`[Served]` and `[Ignored]` attributes) allowing for **extremely readable code** and for **granular control** over the injection process.
105
109
106
110
---
107
111
108
-
You then have multiple options on how you want to initialize your application!
112
+
You then have multiple options on how to initialize your application, and every single one of them type-safe!
0 commit comments