public void PublishGameChanges()
        {
            if (this.removedGames.Count == 0 && this.changedGames.Count == 0)
            {
                return;
            }

            foreach (var entry in this.subscriptions)
            {
                Hashtable games;
                if (entry.Key == 0)
                {
                    games = this.GetChangedGames();
                }
                else
                {
                    games = this.GetChangedGames(entry.Key);
                }

                if (games.Count > 0)
                {
                    if (log.IsDebugEnabled)
                    {
                        log.DebugFormat("Publishing game changes: props={0}", this.propertyString);
                    }

                    var e = new GameListUpdateEvent { Data = games };
                    var eventData = new EventData((byte)EventCode.GameListUpdate, e);
                    eventData.SendTo(entry.Value, new SendParameters());
                }
            }

            foreach (var gameId in this.removedGames)
            {
                this.gameDict.Remove(gameId);
            }

            this.changedGames.Clear();
            this.removedGames.Clear();
        }
        public virtual void PublishGameChanges()
        {
            if (this.ChangedGamesCount > 0)
            {
                Hashtable gameList = this.GetChangedGames();

                var e = new GameListUpdateEvent { Data = gameList };
                var eventData = new EventData((byte)EventCode.GameListUpdate, e);
                ApplicationBase.Instance.BroadCastEvent(eventData, this.peers, new SendParameters());
            }
        }
        private void PublishGameChanges()
        {
            try
            {
                this.schedule = null;

                if (this.GameList.ChangedGamesCount > 0)
                {
                    Hashtable changedGames = this.GameList.GetChangedGames();

                    var e = new GameListUpdateEvent { Data = changedGames };
                    var eventData = new EventData((byte)EventCode.GameListUpdate, e);
                    eventData.SendTo(this.peers, new SendParameters());
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
            }
        }