예제 #1
0
        public LotServer(LotServerConfiguration config, Ninject.IKernel kernel) : base(config, kernel)
        {
            this.Config = config;

            Kernel.Bind <LotServerConfiguration>().ToConstant(Config);
            Kernel.Bind <LotHost>().To <LotHost>().InSingletonScope();
            Kernel.Bind <CityConnections>().To <CityConnections>().InSingletonScope();
            Kernel.Bind <LotServer>().ToConstant(this);

            LotLivenessTimer.AutoReset = true;
            LotLivenessTimer.Elapsed  += LivenessCheck;

            Lots = Kernel.Get <LotHost>();
        }
예제 #2
0
        public LotServer(LotServerConfiguration config, Ninject.IKernel kernel) : base(config, kernel)
        {
            this.Config = config;
            this.UnexpectedDisconnectWaitSeconds = 30;
            this.TimeoutIfNoAuth = config.Timeout_No_Auth;

            Kernel.Bind <LotServerConfiguration>().ToConstant(Config);
            Kernel.Bind <LotHost>().To <LotHost>().InSingletonScope();
            Kernel.Bind <CityConnections>().To <CityConnections>().InSingletonScope();
            Kernel.Bind <LotServer>().ToConstant(this);

            LotLivenessTimer.AutoReset = true;
            LotLivenessTimer.Elapsed  += LivenessCheck;

            Lots = Kernel.Get <LotHost>();
        }