예제 #1
0
        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;
        }
예제 #2
0
 public void ConstructorStrategy(IConstructorSelectionStrategy strategy)
 {
     this.strategy = strategy;
 }
예제 #3
0
 public Repository(IConstructorSelectionStrategy constructorSelectionStrategy = null)
 {
     this.constructorSelectionStrategy = constructorSelectionStrategy ?? new DefaultConstructorSelectionStrategy();
 }