public ServiceProviderEngine(IEnumerable <ServiceDefintion> services, IDelegateServiceDefintionHandler defintionHandler) { SingletonCache = new ConcurrentDictionary <DelegateServiceDefintion, object>(); scopedCache = new ConcurrentDictionary <DelegateServiceDefintion, object>(); Defintions = new ServiceDefintionFactory(services, defintionHandler); Root = this; }
public ServiceDefintionFactory(IEnumerable <ServiceDefintion> services, IDelegateServiceDefintionHandler defintionHandler) { this.defintionHandler = defintionHandler; cache = new ConcurrentDictionary <Type, LinkedList <DelegateServiceDefintion> >(); genericCache = new ConcurrentDictionary <Type, LinkedList <TypeServiceDefintion> >(); Fill(services); }