Esempio n. 1
0
 void Repository_OnObjectUpdate(IdObject idObject)
 {
     if (idObject.Equals(game))
     {
         UpdateGameInfo(idObject as GameObject);
     }
 }
Esempio n. 2
0
 void Repository_OnObjectUpdate(IdObject idObject)
 {
     if (idObject.Equals(match))
     {
         UpdateMatchInfo(idObject as MatchObject);
         return;
     }
     if (idObject.SpaceType.Equals(SpaceType.Game))
     {
         var game = idObject as GameObject;
         if (!game.Match.Equals(match.Id))
         {
             // not my game
             return;
         }
         if (completedGames.ContainsKey(game.Id))
         {
             // game is completed before
             completedGames[game.Id].UpdateGameInfo(game);
             return;
         }
         if (!currentGame.IsNull() && currentGame.Id.Equals(game.Id))
         {
             // game is current
             return;
         }
         // new game in this match
         NewGame(game).CheckState();
     }
 }