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);
 }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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();
				};
			}
Exemplo n.º 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);
		}
Exemplo n.º 9
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 += _eventRaiseTimer_Tick;
		}
Exemplo n.º 10
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;
		}
Exemplo n.º 11
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;
				}
			}
		}
Exemplo n.º 12
0
 public void SetUp()
 {
     _timer     = new NuGenStubTimer();
     _eventSink = new EventSink(_timer);
 }