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