Esempio n. 1
0
 public Configurator()
 {
     _container.AddFacility <WcfFacility>()
     .Register(
         Component
         .For <IMosquitoCallbackChannel>()
         .AsWcfClient(WcfEndpoint.FromConfiguration("NetTcpBinding_IMosquitoCallbackChannel"))
         );
 }
        public static void RegisterDependency()
        {
            ControllerBuilder.Current.SetControllerFactory(new DependencyConfig(DependencyContainer.Container));

            DependencyContainer.Container.AddFacility <WcfFacility>().Register(Component.For <EmployeeService.IEmployeeService>()
                                                                               .AsWcfClient(new DefaultClientModel {
                Endpoint = WcfEndpoint.FromConfiguration("EmployeeWcfServiceEndPoint")
            })
                                                                               );
        }
Esempio n. 3
0
        private static WindsorContainer GetContainer()
        {
            var container = new WindsorContainer();

            container.Register(
                Component.For <IQueryAccountSummaryService>()
                .AsWcfClient(WcfEndpoint.FromConfiguration("*"))
                );
            return(container);
        }
Esempio n. 4
0
 private void InitContainer()
 {
     _container = new WindsorContainer();
     _container
     .AddFacility <WcfFacility>()
     .Register(
         Component
         .For <IMosquitoChannel>()
         .AsWcfClient(WcfEndpoint.FromConfiguration("NetTcpBinding_IMosquitoChannel")),
         Component.For <ICommandProcessor>().ImplementedBy <CommandProcessor>().Forward <ICallbackProcessor>()
         );
 }
Esempio n. 5
0
 public void Install(IWindsorContainer container, IConfigurationStore store)
 {
     container.Register(Component.For <IMeldingssystemService>()
                        .AsWcfClient(new DefaultClientModel(WcfEndpoint.FromConfiguration("MeldingssystemService")))
                        .LifeStyle.PerWebRequest.OnDestroy(service =>
     {
         var channel = (IClientChannel)service;
         if (channel.State == CommunicationState.Faulted)
         {
             channel.Abort();
         }
     }));
 }
Esempio n. 6
0
        public static void AssemblyInitialize(TestContext context)
        {
            try
            {
                _server = new CassiniDevServer();
                _server.StartServer("../../../TechData.EC.Services.WebContent", Port, "/", "localhost");
            }
            // we're already running the service, ignore
            catch (Exception)
            {
                _server = null;
            }

            Container = new WindsorContainer();
            Container.AddFacility <WcfFacility>();

            Container.Register(
                Component.For <IPageService>()
                .AsWcfClient(new DefaultClientModel(WcfEndpoint.FromConfiguration("PageService")))
                );
        }
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            container.Register(
                AllTypes.FromAssemblyContaining <ChangeAliasCommandHandler>()
                .BasedOn(typeof(IRequestHandler <>))
                .WithService.Base()
                .Configure(c => c.LifeStyle.Transient)
                );

            container.Register(Component.For <IRequestHandlerFactory>().ImplementedBy <RequestHandlerFactory>());

            container.AddFacility <WcfFacility>();

            container.Register(
                Component.For <IBackendService>().ImplementedBy <BackendService>().Named("WcfService")
                .AsWcfService(new DefaultServiceModel()));

            container.Register(
                Component.For <IBackendService>().AsWcfClient(
                    WcfEndpoint.FromConfiguration("BackendService")).Named("WcfClient").LifeStyle.Transient);
        }