/// <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));
 }
 /// <summary>
 /// Create a new instance of the Dependency resolution configuration.
 /// </summary>
 public DependencyInstanceResolution(IDependencyResolutionConfiguration configuration)
 {
     _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
 }
Example #3
0
 public IocKernelBuilder(IServiceCollection serviceCollection)
 {
     _serviceCollection       = serviceCollection ?? throw new ArgumentNullException(nameof(serviceCollection));
     _resolutionConfiguration = new DependencyResolutionConfiguration();
     _instanceResolution      = new DependencyInstanceResolution(_resolutionConfiguration);
 }
Example #4
0
 public MicrosoftDependencyContainer(IServiceCollection services, IDependencyResolutionConfiguration configuration, IDependencyTypeActivator activator, IDependencyFactory dependencyFactory)
     : base(configuration, activator, dependencyFactory)
 {
     _services = services ?? throw new ArgumentNullException(nameof(services));
 }