public ConstructionPlan(IRegistration registration, Dictionary <Type, HashSet <ConstructionPlan> > otherPlans, IConstructorSelectionStrategy selector, MultipleMappingsBehaviour multipleMappingsBehaviour = MultipleMappingsBehaviour.FailConstruction) { Guard.Against.Null(registration, nameof(registration)); Guard.Against.Null(otherPlans, nameof(otherPlans)); Guard.Against.Null(selector, nameof(selector)); Declared = registration.DefinedType; Injected = registration.InjectedType; this.multipleMappingsBehaviour = multipleMappingsBehaviour; plans = otherPlans; constructorSelector = selector; lifetime = registration.Lifetime; }
public void ConstructorStrategy(IConstructorSelectionStrategy strategy) { this.strategy = strategy; }
public Repository(IConstructorSelectionStrategy constructorSelectionStrategy = null) { this.constructorSelectionStrategy = constructorSelectionStrategy ?? new DefaultConstructorSelectionStrategy(); }