예제 #1
0
 public Collection(CollectionIdentifier identifier)
 {
     Identifier       = identifier;
     IsSelected       = false;
     DownloadStatus   = DownloadItemStatus.QUEUED;
     TotalSize        = null;
     DownloadedSize   = null;
     DownloadUrl      = null;
     DownloadFilePath = null;
     IsImported       = false;
     IsDeleted        = false;
 }
예제 #2
0
 public BeanCargo GetCollection(CollectionIdentifier targetCollection)
 {
     switch(targetCollection) {
         case CollectionIdentifier.Revealed:
             return this.RevealedCollection;
         case CollectionIdentifier.Hidden:
             return this.HiddenCollection;
         default:
             throw new InvalidEnumArgumentException("targetCollection", (int)targetCollection, typeof(CollectionIdentifier));
     }
 }
예제 #3
0
 public void PlayCardsToCollection(CollectionIdentifier targetCollection, ISet<Bean> cardsToPlay)
 {
     // TODO: validate here?
     beansInHand.RemoveWhere(cardsToPlay.Contains);
     GetCollection(targetCollection).AddBeans(cardsToPlay);
 }
예제 #4
0
 private void PlaySelectedCards(CollectionIdentifier collection)
 {
     this.decision.PlayCards(selectedCards.Select(c => c.Bean), collection);
 }