Ejemplo n.º 1
0
 static void outputAggregateData(AggregateDataDollarAddresses aggregateData)
 {
     Console.WriteLine(aggregateData.ToString());
     foreach (string word in aggregateData.getDollarWords())
     {
         Console.WriteLine(word);
     }
 }
Ejemplo n.º 2
0
        static void Main()
        {
            string url   = ConfigurationManager.AppSettings.Get("url");
            string query = ConfigurationManager.AppSettings.Get("query");

            Console.WriteLine($"Trying to contact: {url}\nWith query: {query}");
            string         outputFilename          = ConfigurationManager.AppSettings.Get("outFilename");
            List <Address> addresses               = AddressServiceMethods.GetAddresses(url, query);
            AggregateDataDollarAddresses aggregate = calculateDollarAddresses(addresses);

            outputAggregateData(aggregate);
            saveList(aggregate.getDollarWords(), outputFilename);
            //Keep console open
            Console.Read();
        }