static AsyncStep GetDequeueStep()
        {
            if (dequeueStep == null)
            {
                dequeueStep = RandomDelayQueuedSendsAsyncResult <TItem> .CallAsync(
                    (thisPtr, t, c, s) => thisPtr.itemQueue.BeginDequeue(TimeSpan.MaxValue, c, s),
                    (thisPtr, r) => thisPtr.currentItem = thisPtr.itemQueue.EndDequeue(r));
            }

            return(dequeueStep);
        }
        static AsyncStep GetDelayStep()
        {
            if (delayStep == null)
            {
                delayStep = RandomDelayQueuedSendsAsyncResult <TItem> .CallAsync(
                    (thisPtr, t, c, s) => thisPtr.BeginDelay(c, s),
                    (thisPtr, r) => thisPtr.EndDelay(r));
            }

            return(delayStep);
        }