@@ -119,7 +119,7 @@ protected ArgParser(String[] flagSymbols,
119119#endif
120120 if ( ( null == flagSymbols ) || ( 0 == flagSymbols . Length ) )
121121 {
122- throw new ArgumentException ( Constants . ArrayMustBeValid , " flagSymbols" ) ;
122+ throw new ArgumentException ( Constants . ArrayMustBeValid , nameof ( flagSymbols ) ) ;
123123 }
124124
125125 Debug . Assert ( null != switchChars , "null != switchChars" ) ;
@@ -133,7 +133,7 @@ protected ArgParser(String[] flagSymbols,
133133#endif
134134 if ( ( null == switchChars ) || ( 0 == switchChars . Length ) )
135135 {
136- throw new ArgumentException ( Constants . ArrayMustBeValid , " switchChars" ) ;
136+ throw new ArgumentException ( Constants . ArrayMustBeValid , nameof ( switchChars ) ) ;
137137 }
138138
139139 this . flagSymbols = flagSymbols ;
@@ -331,10 +331,7 @@ public Boolean Parse(String[] args)
331331 /// Every derived class must implement an OnSwitch method or a switch
332332 /// is considered an error.
333333 /// </remarks>
334- protected virtual SwitchStatus OnSwitch ( String switchSymbol , String switchValue )
335- {
336- return SwitchStatus . Error ;
337- }
334+ protected virtual SwitchStatus OnSwitch ( String switchSymbol , String switchValue ) => SwitchStatus . Error ;
338335
339336 /// <summary>
340337 /// Called when a non-switch value is parsed out.
@@ -345,10 +342,7 @@ protected virtual SwitchStatus OnSwitch(String switchSymbol, String switchValue)
345342 /// <returns>
346343 /// One of the <see cref="SwitchStatus"/> values.
347344 /// </returns>
348- protected virtual SwitchStatus OnNonSwitch ( String value )
349- {
350- return SwitchStatus . Error ;
351- }
345+ protected virtual SwitchStatus OnNonSwitch ( String value ) => SwitchStatus . Error ;
352346
353347 /// <summary>
354348 /// Called when parsing is finished so final sanity checking can be
@@ -357,11 +351,8 @@ protected virtual SwitchStatus OnNonSwitch(String value)
357351 /// <returns>
358352 /// One of the <see cref="SwitchStatus"/> values.
359353 /// </returns>
360- protected virtual SwitchStatus OnDoneParse ( )
361- {
362- // By default, we'll assume that all parsing was an error.
363- return SwitchStatus . Error ;
364- }
354+ // By default, we'll assume that all parsing was an error.
355+ protected virtual SwitchStatus OnDoneParse ( ) => SwitchStatus . Error ;
365356
366357 /// <summary>
367358 /// Looks to see if the switch is in the array.
0 commit comments