public WebApiDependencyScope(IServiceProvider services, IDependencyResolver dependencyResolver)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }
            if (dependencyResolver == null)
            {
                throw new ArgumentNullException(nameof(dependencyResolver));
            }

            ServiceProvider = services.BeginScope();
            DependencyResolver = dependencyResolver;
        }
Пример #2
0
 public LifetimeSnapshotProvider(IServiceProvider serviceProvider)
 {
     ServiceProvider = serviceProvider;
 }
 public MvcDependencyResolver(IServiceProvider services, IDependencyResolver dependencyResolver)
 {
     Services = services;
     DependencyResolver = dependencyResolver;
 }