File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Licensed to the .NET Foundation under one or more agreements.
2
+ // The .NET Foundation licenses this file to you under the MIT license.
3
+
4
+ using System . CommandLine ;
5
+ using Microsoft . DotNet . Cli . Commands . Tool ;
6
+ using Microsoft . DotNet . Cli . Commands . Tool . Execute ;
7
+
8
+ namespace Microsoft . DotNet . Cli . Commands . Dnx ;
9
+
10
+ internal static class DnxCommandParser
11
+ {
12
+ public static readonly Command Command = ConstructCommand ( ) ;
13
+ public static Command GetCommand ( )
14
+ {
15
+ return Command ;
16
+ }
17
+
18
+ private static Command ConstructCommand ( )
19
+ {
20
+ Command command = new ( "dnx" , CliCommandStrings . ToolExecuteCommandDescription ) ;
21
+ command . Hidden = true ;
22
+
23
+ foreach ( var argument in ToolExecuteCommandParser . Command . Arguments )
24
+ {
25
+ command . Arguments . Add ( argument ) ;
26
+ }
27
+
28
+ foreach ( var option in ToolExecuteCommandParser . Command . Options )
29
+ {
30
+ command . Options . Add ( option ) ;
31
+ }
32
+
33
+ command . SetAction ( ( parseResult ) => new ToolExecuteCommand ( parseResult ) . Execute ( ) ) ;
34
+
35
+ return command ;
36
+ }
37
+ }
Original file line number Diff line number Diff line change 9
9
using Microsoft . DotNet . Cli . Commands . Build ;
10
10
using Microsoft . DotNet . Cli . Commands . BuildServer ;
11
11
using Microsoft . DotNet . Cli . Commands . Clean ;
12
+ using Microsoft . DotNet . Cli . Commands . Dnx ;
12
13
using Microsoft . DotNet . Cli . Commands . Format ;
13
14
using Microsoft . DotNet . Cli . Commands . Fsi ;
14
15
using Microsoft . DotNet . Cli . Commands . Help ;
@@ -65,6 +66,7 @@ public static class Parser
65
66
BuildCommandParser . GetCommand ( ) ,
66
67
BuildServerCommandParser . GetCommand ( ) ,
67
68
CleanCommandParser . GetCommand ( ) ,
69
+ DnxCommandParser . GetCommand ( ) ,
68
70
FormatCommandParser . GetCommand ( ) ,
69
71
CompleteCommandParser . GetCommand ( ) ,
70
72
FsiCommandParser . GetCommand ( ) ,
You can’t perform that action at this time.
0 commit comments