Пример #1
0
 public ServiceProviderEngine(IEnumerable <ServiceDefintion> services, IDelegateServiceDefintionHandler defintionHandler)
 {
     SingletonCache = new ConcurrentDictionary <DelegateServiceDefintion, object>();
     scopedCache    = new ConcurrentDictionary <DelegateServiceDefintion, object>();
     Defintions     = new ServiceDefintionFactory(services, defintionHandler);
     Root           = this;
 }
Пример #2
0
 public ServiceDefintionFactory(IEnumerable <ServiceDefintion> services, IDelegateServiceDefintionHandler defintionHandler)
 {
     this.defintionHandler = defintionHandler;
     cache        = new ConcurrentDictionary <Type, LinkedList <DelegateServiceDefintion> >();
     genericCache = new ConcurrentDictionary <Type, LinkedList <TypeServiceDefintion> >();
     Fill(services);
 }