Commit 1dd3bb4
committed
Repurpose older [Service<T>] to allow specifying a service type
We add an analyzer that will flag the previous usage as an error (requiring the removal of the T or setting it to the actual service to register). This should prevent bumps and rebuilds without notice.
Since the attributes don't have run-time impact but are rather purely compile-time, bumping but not building (i.e. via a transitive dependency, say or direct copying), would not cause runtime failures because the registrations in the previously compile assembly would remain as they were.
This unlocks a very useful scenario to trim down the amount of registered interfaces.
Fixes #2811 parent b895271 commit 1dd3bb4
File tree
10 files changed
+212
-50
lines changed- src
- DependencyInjection.Tests
- DependencyInjection
- Properties
- compile
10 files changed
+212
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
87 | 102 | | |
88 | 103 | | |
89 | 104 | | |
| |||
156 | 171 | | |
157 | 172 | | |
158 | 173 | | |
| 174 | + | |
159 | 175 | | |
160 | 176 | | |
161 | 177 | | |
| |||
180 | 196 | | |
181 | 197 | | |
182 | 198 | | |
183 | | - | |
| 199 | + | |
| 200 | + | |
184 | 201 | | |
185 | 202 | | |
186 | 203 | | |
| |||
262 | 279 | | |
263 | 280 | | |
264 | 281 | | |
265 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
266 | 285 | | |
267 | | - | |
| 286 | + | |
268 | 287 | | |
269 | 288 | | |
270 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
275 | 286 | | |
276 | 287 | | |
277 | 288 | | |
| |||
380 | 391 | | |
381 | 392 | | |
382 | 393 | | |
| 394 | + | |
383 | 395 | | |
384 | | - | |
385 | | - | |
386 | | - | |
| 396 | + | |
387 | 397 | | |
388 | 398 | | |
389 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
390 | 409 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | | - | |
| 21 | + | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
0 commit comments