protected ServiceLocator(IServiceLocatorAdapter serviceLocator, IServiceLocatorStore store) { this.serviceLocator = serviceLocator; this.store = store; foundation = new Foundation(); pipeline = new DefaultResolutionPipeline(foundation, serviceLocator, this.store); factoryPipeline = new FactoryResolutionPipeline(foundation, serviceLocator, this.store); postResolutionPipeline = new PostResolutionPipeline(foundation, serviceLocator, store); registrationTemplate = new DefaultMetaRegistrationTemplate(serviceLocator); serviceLocator.Register(typeof(Transient), typeof(Transient)); serviceLocator.Register(typeof(Singleton), typeof(Singleton)); serviceLocator.RegisterInstance(typeof(IServiceLocatorAdapter), serviceLocator); serviceLocator.RegisterInstance(typeof(IServiceLocator), this); serviceLocator.RegisterInstance(typeof(Microsoft.Practices.ServiceLocation.IServiceLocator), this); serviceLocator.RegisterInstance(typeof(Foundation), this.foundation); serviceLocator.RegisterInstance(typeof(IServiceLocatorStore), this.store); serviceLocator.RegisterInstance(typeof(IContextStore), this.store.Get <IContextStore>()); serviceLocator.RegisterInstance(typeof(IExecutionStore), this.store.Get <IExecutionStore>()); serviceLocator.RegisterInstance(typeof(IResolutionStore), this.store.Get <IResolutionStore>()); var binPath = AppDomain.CurrentDomain.SetupInformation.PrivateBinPath ?? AppDomain.CurrentDomain.SetupInformation.ApplicationBase; Register(Load.FromAssembliesIn(binPath, binPath + @"\Plugins\", ".plugin")); }
protected ServiceLocator(IServiceLocatorAdapter serviceLocator, IServiceLocatorStore store) { this.serviceLocator = serviceLocator; this.store = store; foundation = new Foundation(); pipeline = new DefaultResolutionPipeline(foundation, serviceLocator, this.store); factoryPipeline = new FactoryResolutionPipeline(foundation, serviceLocator, this.store); postResolutionPipeline = new PostResolutionPipeline(foundation, serviceLocator, store); registrationTemplate = new DefaultMetaRegistrationTemplate(serviceLocator); serviceLocator.Register(typeof(Transient), typeof(Transient)); serviceLocator.Register(typeof(Singleton), typeof(Singleton)); serviceLocator.RegisterInstance(typeof(IServiceLocatorAdapter), serviceLocator); serviceLocator.RegisterInstance(typeof(IServiceLocator), this); serviceLocator.RegisterInstance(typeof(Microsoft.Practices.ServiceLocation.IServiceLocator), this); serviceLocator.RegisterInstance(typeof(Foundation), this.foundation); serviceLocator.RegisterInstance(typeof(IServiceLocatorStore), this.store); serviceLocator.RegisterInstance(typeof(IContextStore), this.store.Get <IContextStore>()); serviceLocator.RegisterInstance(typeof(IExecutionStore), this.store.Get <IExecutionStore>()); serviceLocator.RegisterInstance(typeof(IResolutionStore), this.store.Get <IResolutionStore>()); }