private List <Module> Processjson(string fetched) { ktaneData Deserialized = JsonConvert.DeserializeObject <ktaneData>(fetched); List <Module> Modules = new List <Module>(); foreach (var item in Deserialized.KtaneModules) { if ((string)item["Type"] != "Widget" && (string)item["Type"] != "Holdable") { Modules.Add(new Module(item)); } } return(Modules); }
List <Module> Processjson(string fetched) { ktaneData Deserialized = JsonConvert.DeserializeObject <ktaneData>(fetched); List <Module> Modules = new List <Module>(); foreach (var item in Deserialized.KtaneModules) { var id = (string)item["ModuleID"]; var ignore = IgnoreModules.Contains(id); if (!ignore && !IgnoreType.Contains((string)item["Type"]) && (!item.ContainsKey("TranslationOf") || string.IsNullOrEmpty((string)item["TranslationOf"])) && (string)item["Origin"] != "Vanilla") { Modules.Add(new Module(item)); } else if (!ignore) { IgnoreModules.Add(id); } } return(Modules); }