public override IWeldInjetionPoint TranslateGenericArguments(IComponent component, IDictionary <Type, Type> translations)
 {
     if (IsConstructor)
     {
         var ctor = (ConstructorInfo)_param.Member;
         ctor = GenericUtils.TranslateConstructorGenericArguments(ctor, translations);
         var param = ctor.GetParameters()[_param.Position];
         return(new MethodParameterInjectionPoint(component, param, Binders.ToArray()));
     }
     else
     {
         var method = (MethodInfo)_param.Member;
         method = GenericUtils.TranslateMethodGenericArguments(method, translations);
         var param = method.GetParameters()[_param.Position];
         return(new MethodParameterInjectionPoint(component, param, Binders.ToArray()));
     }
 }
Esempio n. 2
0
        public override IWeldInjetionPoint TranslateGenericArguments(IComponent component, IDictionary <Type, Type> translations)
        {
            var field = GenericUtils.TranslateFieldType(_field, translations);

            return(new FieldInjectionPoint(component, field, Binders.ToArray()));
        }