Commit e414105
authored
Remove Middleware (#2100)
* ParseResult.UnmatchedTokens should return an array, not IReadOnlyList<string> as it allows for less
* introduce new HostingAction to avoid using middleware in Hosting. It allows us for creating the host and everything else after parsing has finished
* UseCommandHandler must specify the handler for instance of a Command, not per type as there can be multiple commands of the same type
* don't use GetAwaiter().GetResult() to block, make the tests async
* remove Middleware1 parent 9ebcd90 commit e414105
File tree
25 files changed
+167
-751
lines changed- src
- System.CommandLine.ApiCompatibility.Tests
- System.CommandLine.DragonFruit
- System.CommandLine.Hosting.Tests
- System.CommandLine.Hosting
- System.CommandLine.NamingConventionBinder
- System.CommandLine.Rendering.Tests
- System.CommandLine.Rendering
- System.CommandLine.Tests
- Invocation
- System.CommandLine
- Builder
- Completions
- Invocation
- Parsing
25 files changed
+167
-751
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
Lines changed: 2 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
| |||
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
88 | | - | |
| 86 | + | |
89 | 87 | | |
90 | 88 | | |
91 | 89 | | |
| |||
142 | 140 | | |
143 | 141 | | |
144 | 142 | | |
145 | | - | |
| 143 | + | |
146 | 144 | | |
147 | 145 | | |
148 | 146 | | |
| |||
243 | 241 | | |
244 | 242 | | |
245 | 243 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | 244 | | |
257 | 245 | | |
258 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
| 113 | + | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
| |||
Lines changed: 12 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | | - | |
| 28 | + | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
| |||
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | | - | |
| 40 | + | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | | - | |
49 | | - | |
| 46 | + | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
63 | | - | |
64 | | - | |
| 60 | + | |
| 61 | + | |
65 | 62 | | |
66 | 63 | | |
67 | 64 | | |
| |||
71 | 68 | | |
72 | 69 | | |
73 | 70 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 71 | + | |
77 | 72 | | |
78 | 73 | | |
79 | 74 | | |
| |||
91 | 86 | | |
92 | 87 | | |
93 | 88 | | |
94 | | - | |
| 89 | + | |
95 | 90 | | |
96 | 91 | | |
97 | 92 | | |
98 | 93 | | |
99 | 94 | | |
100 | 95 | | |
101 | | - | |
102 | | - | |
| 96 | + | |
103 | 97 | | |
104 | 98 | | |
105 | 99 | | |
| |||
114 | 108 | | |
115 | 109 | | |
116 | 110 | | |
117 | | - | |
118 | | - | |
| 111 | + | |
| 112 | + | |
119 | 113 | | |
120 | 114 | | |
121 | 115 | | |
122 | 116 | | |
123 | 117 | | |
124 | | - | |
125 | | - | |
126 | | - | |
| 118 | + | |
127 | 119 | | |
128 | 120 | | |
129 | 121 | | |
| |||
0 commit comments