private void ConfigureServiceLocatorProvider(IServiceLocatorProvider serviceLocatorProvider)
        {
            var serviceLocationConfiguration = MockRepository.GenerateStub <IServiceLocationConfiguration>();

            serviceLocationConfiguration.Stub(stub => stub.CreateServiceLocatorProvider()).Return(serviceLocatorProvider);
            ServiceLocationConfiguration.SetCurrent(serviceLocationConfiguration);
            ResetDefaultServiceLocator();
        }
Пример #2
0
 public RuleBasedPolicyEngineService(IServiceLocatorProvider locatorProvider, IEventPublisher publisher)
 {
     this.locatorProvider = locatorProvider;
 }
Пример #3
0
 public static void SetLocatorProvider(IServiceLocatorProvider provider)
 {
     Current = provider;
 }
Пример #4
0
 /// <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;
 }