public GenericTypeInstantiation(IDependency dependency, Constructor constructor, IEnumerable<Type> typeArguments) : base(dependency)
        {
            if (dependency == null)
                throw new ArgumentNullException(nameof(dependency));

            if (constructor == null)
                throw new ArgumentNullException(nameof(constructor));

            Constructor = constructor;
            TypeArguments = typeArguments;
        }
Exemple #2
0
 public GenericType(IDependency dependency, ConstructorInfo genericConstructor) : base(dependency)
 {
     _constructor = new Constructor(dependency, genericConstructor);
 }
Exemple #3
0
 public GenericType(IDependency dependency, ConstructorInfo genericConstructor) : base(dependency)
 {
     _constructor = new Constructor(dependency, genericConstructor);
 }
 public override bool CanBeResolvedFrom(IEnumerable <IDependency> availableDependencies)
 {
     return(Constructor != null && Constructor.CanBeResolvedFrom(availableDependencies));
 }
 public override void AddResolveDependency(IInstantiationPoint otherPoint)
 {
     Constructor?.AddResolveDependency(otherPoint);
 }
 public override IEnumerable <IDependency> GetRequiredDependencies()
 {
     return(Constructor?.GetRequiredDependencies());
 }
 public override IEnumerable <IInstantiationPoint> GetResolvedDependencies() => Constructor.GetResolvedDependencies();