Beispiel #1
0
        public void Init()
        {
            var maxConcurrentCalls = int.Parse(ConfigurationManager.AppSettings["MaxConcurrentCalls"]);
            var maxConcurrentInstances = int.Parse(ConfigurationManager.AppSettings["MaxConcurrentInstances"]);
            var serviceBaseUrl = ConfigurationManager.AppSettings["ServiceBaseUrl"];

            _xServicebootstrapperHelper =
                new ExfBootstrapperHelper<IHeartbeatServer>(maxConcurrentCalls, maxConcurrentInstances, serviceBaseUrl);

            _xServicebootstrapperHelper.RegisterBasicHttpBinding<HeartbeatServer>();

            _xServicebootstrapperHelper.GetWindsorContainer()
                .Register(Component.For<HbArchiveProcessor>().LifeStyle.Singleton)
                .Register(Component.For<AppStatsProcessor>().LifeStyle.Singleton)
                .Register(Component.For<UdpServer>().LifeStyle.Singleton);

            //bunu silerseniz init olmaz, paketleri dinlemez.
            _xServicebootstrapperHelper.GetWindsorContainer().Resolve<UdpServer>();
        }
Beispiel #2
0
        public void Init()
        {
            int maxConcurrentCalls = int.Parse(ConfigurationManager.AppSettings["MaxConcurrentCalls"]);
            int maxConcurrentInstances = int.Parse(ConfigurationManager.AppSettings["MaxConcurrentInstances"]);
            string serviceBaseUrl = ConfigurationManager.AppSettings["ServiceBaseUrl"];

            _xServicebootstrapperHelper =
                new ExfBootstrapperHelper<IXService>(maxConcurrentCalls, maxConcurrentInstances, serviceBaseUrl);

            _xServicebootstrapperHelper.GetWindsorContainer()
                .Register(Component.For<ClientProcessor>().LifeStyle.Singleton)
                .Register(Component.For<HbInterceptor>().LifeStyle.PerWcfOperation());

            _xServicebootstrapperHelper.RegisterBasicHttpBinding<XService>(new[]
            {
                InterceptorReference.ForType<HbInterceptor>()
            });

            ContainerValidator.ValidateContainer(_xServicebootstrapperHelper.GetWindsorContainer());
        }
Beispiel #3
0
        public void Init()
        {
            var maxConcurrentCalls     = int.Parse(ConfigurationManager.AppSettings["MaxConcurrentCalls"]);
            var maxConcurrentInstances = int.Parse(ConfigurationManager.AppSettings["MaxConcurrentInstances"]);
            var serviceBaseUrl         = ConfigurationManager.AppSettings["ServiceBaseUrl"];


            _xServicebootstrapperHelper =
                new ExfBootstrapperHelper <IHeartbeatServer>(maxConcurrentCalls, maxConcurrentInstances, serviceBaseUrl);

            _xServicebootstrapperHelper.RegisterBasicHttpBinding <HeartbeatServer>();

            _xServicebootstrapperHelper.GetWindsorContainer()
            .Register(Component.For <HbArchiveProcessor>().LifeStyle.Singleton)
            .Register(Component.For <AppStatsProcessor>().LifeStyle.Singleton)
            .Register(Component.For <UdpServer>().LifeStyle.Singleton);

            //bunu silerseniz init olmaz, paketleri dinlemez.
            _xServicebootstrapperHelper.GetWindsorContainer().Resolve <UdpServer>();
        }
Beispiel #4
0
        public void Init()
        {
            int    maxConcurrentCalls     = int.Parse(ConfigurationManager.AppSettings["MaxConcurrentCalls"]);
            int    maxConcurrentInstances = int.Parse(ConfigurationManager.AppSettings["MaxConcurrentInstances"]);
            string serviceBaseUrl         = ConfigurationManager.AppSettings["ServiceBaseUrl"];


            _xServicebootstrapperHelper =
                new ExfBootstrapperHelper <IXService>(maxConcurrentCalls, maxConcurrentInstances, serviceBaseUrl);

            _xServicebootstrapperHelper.GetWindsorContainer()
            .Register(Component.For <ClientProcessor>().LifeStyle.Singleton)
            .Register(Component.For <HbInterceptor>().LifeStyle.PerWcfOperation());

            _xServicebootstrapperHelper.RegisterBasicHttpBinding <XService>(new[]
            {
                InterceptorReference.ForType <HbInterceptor>()
            });

            ContainerValidator.ValidateContainer(_xServicebootstrapperHelper.GetWindsorContainer());
        }