IServiceOriented.ServiceBus.Services.TimerEvent.onTimerElapsed C# (CSharp) Method

onTimerElapsed() static private method

static private onTimerElapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
sender object
e System.Timers.ElapsedEventArgs
return void
        void onTimerElapsed(object sender, ElapsedEventArgs e)
        {
            if (!_timer.AutoReset)
            {
                _timer.Interval = Interval.TotalMilliseconds;
                _timer.AutoReset = true;
                _timer.Start();
            }
            Action action = Action;
            if (action != null)
            {
                _current = this;
                try
                {
                    action();
                }
                finally
                {
                    _current = null;
                }
            }
        }