public static IReadOnlyList <ConstructorArgumentProducer> ConvertToProducers( this IReadOnlyList <DetectedMethodArgument> constructorArguments, ClusterBindings clusterBindings, BindingExtender bindingExtender ) { if (constructorArguments is null) { throw new ArgumentNullException(nameof(constructorArguments)); } if (clusterBindings is null) { throw new ArgumentNullException(nameof(clusterBindings)); } if (bindingExtender is null) { throw new ArgumentNullException(nameof(bindingExtender)); } return(constructorArguments.OrderBy(ca => ca.ArgumentIndex).Select( bft => new ConstructorArgumentProducer( clusterBindings, bindingExtender, bft ) ).ToList()); }
public BindFromResolutionProducer( ITypeInfoProvider typeInfoProvider, ClusterBindings clusterBindings, ITypeSymbol bindFrom, IReadOnlyList <InstanceProduct> instanceProducts ) { if (typeInfoProvider is null) { throw new ArgumentNullException(nameof(typeInfoProvider)); } if (clusterBindings is null) { throw new ArgumentNullException(nameof(clusterBindings)); } if (bindFrom is null) { throw new System.ArgumentNullException(nameof(bindFrom)); } if (instanceProducts is null) { throw new ArgumentNullException(nameof(instanceProducts)); } _typeInfoProvider = typeInfoProvider; ClusterBindings = clusterBindings; BindFrom = bindFrom; InstanceProducts = instanceProducts; }
public ConstructorArgumentProducer( ClusterBindings clusterBindings, BindingContainerExtender bindingExtender, DetectedConstructorArgument constructorArgument ) { if (clusterBindings is null) { throw new ArgumentNullException(nameof(clusterBindings)); } if (bindingExtender is null) { throw new ArgumentNullException(nameof(bindingExtender)); } if (constructorArgument is null) { throw new ArgumentNullException(nameof(constructorArgument)); } ClusterBindings = clusterBindings; BindingExtender = bindingExtender; ConstructorArgument = constructorArgument; }
public ClusterProducer( ITypeInfoProvider typeInfoProvider, ClusterBindings clusterBindings ) { if (typeInfoProvider is null) { throw new ArgumentNullException(nameof(typeInfoProvider)); } if (clusterBindings is null) { throw new ArgumentNullException(nameof(clusterBindings)); } _typeInfoProvider = typeInfoProvider; ClusterBindings = clusterBindings; }
public SingletonInstanceProducer( ITypeInfoProvider typeInfoProvider, ClusterBindings clusterBindings, BindingContainerExtender bindingExtender ) { if (typeInfoProvider is null) { throw new ArgumentNullException(nameof(typeInfoProvider)); } if (clusterBindings is null) { throw new ArgumentNullException(nameof(clusterBindings)); } if (bindingExtender is null) { throw new ArgumentNullException(nameof(bindingExtender)); } _typeInfoProvider = typeInfoProvider; _clusterBindings = clusterBindings; _bindingExtender = bindingExtender; }