@@ -5,33 +5,37 @@ class Program
55{
66 static async Task < int > Main ( string [ ] args )
77 {
8- var ixmlOption = new Option < DirectoryInfo ? > (
9- name : "--ixml" ,
10- description : "The path to the IntelliSense XML files generated by the compiler." )
11- { IsRequired = true } ;
8+ var ixmlOption = new Option < DirectoryInfo ? > ( "--isenseDir" )
9+ {
10+ Required = true ,
11+ Description = "The path to the IntelliSense XML files generated by the compiler."
12+ } ;
1213
13- var ecmaxmlOption = new Option < DirectoryInfo ? > (
14- name : "--ecmaxml" ,
15- description : "The path to the ECMAXML files from the docs repo." )
16- { IsRequired = true } ;
14+ var ecmaxmlOption = new Option < DirectoryInfo ? > ( "--ecmaxmlDir" )
15+ {
16+ Required = true ,
17+ Description = "The path to the ECMAXML files from the docs repo."
18+ } ;
1719
1820 var rootCommand = new RootCommand ( "IntelliSense XML <-> ECMAXML doc comment resolver app" ) ;
19- rootCommand . AddOption ( ixmlOption ) ;
20- rootCommand . AddOption ( ecmaxmlOption ) ;
21+ rootCommand . Options . Add ( ixmlOption ) ;
22+ rootCommand . Options . Add ( ecmaxmlOption ) ;
2123
22- rootCommand . SetHandler ( ( ixmlDir , ecmaxmlDir ) =>
24+ rootCommand . SetAction ( parseResult =>
2325 {
24- MergeAndAnnotate ( ixmlDir ! , ecmaxmlDir ! ) ;
25- } ,
26- ixmlOption , ecmaxmlOption ) ;
26+ DirectoryInfo intelliSenseDir = parseResult . GetValue < DirectoryInfo > ( "--isenseDir" ) ;
27+ DirectoryInfo ecmaxmlDir = parseResult . GetValue < DirectoryInfo > ( "--ecmaxmlDir" ) ;
28+
29+ MergeAndAnnotate ( intelliSenseDir , ecmaxmlDir ) ;
30+ } ) ;
2731
28- return await rootCommand . InvokeAsync ( args ) ;
32+ return rootCommand . Parse ( args ) . Invoke ( ) ;
2933 }
3034
3135 static void MergeAndAnnotate ( DirectoryInfo iXmlDir , DirectoryInfo ecmaxmlDir )
3236 {
3337 // Load all files
34- // For each member in the IntelliSense XML, see if there's non-emtpy text in ECMAXML.
38+ // For each member in the IntelliSense XML, see if there's non-empty text in ECMAXML.
3539 // If so, save both versions of the text in the IntelliSense XML object.
3640 // After the for each loop, write new XML for any namespaces
3741 // that have members with more than one copy of summary/returns/param etc.
@@ -43,4 +47,4 @@ static void MergeAndAnnotate(DirectoryInfo iXmlDir, DirectoryInfo ecmaxmlDir)
4347 checker . AddConflictMarkers ( ) ;
4448 checker . CleanUpFiles ( ) ;
4549 }
46- }
50+ }
0 commit comments