System.Threading._TimerCallback.PerformTimerCallback C# (CSharp) Method

PerformTimerCallback() static private method

static private PerformTimerCallback ( Object state ) : void
state Object
return void
        static internal void PerformTimerCallback(Object state)
        {
            _TimerCallback helper = (_TimerCallback)state; 

            BCLDebug.Assert(helper != null, "Null state passed to PerformTimerCallback!");
            // call directly if EC flow is suppressed
            if (helper._executionContext == null)
            {
                TimerCallback callback = helper._timerCallback;
                callback(helper._state);
            }
            else
            {
                // From this point on we can use useExecutionContext for this callback
                ExecutionContext.Run(helper._executionContext.CreateCopy(), _ccb, helper);
            }
        }
    }