Example #1
0
        static async Task AsyncMain(string[] args)
        {
            JsonConfig.ConfigObject jsonConfig = new JsonConfig.ConfigObject();
            var    jsonTrends  = ReadJsonConfig(ref jsonConfig);
            string fetchOutput = await FetchAllTrends(jsonTrends);

            Console.WriteLine("Hello World!" + fetchOutput);
        }
Example #2
0
        public static List <string> ReadJsonConfig(ref JsonConfig.ConfigObject jsonConfig)
        {
            List <string> fetchUrlTrends = new List <string>();

            System.IO.FileInfo jsonFi = new System.IO.FileInfo("C:\\Users\\HeinrichElsigan\\source\\repos\\Area23SemanticWeb\\Area23SemanticWeb\\trendfetch.json");
            jsonConfig = JsonConfig.Config.ApplyJsonFromFileInfo(jsonFi);

            foreach (var key in jsonConfig.Keys)
            {
                var jsonvalue = jsonConfig[key];
                // fetchUrlTrends.Add(jsonvalue);
                foreach (var trendUrl in (string[])jsonvalue)
                {
                    fetchUrlTrends.Add(trendUrl);
                }
            }

            return(fetchUrlTrends);
        }