@@ -61,8 +61,8 @@ protected virtual List<object> GetMethodParameters(string[] args, int cmdlineSta
6161 for ( int i = parmsStartIndex ; i < parms . Length ; i ++ )
6262 {
6363 ParameterInfo parm = parms [ i ] ;
64- if ( options . Keys . Contains ( parm . Name . ToLower ( ) ) )
65- parameters . Add ( ParseInput ( options [ parm . Name . ToLower ( ) ] , parm . ParameterType ) ) ;
64+ if ( options . Keys . Contains ( parm . Name ) ) //.ToLower( )
65+ parameters . Add ( ParseInput ( options [ parm . Name ] , parm . ParameterType ) ) ; //.ToLower()
6666 else
6767 parameters . Add ( null ) ;
6868 }
@@ -73,7 +73,7 @@ protected virtual List<object> GetMethodParameters(string[] args, int cmdlineSta
7373
7474 protected virtual Dictionary < string , string > ParseCmdLine ( string [ ] args , int startIndex , ref bool error , bool suppressErrorMessages = false )
7575 {
76- Dictionary < string , string > options = new Dictionary < string , string > ( ) ;
76+ Dictionary < string , string > options = new Dictionary < string , string > ( StringComparer . OrdinalIgnoreCase ) ;
7777
7878 if ( args . Length < ( startIndex + 1 ) )
7979 {
@@ -90,7 +90,7 @@ protected virtual Dictionary<string, string> ParseCmdLine(string[] args, int sta
9090
9191 // If match not found, command line args are improperly formed.
9292 if ( match . Success )
93- options [ match . Groups [ "argname" ] . Value . ToLower ( ) ] = match . Groups [ "argvalue" ] . Value ; //.ToLower();
93+ options [ match . Groups [ "argname" ] . Value ] = match . Groups [ "argvalue" ] . Value ; //.ToLower();.ToLower()
9494 else if ( ! suppressErrorMessages )
9595 WriteHelpAndExit ( "The command line arguments are not valid or are improperly formed. Use 'argname:argvalue' for extended arguments." ) ;
9696 }
@@ -231,7 +231,7 @@ public class CmdLineUtilities
231231 {
232232 public static Dictionary < string , string > ParseCmdLine ( string [ ] args , int startIndex , ref bool error , ref string message , Action < string > onErrorMethod , bool suppressErrorMessages = false )
233233 {
234- Dictionary < string , string > options = new Dictionary < string , string > ( ) ;
234+ Dictionary < string , string > options = new Dictionary < string , string > ( StringComparer . OrdinalIgnoreCase ) ;
235235
236236 if ( args . Length < ( startIndex + 1 ) )
237237 {
@@ -250,7 +250,7 @@ public static Dictionary<string, string> ParseCmdLine(string[] args, int startIn
250250 // If match not found, command line args are improperly formed.
251251 if ( match . Success )
252252 {
253- options [ match . Groups [ "argname" ] . Value . ToLower ( ) ] = match . Groups [ "argvalue" ] . Value . ToLower ( ) ;
253+ options [ match . Groups [ "argname" ] . Value ] = match . Groups [ "argvalue" ] . Value ; // .ToLower();.ToLower()
254254 }
255255 else
256256 {
0 commit comments