public ServiceProvider(IEnumerable <ServiceDescriptor> serviceDescriptors)
        {
            _root  = this;
            _table = new ServiceTable(serviceDescriptors);

            _table.Add(typeof(IServiceProvider), new ServiceProviderService());
            _table.Add(typeof(IServiceScopeFactory), new ServiceScopeService());
            _table.Add(typeof(IEnumerable <>), new OpenIEnumerableService(_table));
        }
        public ServiceProvider(
            IEnumerable <IServiceDescriptor> serviceDescriptors,
            IServiceProvider fallbackServiceProvider)
        {
            _table    = new ServiceTable(serviceDescriptors);
            _fallback = fallbackServiceProvider;

            _table.Add(typeof(IServiceProvider), new ServiceProviderService());
            _table.Add(typeof(IServiceScopeFactory), new ServiceScopeService());
            _table.Add(typeof(IEnumerable <>), new OpenIEnumerableService(_table));
        }
        public ServiceProvider(IEnumerable <ServiceDescriptor> serviceDescriptors, bool validateScopes)
        {
            Root = this;

            if (validateScopes)
            {
                _callSiteValidator = new CallSiteValidator();
            }

            _table = new ServiceTable(serviceDescriptors);

            _table.Add(typeof(IServiceProvider), new ServiceProviderService());
            _table.Add(typeof(IServiceScopeFactory), new ServiceScopeService());
            _table.Add(typeof(IEnumerable <>), new OpenIEnumerableService(_table));
        }