Пример #1
0
        public void DeclareResolutionScenarios(IWindsorContainer container, IConfigurationStore store)
        {
            IsImplementation2 isImplementation2 = new IsImplementation2(container.Resolve <IContextProvider <string> >());

            container
            .AddImplementationCriteria <CustomerBackendRequestTranslator,
                                        IBackendRequestTranslator <ServiceRequest, BackendServiceRequest> >(isImplementation2);
            container
            .AddImplementationCriteria <CustomerBackendRequestSender,
                                        IBackendRequestSender <BackendServiceRequest, BackendServiceResponse> >(isImplementation2);

            container
            .AddImplementationCriteria <CustomerBackendSender,
                                        IBackendRequestSender <BackendServiceRequest, BackendServiceResponse> >();
        }
Пример #2
0
 private void AddHandlerSelector <TImplementation, TService>(IWindsorContainer container,
                                                             params ISelectionCriterion[] selectionCriteria)
     where TImplementation : class, TService where TService : class
 {
     container.AddImplementationCriteria <TImplementation, TService>(
         selectionCriteria);
 }
 public void DeclareResolutionScenarios(IWindsorContainer container, IConfigurationStore store)
 {
     container.AddImplementationCriteria <ServiceProvider, IServiceProvider <string, int> >(new AlwaysTrue());
     container.AddImplementationCriteria <SecondService, IServiceProvider <string, int> >(new AlwaysFalse());
 }
Пример #4
0
 public void DeclareResolutionScenarios(IWindsorContainer container, IConfigurationStore store)
 {
     container.AddImplementationCriteria <ConsoleLogger, ILogger>(new AlwaysFalse());
     container.AddImplementationCriteria <NullLogger, ILogger>(new AlwaysFalse());
 }