/// <summary> /// Initializes a new instance of the <see cref="ExternalBuildPlan"/> class. /// </summary> /// <param name="services">Services that the build plan is for</param> /// <param name="lifetime">The lifetime.</param> /// <param name="instanceStrategy">The instance strategy.</param> public ExternalBuildPlan(IEnumerable<Type> services, Lifetime lifetime, IInstanceStrategy instanceStrategy) { if (instanceStrategy == null) throw new ArgumentNullException("instanceStrategy"); _lifetime = lifetime; _instanceStrategy = instanceStrategy; Services = services.ToArray(); }
/// <summary> /// Initializes a new instance of the <see cref="ConcreteBuildPlan"/> class. /// </summary> /// <param name="concreteType">Type to construct.</param> /// <param name="services">Services that the concrete implements </param> /// <param name="lifetime">The lifetime.</param> /// <param name="instanceStrategy">Used to either fetch or create an instance.</param> public ConcreteBuildPlan(Type concreteType, IEnumerable<Type> services, Lifetime lifetime, IInstanceStrategy instanceStrategy) { if( concreteType == null && instanceStrategy == null) throw new ArgumentException("Either concreteType or instanceStrategy must be specified."); Lifetime = lifetime; _concreteType = concreteType; _instanceStrategy = instanceStrategy; Services = services.ToArray(); }
/// <summary> /// Initializes a new instance of the <see cref="ExternalBuildPlan"/> class. /// </summary> /// <param name="services">Services that the build plan is for</param> /// <param name="lifetime">The lifetime.</param> /// <param name="instanceStrategy">The instance strategy.</param> public ExternalBuildPlan(IEnumerable <Type> services, Lifetime lifetime, IInstanceStrategy instanceStrategy) { if (instanceStrategy == null) { throw new ArgumentNullException("instanceStrategy"); } _lifetime = lifetime; _instanceStrategy = instanceStrategy; Services = services.ToArray(); }
/// <summary> /// Initializes a new instance of the <see cref="ConcreteBuildPlan"/> class. /// </summary> /// <param name="concreteType">Type to construct.</param> /// <param name="services">Services that the concrete implements </param> /// <param name="lifetime">The lifetime.</param> /// <param name="instanceStrategy">Used to either fetch or create an instance.</param> public ConcreteBuildPlan(Type concreteType, IEnumerable <Type> services, Lifetime lifetime, IInstanceStrategy instanceStrategy) { if (concreteType == null && instanceStrategy == null) { throw new ArgumentException("Either concreteType or instanceStrategy must be specified."); } Lifetime = lifetime; _concreteType = concreteType; _instanceStrategy = instanceStrategy; Services = services.ToArray(); }
/// <summary> /// Initializes a new instance of the <see cref="GenericBuildPlan"/> class. /// </summary> /// <param name="concreteType">Type to construct.</param> /// <param name="services">Servies</param> /// <param name="lifetime">The lifetime.</param> /// <param name="instanceStrategy">Used to either fetch or create an instance.</param> public GenericBuildPlan(Type concreteType, IEnumerable<Type> services, Lifetime lifetime, IInstanceStrategy instanceStrategy) : base(concreteType, services, lifetime, instanceStrategy) { }
/// <summary> /// Initializes a new instance of the <see cref="GenericBuildPlan"/> class. /// </summary> /// <param name="concreteType">Type to construct.</param> /// <param name="services">Servies</param> /// <param name="lifetime">The lifetime.</param> /// <param name="instanceStrategy">Used to either fetch or create an instance.</param> public GenericBuildPlan(Type concreteType, IEnumerable <Type> services, Lifetime lifetime, IInstanceStrategy instanceStrategy) : base(concreteType, services, lifetime, instanceStrategy) { }