예제 #1
0
        public override IEnumerable <HeroCard> Execute(IHearthstoneCardCache cache)
        {
            IEnumerable <HeroCard> result     = ExecuteLinq(cache.FindAll <HeroCard>().AsQueryable());
            List <HeroCard>        resultList = result.ToList <HeroCard>();

            return(resultList);
        }
예제 #2
0
        public HeroCard Execute(string playerClass)
        {
            var heroCards = cache.FindAll <HeroCard>();
            var card      = heroCards.FirstOrDefault(x => x.PlayerClass == playerClass && x.Id.StartsWith("HERO"));

            return(card);
        }
 public override IEnumerable <T> Execute(IHearthstoneCardCache cache)
 {
     return(ExecuteLinq(cache.FindAll <T>().AsQueryable()));
 }
 public IEnumerable <HeroCard> Execute()
 {
     return(cache.FindAll <HeroCard>().Where(x => x.Id.StartsWith("HERO")));
 }
예제 #5
0
        public IEnumerable <ICard> Execute(string queryText)
        {
            var qt = queryText ?? "";

            return(cache.FindAll <ICard>().Where(x => x.Name.Contains(qt) || x.Type.ToString() == qt || x.PlayerClass == qt));
        }