public override IEnumerable <HeroCard> Execute(IHearthstoneCardCache cache) { IEnumerable <HeroCard> result = ExecuteLinq(cache.FindAll <HeroCard>().AsQueryable()); List <HeroCard> resultList = result.ToList <HeroCard>(); return(resultList); }
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"))); }
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)); }