Exemplo n.º 1
0
        private async Task <ILookup <string, string> > LoadMods()
        {
            var results = await QueryApiForModsAsync().ConfigureAwait(false);

            Log.Info($"Retrieved {results.Count} unique item mods.");
            return(results.ToLookup(
                       j => j.Value <string>(ApiAccessor.GetPageNameFieldAlias(ItemTableName)),
                       j => j.Value <string>(ModId)));
        }
Exemplo n.º 2
0
        private static IEnumerable <XmlUnique> ReadJson(
            string wikiClass, IEnumerable <JToken> results, ILookup <string, string> mods)
        {
            results = results.DistinctBy(j => j.Value <string>(ApiAccessor.GetPageNameFieldAlias(ItemTableName)));
            List <XmlUnique> uniques = (
                from result in results
                let unique = PrintoutsToUnique(result, mods)
                             where !Blacklist.Contains(unique.Name)
                             orderby unique.Name
                             select unique
                ).ToList();

            Log.Info($"Retrieved {uniques.Count} uniques of class {wikiClass}.");
            return(uniques);
        }