internal async Task Start() { YahooFinanceService yahooFinanceService = new YahooFinanceService(); InternalTwitterService internalTwitterService = new InternalTwitterService(); string currentPrice = await yahooFinanceService.GetCurrentPrice(); double currentPriceDouble; double.TryParse(currentPrice, out currentPriceDouble); string totalAssets = await yahooFinanceService.GetTotalAssets(); double totalAssetsDouble; double.TryParse(totalAssets, out totalAssetsDouble); string newStatus = String.Format("{0}. {1} {2:C0}. {3} {4:C}.", totalAssetsDouble > 10000000000 ? "YES" : "NO", "Total Assets: ", totalAssetsDouble, "Current Price: ", currentPriceDouble); //Console.WriteLine(String.Format("{0}", newStatus)); await internalTwitterService.SendTweetWithTweetSharp(newStatus); await LogEventToFile(newStatus); }
public void TestInitialize() { this.yahooFinanceService = new YahooFinanceService(); }