protected override void OnStop() { StopCalled = true; Log.Info("OnStop Called"); if (!Program.Local) { SasManagerServiceClient.GetContext().Stop(); } Server.Stop(); this.FireOnServiceStop(); Log.Info("OnStop Completed"); LogManager.Shutdown(); }
public void Start() { Log.Info("Starting"); this.OnStart(null); if (!Program.Local) { SasManagerServiceClient.GetContext().Start(); } Server = new Server(GameStateEngine.GetContext()); Server.OnStop += (sender, args) => { if (!StopCalled) { this.Stop(); } }; Log.Info("Started"); }
public void SetStatus(EnumHostedGameStatus status) { lock (Locker) { State.Status = status; // Don't use the SasManagerServiceClient if local if (IsLocal) { return; } if (SasManagerServiceClient.GetContext().ConnectionState == ConnectionState.Connected) { SasManagerServiceClient.GetContext().HubProxy.Send <ISASToSASManagerService>().Invoke().HostedGameStateChanged(State.Id, status); } } }