Example #1
0
        protected virtual void HandleRemoveGameState(IEventData eventData)
        {
            var removeEvent = new RemoveGameEvent(this.Protocol, eventData);

            if (removeEvent.IsValid == false)
            {
                string msg = removeEvent.GetErrorMessage();
                log.ErrorFormat("RemoveGame contract error: {0}", msg);
                return;
            }

            this.application.DefaultApplication.OnGameRemovedOnGameServer(removeEvent.GameId);
        }
        private void HandleRemoveGameState(IEventData eventData)
        {
            var removeEvent = new RemoveGameEvent(this.Protocol, eventData);

            if (removeEvent.IsValid == false)
            {
                string msg = removeEvent.GetErrorMessage();
                log.ErrorFormat("RemoveGame contract error: {0}", msg);
                return;
            }

            if (log.IsDebugEnabled)
            {
                log.DebugFormat("HandleRemoveGameState: {0}", removeEvent.GameId);
            }

            var ctx = this.Context;

            if (ctx != null)
            {
                ctx.HandleRemoveGameState(removeEvent);
            }
        }