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