Esempio n. 1
0
        public void Can_resolve_client_with_interceptors_selector_depending_on_the_wcf_client_proxy()
        {
            container.Register(
                Component.For <SelectorDependsOnIOperations>()
                .LifeStyle.Transient,
                Component.For <IOperations>()
                .Named("operations")
                .SelectInterceptorsWith(r => r.Service <SelectorDependsOnIOperations>())
                .LifeStyle.Transient
                .AsWcfClient(WcfEndpoint.At("http://localhost")));

            container.Resolve <IOperations>();
        }
Esempio n. 2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public IServiceProvider ConfigureServices(IServiceCollection services)
        {
            services.AddMvc();

            var container = new WindsorContainer();

            container.AddFacility <WcfFacility>();

            container.Register(
                Component.For <IHelloService>()
                .AsWcfClient(WcfEndpoint.At("http://localhost:50214/HelloService.svc"))
                .LifestyleTransient()
                );

            return(WindsorRegistrationHelper.CreateServiceProvider(container, services));
        }