示例#1
0
 private static Models.Deck ConvertFromServiceDeckToClientDeck(GameTableServiceReference.Deck serviceDeck)
 {
     Models.Deck clientDeck = new Models.Deck()
     {
         Id    = serviceDeck.Id,
         Name  = serviceDeck.DeckName,
         cards = ConvertFromListOfServiceCardsToListOfClientCards(serviceDeck.cards)
     };
     return(clientDeck);
 }
示例#2
0
 private static GameTableServiceReference.Deck ConvertFromClientDeckToServiceDeck(Models.Deck clientDeck)
 {
     GameTableServiceReference.Deck serviceDeck = new GameTableServiceReference.Deck()
     {
         Id       = clientDeck.Id,
         DeckName = clientDeck.Name,
         cards    = ConvertFromListOfClientCardsToListOfServiceCards(clientDeck.cards)
     };
     return(serviceDeck);
 }