Beispiel #1
0
        public IEnumerable <CollectibleSet> GetCollectibleSets()
        {
            if (CollectibleCounts != null)
            {
                return(CollectibleCounts.Where(cc => cc.Collectible != null).Select(cc => new CollectibleSet {
                    Collectible = cc.Collectible, Count = cc.Count
                }));
            }

            return(new CollectibleSet[0]);
        }
Beispiel #2
0
        public int GetCollectibleCount(string collectibleId)
        {
            if (CollectibleCounts != null)
            {
                var cc = CollectibleCounts.Where(_cc => _cc.CollectibleId == collectibleId).FirstOrDefault();

                if (cc != null)
                {
                    return(cc.Count);
                }
            }

            return(0);
        }