Exemple #1
0
 /// <summary>
 /// Create a new instance of the dependency type resolution.
 /// </summary>
 /// <param name="info">The type information describing this resolution.</param>
 /// <param name="activator">
 /// The activator that will be used to return an instance of the <see cref="IDependencyTypeInfo.ResolutionType"/>
 /// </param>
 public DependencyTypeResolution(IDependencyTypeInfo info, IDependencyTypeActivator activator) : base(info)
 {
     _activator = activator ?? throw new ArgumentNullException(nameof(activator));
 }
 /// <summary>
 /// Create a new instance of the dependency container.
 /// </summary>
 /// <param name="configuration">
 /// The instance configuration that will contain the binding configuration.
 /// </param>
 /// <param name="activator">The type activator that is used to resolve types.</param>
 /// <param name="dependencyFactory">The dependency factory.</param>
 public DependencyContainer(IDependencyResolutionConfiguration configuration, IDependencyTypeActivator activator, IDependencyFactory dependencyFactory)
 {
     _configuration     = configuration ?? throw new ArgumentNullException(nameof(configuration));
     _activator         = activator ?? throw new ArgumentNullException(nameof(activator));
     _dependencyFactory = dependencyFactory ?? throw new ArgumentNullException(nameof(dependencyFactory));
 }
Exemple #3
0
 public MicrosoftDependencyContainer(IServiceCollection services, IDependencyResolutionConfiguration configuration, IDependencyTypeActivator activator, IDependencyFactory dependencyFactory)
     : base(configuration, activator, dependencyFactory)
 {
     _services = services ?? throw new ArgumentNullException(nameof(services));
 }