コード例 #1
0
        public override bool EnqueueWithoutDispatch(Exception exception, Action dequeuedCallback)
        {
            TChannel local = this.EnsureChannelAvailable();

            if (local != null)
            {
                return(local.EnqueueWithoutDispatch(exception, dequeuedCallback));
            }
            SingletonChannelAcceptor <ChannelInterfaceType, TChannel, QueueItemType> .InvokeDequeuedCallback(dequeuedCallback, false);

            return(false);
        }
コード例 #2
0
        public void Enqueue(Exception exception, Action dequeuedCallback, bool canDispatchOnThisThread)
        {
            TChannel local = this.EnsureChannelAvailable();

            if (local != null)
            {
                local.EnqueueAndDispatch(exception, dequeuedCallback, canDispatchOnThisThread);
            }
            else
            {
                SingletonChannelAcceptor <ChannelInterfaceType, TChannel, QueueItemType> .InvokeDequeuedCallback(dequeuedCallback, canDispatchOnThisThread);
            }
        }
コード例 #3
0
        public bool EnqueueWithoutDispatch(QueueItemType item, Action dequeuedCallback)
        {
            TChannel local = this.EnsureChannelAvailable();

            if (DiagnosticUtility.ShouldTraceInformation)
            {
                this.OnTraceMessageReceived(item);
            }
            if (local != null)
            {
                return(local.EnqueueWithoutDispatch(item, dequeuedCallback));
            }
            SingletonChannelAcceptor <ChannelInterfaceType, TChannel, QueueItemType> .InvokeDequeuedCallback(dequeuedCallback, false);

            item.Dispose();
            return(false);
        }
コード例 #4
0
        public void EnqueueAndDispatch(QueueItemType item, Action dequeuedCallback, bool canDispatchOnThisThread)
        {
            TChannel local = this.EnsureChannelAvailable();

            if (DiagnosticUtility.ShouldTraceInformation)
            {
                this.OnTraceMessageReceived(item);
            }
            if (local != null)
            {
                local.EnqueueAndDispatch(item, dequeuedCallback, canDispatchOnThisThread);
            }
            else
            {
                SingletonChannelAcceptor <ChannelInterfaceType, TChannel, QueueItemType> .InvokeDequeuedCallback(dequeuedCallback, canDispatchOnThisThread);

                item.Dispose();
            }
        }