1616 description : "The path of the output file" ) ,
1717
1818 new Option < Game > (
19- name : "-- game",
19+ aliases : [ "-g" , "-- game"] ,
2020 description : "The game of the files" ,
2121 getDefaultValue : ( ) => Game . Legend ) ,
2222
2323 new Option < Endianness > (
24- name : "-- endianness",
24+ aliases : [ "-e" , "-- endianness"] ,
2525 description : "The endianness of the files" ,
2626 getDefaultValue : ( ) => Endianness . LittleEndian ) ,
2727
2828 new Option < string > (
29- name : "-- pattern",
29+ aliases : [ "-p" , "-- pattern"] ,
3030 description : "The pattern of the archives to scan" ,
3131 getDefaultValue : ( ) => "*.000" ) ,
3232
33- new Option < OutputFormat > (
34- name : "--output -format",
33+ new Option < Format > (
34+ aliases : [ "-f" , "- -format"] ,
3535 description : "The format to output the data in" ,
36- getDefaultValue : ( ) => OutputFormat . Text ) ,
36+ getDefaultValue : ( ) => Format . Text ) ,
3737} ;
3838
3939command . Handler = CommandHandler . Create ( Execute ) ;
4242await command . InvokeAsync ( args ) ;
4343
4444static void Execute (
45- DirectoryInfo path , FileInfo output , Game game , Endianness endianness , string pattern , OutputFormat outputFormat )
45+ DirectoryInfo path , FileInfo output , Game game , Endianness endianness , string pattern , Format format )
4646{
4747 List < ulong > hashes = [ ] ;
4848
@@ -71,13 +71,13 @@ static void Execute(
7171 }
7272
7373 // Write the output
74- switch ( outputFormat )
74+ switch ( format )
7575 {
76- case OutputFormat . Text :
76+ case Format . Text :
7777 File . WriteAllLines ( output . FullName , hashes . Select ( hash => hash . ToString ( "X8" ) ) ) ;
7878
7979 break ;
80- case OutputFormat . Json :
80+ case Format . Json :
8181 File . WriteAllText ( output . FullName , JsonSerializer . Serialize ( hashes ) ) ;
8282
8383 break ;
@@ -102,7 +102,7 @@ enum Game
102102 Tiger
103103}
104104
105- enum OutputFormat
105+ enum Format
106106{
107107 Text ,
108108 Json
0 commit comments