protected override AbstractProducer TranslateTypes(GenericUtils.Resolution resolution) { var resolvedMethod = GenericUtils.TranslateMethodGenericArguments(_method, resolution.GenericParameterTranslations); if (resolvedMethod == null || GenericUtils.MemberContainsGenericArguments(resolvedMethod)) { return(null); } return(new ProducerMethod(DeclaringComponent.Resolve(resolvedMethod.DeclaringType), resolvedMethod, Binders, Scope, Manager)); }
protected void TransferInjectionPointsTo(AbstractComponent component, GenericUtils.Resolution resolution) { component.AddInjectionPoints(_injectionPoints.Select(x => { if (x.DeclaringComponent.Type == component.Type) { return(x); } return(x.TranslateGenericArguments(component, resolution.GenericParameterTranslations)); }).ToArray()); }
private ClassComponent(ClassComponent parent, Type type, IEnumerable <IBinderAttribute> binders, Type scope, WeldComponentManager manager, GenericUtils.Resolution typeResolution) : base(new ComponentIdentifier(parent.Id.Key, type), type, binders, scope, manager, parent.PostConstructs.Select(x => GenericUtils.TranslateMethodGenericArguments(x, typeResolution.GenericParameterTranslations)).ToArray()) { parent.TransferInjectionPointsTo(this, typeResolution); _lazyMixins = new Lazy <Mixin[]>(() => Manager.GetMixins(this)); _lazyInterceptors = new Lazy <Interceptor[]>(() => new Interceptor[0]); //_lazyInterceptors = new Lazy<Interceptor[]>(() => Manager.GetInterceptors(this)); //_interceptedMethods = InitInterceptedMethods(); }
protected override AbstractProducer TranslateTypes(GenericUtils.Resolution resolution) { var resolvedProperty = GenericUtils.TranslatePropertyType(_property, resolution.GenericParameterTranslations); return(new ProducerProperty(DeclaringComponent.Resolve(resolvedProperty.DeclaringType), resolvedProperty, Binders, Scope, Manager)); }
protected abstract AbstractProducer TranslateTypes(GenericUtils.Resolution resolution);
protected override AbstractProducer TranslateTypes(GenericUtils.Resolution resolution) { var resolvedField = GenericUtils.TranslateFieldType(_field, resolution.GenericParameterTranslations); return(new ProducerField(DeclaringComponent.Resolve(resolvedField.DeclaringType), resolvedField, Binders, Scope, Manager)); }