@@ -289,7 +289,7 @@ void CallConfigurationMethods(ILookup<string, Dictionary<string, IConfigurationA
289
289
var methodInfo = SelectConfigurationMethod ( configurationMethods , method . Key , method . Value . Keys ) ;
290
290
291
291
if ( methodInfo != null )
292
- {
292
+ {
293
293
var call = ( from p in methodInfo . GetParameters ( ) . Skip ( 1 )
294
294
let directive = method . Value . FirstOrDefault ( s => ParameterNameMatches ( p . Name , s . Key ) )
295
295
select directive . Key == null
@@ -298,9 +298,9 @@ void CallConfigurationMethods(ILookup<string, Dictionary<string, IConfigurationA
298
298
299
299
call . Insert ( 0 , receiver ) ;
300
300
methodInfo . Invoke ( null , call . ToArray ( ) ) ;
301
+ }
301
302
}
302
- }
303
- }
303
+ }
304
304
305
305
static bool HasImplicitValueWhenNotSpecified ( ParameterInfo paramInfo )
306
306
{
@@ -318,19 +318,19 @@ object GetImplicitValueForNotSpecifiedKey(ParameterInfo parameter, MethodInfo me
318
318
}
319
319
320
320
if ( parameter . ParameterType == typeof ( IConfiguration ) )
321
- {
321
+ {
322
322
if ( _resolutionContext . HasAppConfiguration )
323
- {
323
+ {
324
324
return _resolutionContext . AppConfiguration ;
325
325
}
326
326
if ( parameter . HasDefaultValue )
327
- {
327
+ {
328
328
return parameter . DefaultValue ;
329
329
}
330
330
331
- throw new InvalidOperationException ( "Trying to invoke a configuration method accepting a `IConfiguration` argument. " +
331
+ throw new InvalidOperationException ( "Trying to invoke a configuration method accepting a `IConfiguration` argument. " +
332
332
$ "This is not supported when only a `IConfigSection` has been provided. (method '{ methodToInvoke } ')") ;
333
- }
333
+ }
334
334
335
335
return parameter . DefaultValue ;
336
336
}
0 commit comments