/// <summary> /// Handles the message. /// </summary> /// <param name="message">The message.</param> public void Handle(DeckUpdated message) { if (message.Deck == null) { this.RefreshDecks(); return; } var found = this.Decks.FirstOrDefault(x => x.Id == message.Deck.Id); if (found != null) { found.MapFrom(message.Deck); } }
/// <summary> /// Handles the message. /// </summary> /// <param name="message">The message.</param> public void Handle(DeckUpdated message) { if (message.Deck == null) { this.RefreshDecks(); return; } var found = this.Decks.FirstOrDefault(x => x.Id == message.Deck.Id); if (found != null) { found.MapFrom(message.Deck); } foreach (var gameResult in this.gameResults) { if (gameResult.Deck != null && gameResult.Deck.Id == message.Deck.Id) { gameResult.Deck = message.Deck; } } }