Пример #1
0
        private void TimerSetup(TimerCallback callback,
                                Object state,
                                UInt32 dueTime,
                                UInt32 period,
                                ref StackCrawlMark stackMark)
        {
            if (callback == null)
            {
                throw new ArgumentNullException("TimerCallback");
            }
            Contract.EndContractBlock();

            object timer;

            if (UseNetCoreTimer)
            {
                // As of https://github.com/dotnet/coreclr/pull/18670, NetCore allows the caller to specify the value of
                // 'flowExecutionContext' and that change has not been ported to NetFx. The old behavior is preserved here.
                timer = new NetCore.TimerQueueTimer(callback, state, dueTime, period, flowExecutionContext: true, stackMark: ref stackMark);
            }
            else
            {
                timer = new TimerQueueTimer(callback, state, dueTime, period, ref stackMark);
            }
            m_timer = new TimerHolder(timer);
        }
Пример #2
0
 private void TimerSetup(TimerCallback callback, object state, uint dueTime, uint period, ref StackCrawlMark stackMark)
 {
     if (callback == null)
     {
         throw new ArgumentNullException("TimerCallback");
     }
     this.m_timer = new TimerHolder(new TimerQueueTimer(callback, state, dueTime, period, ref stackMark));
 }
Пример #3
0
        private void TimerSetup(TimerCallback callback,
                                object state,
                                uint dueTime,
                                uint period)
        {
            if (callback == null)
            {
                throw new ArgumentNullException(nameof(TimerCallback));
            }

            m_timer = new TimerHolder(new TimerQueueTimer(callback, state, dueTime, period));
        }
Пример #4
0
        private void TimerSetup(TimerCallback callback,
                                Object state,
                                UInt32 dueTime,
                                UInt32 period)
        {
            if (callback == null)
            {
                throw new ArgumentNullException("TimerCallback");
            }
            Contract.EndContractBlock();

            m_timer = new TimerHolder(new TimerQueueTimer(callback, state, dueTime, period));
        }
Пример #5
0
        private void TimerSetup(TimerCallback callback,
                                object state,
                                uint dueTime,
                                uint period,
                                bool flowExecutionContext = true)
        {
            if (callback == null)
            {
                throw new ArgumentNullException(nameof(TimerCallback));
            }

            m_timer = new TimerHolder(new TimerQueueTimer(callback, state, dueTime, period, flowExecutionContext));
        }
Пример #6
0
        private void TimerSetup(TimerCallback callback,
                                Object state,
                                UInt32 dueTime,
                                UInt32 period,
                                ref StackCrawlMark stackMark)
        {
            if (callback == null)
            {
                throw new ArgumentNullException(nameof(TimerCallback));
            }
            Contract.EndContractBlock();

            m_timer = new TimerHolder(new TimerQueueTimer(callback, state, dueTime, period, ref stackMark));
        }
Пример #7
0
        private void TimerSetup(TimerCallback callback,
                                Object state, 
                                UInt32 dueTime,
                                UInt32 period,
                                ref StackCrawlMark stackMark)
        {
            if (callback == null)
                throw new ArgumentNullException("TimerCallback");
            Contract.EndContractBlock();

            m_timer = new TimerHolder(new TimerQueueTimer(callback, state, dueTime, period, ref stackMark));
        }
Пример #8
0
 private void TimerSetup(TimerCallback callback, object state, uint dueTime, uint period, ref StackCrawlMark stackMark)
 {
     if (callback == null)
     throw new ArgumentNullException("TimerCallback");
       this.m_timer = new TimerHolder(new TimerQueueTimer(callback, state, dueTime, period, ref stackMark));
 }