@@ -14,8 +14,8 @@ namespace McMaster.Extensions.CommandLineUtils.Abstractions
1414 /// </summary>
1515 public class ValueParserProvider
1616 {
17- private readonly Dictionary < Type , IValueParser > _parsers = new Dictionary < Type , IValueParser > ( 10 ) ;
18- private readonly TypeDescriptorValueParserFactory _defaultValueParserFactory = new TypeDescriptorValueParserFactory ( ) ;
17+ private readonly Dictionary < Type , IValueParser > _parsers = new ( 10 ) ;
18+ private readonly TypeDescriptorValueParserFactory _defaultValueParserFactory = new ( ) ;
1919
2020 internal ValueParserProvider ( )
2121 {
@@ -48,7 +48,7 @@ internal ValueParserProvider()
4848 /// </remarks>
4949 public CultureInfo ParseCulture { get ; set ; } = CultureInfo . CurrentCulture ;
5050
51- private static readonly MethodInfo s_GetParserGeneric
51+ private static readonly MethodInfo s_getParserGeneric
5252 = typeof ( ValueParserProvider )
5353 . GetMethods ( BindingFlags . Instance | BindingFlags . Public )
5454 . Single ( m => m . Name == nameof ( GetParser ) && m . IsGenericMethod ) ;
@@ -60,7 +60,7 @@ private static readonly MethodInfo s_GetParserGeneric
6060 /// <returns></returns>
6161 public IValueParser GetParser ( Type type )
6262 {
63- var method = s_GetParserGeneric . MakeGenericMethod ( type ) ;
63+ var method = s_getParserGeneric . MakeGenericMethod ( type ) ;
6464 return ( IValueParser ) method . Invoke ( this , Util . EmptyArray < object > ( ) ) ;
6565 }
6666
@@ -221,9 +221,11 @@ public GenericParserAdapter(IValueParser inner)
221221
222222 public Type TargetType => _inner . TargetType ;
223223
224- public T Parse ( string ? argName , string ? value , CultureInfo culture ) => ( T ) _inner . Parse ( argName , value , culture ) ! ;
224+ public T Parse ( string ? argName , string ? value , CultureInfo culture )
225+ => ( T ) _inner . Parse ( argName , value , culture ) ! ;
225226
226- object ? IValueParser . Parse ( string ? argName , string ? value , CultureInfo culture ) => _inner . Parse ( argName , value , culture ) ;
227+ object ? IValueParser . Parse ( string ? argName , string ? value , CultureInfo culture )
228+ => _inner . Parse ( argName , value , culture ) ;
227229 }
228230 }
229231}
0 commit comments