2
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
4
4
using System . CommandLine . Binding ;
5
+ using System . Diagnostics . CodeAnalysis ;
5
6
using System . Reflection ;
6
7
using System . Threading . Tasks ;
7
8
@@ -139,6 +140,7 @@ public static ICommandHandler Create<T1, T2, T3, T4, T5, T6, T7>(
139
140
Func < T1 , T2 , T3 , T4 , T5 , T6 , T7 , Task < int > > action ) =>
140
141
HandlerDescriptor . FromDelegate ( action ) . GetCommandHandler ( ) ;
141
142
143
+
142
144
public static ICommandHandler Create < T1 , T2 , T3 > (
143
145
IValueDescriptor < T1 > symbol1 ,
144
146
IValueDescriptor < T2 > symbol2 ,
@@ -148,9 +150,9 @@ public static ICommandHandler Create<T1, T2, T3>(
148
150
return new AnonymousCommandHandler ( async context =>
149
151
{
150
152
await handle (
151
- context . ParseResult . ValueFor ( symbol1 ) ,
152
- context . ParseResult . ValueFor ( symbol2 ) ,
153
- context . ParseResult . ValueFor ( symbol3 ) ) ;
153
+ context . ParseResult . ValueFor ( symbol1 ) ! ,
154
+ context . ParseResult . ValueFor ( symbol2 ) ! ,
155
+ context . ParseResult . ValueFor ( symbol3 ) ! ) ;
154
156
} ) ;
155
157
}
156
158
0 commit comments