예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UnityDependencyResolver"/> class for a container.
        /// </summary>
        /// <param name="container">The <see cref="IUnityContainer"/> to wrap with the <see cref="IDependencyResolver"/>
        /// interface implementation.</param>
        public UnityDependencyResolver(IUnityContainer container)
        {
            if (container == null)
                throw new ArgumentNullException(nameof(container));

            this.container = container;
            this.sharedScope = new SharedDependencyScope(container);
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnityDependencyResolver"/> class for a container.
 /// </summary>
 /// <param name="container">The <see cref="IUnityContainer"/> to wrap with the <see cref="IDependencyResolver"/>
 /// interface implementation.</param>
 public UnityDependencyResolver(IUnityContainer container)
 {
     if (container == null)
     {
         throw new ArgumentNullException("container");
     }
     this.container   = container;
     this.sharedScope = new SharedDependencyScope(container);
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnityDependencyResolver"/> class for a container.
 /// </summary>
 /// <param name="container">The <see cref="IUnityContainer"/> to wrap with the <see cref="IDependencyResolver"/>
 /// interface implementation.</param>
 public UnityDependencyResolver(IUnityContainer container)
 {
     if (container == null)
     {
         throw new ArgumentNullException("container");
     }
     this._container = container;
     this._sharedScope = new SharedDependencyScope(container);
 }
예제 #4
0
 public WebApiDependencyResolver(IServiceProvider provider)
 {
     if (provider == null)
     {
         throw new ArgumentNullException(nameof(provider));
     }
     _provider    = provider;
     _sharedScope = new SharedDependencyScope(this._provider);
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="UnityDependencyResolver"/> class for a container.
        /// </summary>
        /// <param name="container">The <see cref="IUnityContainer"/> to wrap with the <see cref="IDependencyResolver"/>
        /// interface implementation.</param>
        public UnityDependencyResolver(IUnityContainer container)
        {
            if (container == null)
            {
                throw new ArgumentNullException(nameof(container));
            }

            _container   = container;
            _sharedScope = new SharedDependencyScope(container);
        }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebApiDependencyResolver"/> class for a container.
 /// </summary>
 /// <param name="container">The <see cref="IUnityContainer"/> to wrap with the <see cref="IDependencyResolver"/>
 /// interface implementation.</param>
 public WebApiDependencyResolver()
 {
     this.sharedScope = new SharedDependencyScope(this);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UnityDependencyResolver"/> class for a container.
 /// </summary>
 /// <param name="container">The <see cref="IUnityContainer"/> to wrap with the <see cref="IDependencyResolver"/>
 /// interface implementation.</param>
 public UnitySharedDependencyResolver(IUnityContainer container)
 {
     this.container = container;
     sharedScope    = new SharedDependencyScope(container);
 }
 public DryIocDependencyResolver(IContainer container)
 {
     this.container = container;
     this.sharedScope = new SharedDependencyScope(container);
 }
 public DryIocDependencyResolver(IContainer container)
 {
     this.container   = container;
     this.sharedScope = new SharedDependencyScope(container);
 }
예제 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnityDependencyResolver"/> class for a container.
 /// </summary>
 /// <param name="container">The <see cref="IUnityContainer"/> to wrap with the <see cref="IDependencyResolver"/>
 /// interface implementation.</param>
 public UnitySharedDependencyResolver(IUnityContainer container)
 {
     GuardHelper.ArgumentNotNull(() => container);
     this.container   = container;
     this.sharedScope = new SharedDependencyScope(container);
 }