示例#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>();
        }
示例#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());
        }
示例#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>();
        }
示例#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());
        }