コード例 #1
0
        public ServiceProviderEngineScope(ServiceProviderEngine engine, bool isRoot = false)
        {
            Engine = engine;

            // To reduce lock contention for singletons upon resolve we use a concurrent dictionary.
            ResolvedServices = isRoot ? new ConcurrentDictionary <ServiceCacheKey, object>() : new Dictionary <ServiceCacheKey, object>();
        }
コード例 #2
0
 public ServiceProviderEngineScope(ServiceProviderEngine engine)
 {
     Engine = engine;
 }
コード例 #3
0
 public ServiceProviderEngineScope(ServiceProviderEngine engine, bool isRoot = false)
 {
     Engine = engine;
     _state = new ScopeState(isRoot);
 }
コード例 #4
0
 public ServiceProviderEngineScope(ServiceProviderEngine engine)
 {
     Engine = engine;
     _state = new ScopeState();
 }
コード例 #5
0
 public ServiceProviderEngineScope(ServiceProviderEngine engine, bool isRoot = false)
 {
     Engine = engine;
     _state = isRoot ? new ScopePool.State() : engine.ScopePool.Rent();
 }