static void Main(string[] args) { var cache = new JsonSerializer(); var fireAntClient = new FireAntClient(cache, new ErrorLogger()); var data = new List <StockItem>(); var stockList = vn30.Union(others).Distinct(); foreach (var symbol in stockList) { data.Add(fireAntClient.GetStockInfo(symbol)); } ImportToSQLServer(data); Console.WriteLine(" -- DONE -- "); Console.ReadLine(); }
static async Task Main(string[] args) { var apiKey = "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"; var client = new SendGridClient(apiKey); var from = new EmailAddress("*****@*****.**", "Example User"); var subject = "Sending with Twilio SendGrid is Fun"; var to = new EmailAddress("*****@*****.**", "Example User"); var plainTextContent = "and easy to do anywhere, even with C#"; var htmlContent = "<strong>and easy to do anywhere, even with C#</strong>"; var msg = MailHelper.CreateSingleEmail(from, to, subject, plainTextContent, htmlContent); var response = await client.SendEmailAsync(msg).ConfigureAwait(false); return; var cache = new JsonSerializer(); var fireAntClient = new FireAntClient(cache,new ErrorLogger()); var data = new List<StockItem>(); var intradayItems = fireAntClient.GetIntraday("SZC"); var stockList = vn30.Union(others).Distinct(); foreach (var symbol in stockList) { data.Add(fireAntClient.GetStockInfo(symbol)); } ImportToSQLServer(data); Console.WriteLine(" -- DONE -- "); Console.ReadLine(); }