/// <summary> /// Main function. This console doesn't do anything with the timer right now. /// </summary> /// <param name="args">doens't use args right now</param> public static void Main(string[] args) { feeds = new BuildItem() { Timer = new System.Threading.Timer(new System.Threading.TimerCallback(OnFeedsTimedEvent), null, 60000, 60000), Title = "Feeds", Uri = new Uri("http://dfb-dashboard.elasticbeanstalk.com/Verify/Index/?build=true&feeds=true"), Description = "Build Azure Feeds" }; issues = new BuildItem() { Timer = new System.Threading.Timer(new System.Threading.TimerCallback(OnIssuesTimedEvent), null, 120000, 120000), Title = "Issues", Uri = new Uri("http://dfb-dashboard.elasticbeanstalk.com/Verify/Index/?build=true&issues=true"), Description = "Build Azure Issues" }; Console.WriteLine(@"Press 'q' and 'Enter' to quit..."); while (Console.Read() != 'q') { Thread.Sleep(1000); } }
/// <summary> /// Service Start actions /// </summary> /// <param name="args">not used here</param> protected override void OnStart(string[] args) { // start timer in one minute (60000) but then move to regular interval after that feeds = new BuildItem() { Timer = new System.Threading.Timer(new System.Threading.TimerCallback(this.OnFeedsTimedEvent), null, 60000, this.feedsTimer), Title = "Feeds", Uri = new Uri("http://dfb-dashboard.elasticbeanstalk.com/Verify/Index/?build=true&feeds=true"), Description = "Build Azure Feeds" }; // start timer in one minute (60000) but then move to regular interval after that issues = new BuildItem() { Timer = new System.Threading.Timer(new System.Threading.TimerCallback(this.OnIssuesTimedEvent), null, 60000, this.issuesTimer), Title = "Issues", Uri = new Uri("http://dfb-dashboard.elasticbeanstalk.com/Verify/Index/?build=true&issues=true"), Description = "Build Azure Issues" }; }