static async System.Threading.Tasks.Task Main(string[] args) { // explicitly do not call "await" here -- we want it to keep running. TCC.BirdWatcher.Watcher.Launch("hUIW5cbhwM8FRHeEqzAxgIBOG", "6bgNHjiFWV9QLctPoC8qUc0mzXLU9DP2PDQrML6oryzJPHElFR"); System.Threading.Thread.Sleep(3000); var storage = new TCC.Data.Storage.Gatherer(); storage.Start(); //System.Threading.Thread.Sleep(10000); //await TCC.BirdWatcher.Watcher.Halt(); //storage.Halt(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { string twitterConsumerKey = ConfigurationManager.AppSettings["TwitterConsumerKey"]; string twitterConsumerSecret = ConfigurationManager.AppSettings["TwitterConsumerSecret"]; //TCC.BirdWatcher.Watcher.Launch("hUIW5cbhwM8FRHeEqzAxgIBOG", "6bgNHjiFWV9QLctPoC8qUc0mzXLU9DP2PDQrML6oryzJPHElFR"); // explicitly do NOT use "await" here -- we want it to keep running. TCC.BirdWatcher.Watcher.Launch(twitterConsumerKey, twitterConsumerSecret); // Fun test...let the Twitter capture run ahead and load up the queue, // before we start pulling them into storage. System.Threading.Thread.Sleep(3000); // Now start pulling data from queue. var storage = new TCC.Data.Storage.Gatherer(); storage.Start(); // Halting switches -- but didn't wire these into the UI. //await TCC.BirdWatcher.Watcher.Halt(); //storage.Halt(); }