예제 #1
0
파일: Timer.cs 프로젝트: rsumner31/corefx2
        /// <summary>
        ///    <para>Disposes of the resources (other than memory) used by
        ///       the <see cref='System.Timers.Timer'/>.</para>
        /// </summary>
        public void Close()
        {
            _initializing  = false;
            _delayedEnable = false;
            _enabled       = false;

            if (_timer != null)
            {
                _timer.Dispose();
                _timer = null;
            }
        }
예제 #2
0
 protected void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         if (disposing)
         {
             _startScheduler.Dispose();
             _stopScheduler.Dispose();
         }
         Stop();
     }
     _disposed = true;
 }