예제 #1
0
 private IParameter[] ModifyParameters(Type serviceKey, IBinding binding, InjectionParameter[] parameters)
 {
     if (parameters == null || parameters.Length == 0)
     {
         return null;
     }
     Type resolvedType = null;
     return
         parameters.Select(
             p => string.IsNullOrEmpty(p.Key) ? ResolveParameterName(serviceKey, binding, ref resolvedType, p) : new ConstructorArgument(p.Key, p.Value))
             .ToArray();
 }
예제 #2
0
 private ResolverOverride[] ModifyParameters(Type serviceKey, ContainerRegistration registration,
     InjectionParameter[] parameters)
 {
     if (parameters == null || parameters.Length == 0)
     {
         return null;
     }
     Type resolvedType = null;
     return
         parameters.Select(
             p =>
                 string.IsNullOrEmpty(p.Key)
                     ? ResolveParameterName(serviceKey, registration, ref resolvedType, p)
                     : new ParameterOverride(p.Key, p.Value))
             .ToArray();
 }