private void ConfigureServiceLocatorProvider(IServiceLocatorProvider serviceLocatorProvider) { var serviceLocationConfiguration = MockRepository.GenerateStub <IServiceLocationConfiguration>(); serviceLocationConfiguration.Stub(stub => stub.CreateServiceLocatorProvider()).Return(serviceLocatorProvider); ServiceLocationConfiguration.SetCurrent(serviceLocationConfiguration); ResetDefaultServiceLocator(); }
public RuleBasedPolicyEngineService(IServiceLocatorProvider locatorProvider, IEventPublisher publisher) { this.locatorProvider = locatorProvider; }
public static void SetLocatorProvider(IServiceLocatorProvider provider) { Current = provider; }
/// <summary> /// Set the delegate that is used to retrieve the current container. /// </summary> /// <param name="newProvider">Delegate that, when called, will return /// the current ambient container.</param> public static void SetLocatorProvider(IServiceLocatorProvider newProvider) { currentProvider = newProvider; }