public void SetUp()
		{
			_span = new NuGenCountDownSpan(1, 3);
			_timer = new StubTimer();
			_timer.Interval = 1;
			_countDownBlock = new NuGenCountDownBlock(_span, _timer);
			_eventSink = new EventSink(_countDownBlock);
		}
 public void SetUp()
 {
     _span           = new NuGenCountDownSpan(1, 3);
     _timer          = new StubTimer();
     _timer.Interval = 1;
     _countDownBlock = new NuGenCountDownBlock(_span, _timer);
     _eventSink      = new EventSink(_countDownBlock);
 }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NuGenDEHService"/> class.
        /// </summary>
        public NuGenDEHService(INuGenTimer eventRaiseTimer)
        {
            if (eventRaiseTimer == null)
            {
                throw new ArgumentNullException("eventRaiseTimer");
            }

            _eventRaiseTimer       = eventRaiseTimer;
            _eventRaiseTimer.Tick += this.eventRaiseTimer_Tick;
        }
示例#4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NuGenCountDownBlock"/> class.
        /// </summary>
        /// <exception cref="ArgumentNullException">
        /// <para><paramref name="timer"/> is <see langword="null"/>.</para>
        /// </exception>
        public NuGenCountDownBlock(NuGenCountDownSpan initialSpan, INuGenTimer timer)
        {
            if (timer == null)
            {
                throw new ArgumentNullException("timer");
            }

            _minutes     = initialSpan.Minutes;
            _seconds     = initialSpan.Seconds;
            _timer       = timer;
            _timer.Tick += _timer_Tick;
        }
示例#5
0
            public EventSink(INuGenTimer eventBubbler)
            {
                if (eventBubbler == null)
                {
                    Assert.Fail("eventBubbler cannot not be null.");
                }

                eventBubbler.Tick += delegate
                {
                    _tickCount.Inc();
                };
            }
			public EventSink(INuGenTimer eventBubbler)
			{
				if (eventBubbler == null)
				{
					Assert.Fail("eventBubbler cannot not be null.");
				}

				eventBubbler.Tick += delegate
				{
					_tickCount.Inc();
				};
			}
示例#7
0
        /// <summary>
        /// </summary>
        /// <param name="disposing">
        /// <see langword="true"/> to release both managed and unmanaged resources;
        /// <see langword="false"/> to release only unmanaged resources.
        /// </param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                GC.SuppressFinalize(this);

                if (_timer != null)
                {
                    _timer.Tick -= _timer_Tick;
                    _timer.Dispose();
                    _timer = null;
                }
            }
        }
		public void SetUp()
		{
			_timer = new NuGenStubTimer();
			_eventSink = new EventSink(_timer);
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenDEHService"/> class.
		/// </summary>
		public NuGenDEHService(INuGenTimer eventRaiseTimer)
		{
			if (eventRaiseTimer == null)
			{
				throw new ArgumentNullException("eventRaiseTimer");
			}

			_eventRaiseTimer = eventRaiseTimer;
			_eventRaiseTimer.Tick += _eventRaiseTimer_Tick;
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenCountDownBlock"/> class.
		/// </summary>
		/// <exception cref="ArgumentNullException">
		/// <para><paramref name="timer"/> is <see langword="null"/>.</para>
		/// </exception>
		public NuGenCountDownBlock(NuGenCountDownSpan initialSpan, INuGenTimer timer)
		{
			if (timer == null)
			{
				throw new ArgumentNullException("timer");
			}

			_minutes = initialSpan.Minutes;
			_seconds = initialSpan.Seconds;
			_timer = timer;
			_timer.Tick += _timer_Tick;
		}
		/// <summary>
		/// </summary>
		/// <param name="disposing">
		/// <see langword="true"/> to release both managed and unmanaged resources;
		/// <see langword="false"/> to release only unmanaged resources.
		/// </param>
		protected virtual void Dispose(bool disposing)
		{
			if (disposing)
			{
				GC.SuppressFinalize(this);

				if (_timer != null)
				{
					_timer.Tick -= _timer_Tick;
					_timer.Dispose();
					_timer = null;
				}
			}
		}
示例#12
0
 public void SetUp()
 {
     _timer     = new NuGenStubTimer();
     _eventSink = new EventSink(_timer);
 }