internal override InjectionConfigurationSet CreateInjectionConfigurationSet(ObjectDescription description, ObjectRelation admin) { if (_configSet != null) { return(_configSet); } var configGroup = new FuncInjectionConfigurationGroup(description, _factory); var configSet = new InjectionConfigurationSet(description, admin, configGroup); var interpreter = new FuncInjectionConfigurationInterpreter(configGroup); configGroup.InjectionConfigurationInterpreter = interpreter; _configSet = configSet; return(_configSet); }
internal override InjectionConfigurationSet CreateInjectionConfigurationSet(ObjectDescription description, ObjectRelation admin) { if (_configSet != null) { return(_configSet); } var constructorInfo = GetConstructorInfo(); var ctorConfigItem = new ConstructorInjectionConfigurationItem(constructorInfo, ConfiguredParameters); var configGroup = new TypedInjectionConfigurationGroup(description, ctorConfigItem); var configSet = new InjectionConfigurationSet(description, admin, configGroup); if (MemberInjectionConfigurationItems != null) { foreach (var memberInjectionConfigurationItem in MemberInjectionConfigurationItems) { configGroup.AddMemberInjectionConfigurationItem(memberInjectionConfigurationItem); } } IInjectionConfigurationInterpreter interpreter; if (ShouldUseLightweightCodeGeneration(Kernel)) { interpreter = new EmitInjectionConfigurationInterpreter(configGroup); } else { interpreter = new ReflectionInjectionConfigurationInterpreter(configGroup); } configGroup.InjectionConfigurationInterpreter = interpreter; _configSet = configSet; return(_configSet); }
internal InjectionOperatorBuilder(ObjectBuilder <T> builder, ObjectDescription description, Lifetime <T> lifetime, InjectionConfigurationSet configurationSet) : base(builder, description, lifetime) { _configurationSet = configurationSet; }
internal ObjectBuilderWithCondition(ObjectDescription description, ObjectRelation admin, Lifetime <T> lifetime, InjectionConfigurationSet configurationSet, IInjectionCondition condition) : base(description, admin, lifetime, configurationSet) { _condition = condition; }