コード例 #1
0
        /// <summary>
        /// Constructs a NHLGameMonitor object
        /// </summary>
        /// <param name="nhlGrabber">The grabber to work with</param>
        public NHLGameMonitor(NHLGameGrabber nhlGrabber)
        {
            gameGrabber = nhlGrabber;

            gameUpdateTimes = new Dictionary<int, DateTime>();
            monitorTimer = new Timer(DEFAULT_INTERVAL);
            monitorTimer.Elapsed += Pulse;
        }
コード例 #2
0
        /// <summary>
        /// Constructs a NHLGameMonitor object
        /// </summary>
        /// <param name="nhlGrabber">The grabber to work with</param>
        public NHLGameMonitor(NHLGameGrabber nhlGrabber)
        {
            gameGrabber = nhlGrabber;

            gameUpdateTimes       = new Dictionary <int, DateTime>();
            monitorTimer          = new Timer(DEFAULT_INTERVAL);
            monitorTimer.Elapsed += Pulse;
        }
コード例 #3
0
 public void Construct()
 {
     NHLGameGrabber grabber = new NHLGameGrabber();
     string actual = string.Format("http://api.thescore.com/{0}/events?game_date.in={1}T04:00:00,{2}T04:00:00",
                             "nhl",
                             DateTime.Today.ToString("yyyy-MM-dd"),
                             DateTime.Today.AddDays(1.0d).ToString("yyyy-MM-dd"));
     Assert.AreEqual<string>(grabber.ScoreUrl,actual,"Malformed api url");
 }