Esempio n. 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);
        }
Esempio n. 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));
 }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
 }