private void ResumeProcessing(IResumeMessageRpc resume)
 {
     bool flag;
     resume.Resume(out flag);
     if (flag)
     {
         string message = System.ServiceModel.SR.GetString("SFxMultipleCallbackFromSynchronizationContext", new object[] { this.context.GetType().ToString() });
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(message));
     }
 }
Exemplo n.º 2
0
        //        static void OnFinalizeCorrelationCompletedCallback(IAsyncResult result)
        //        {
        //            if (result.CompletedSynchronously)
        //            {
        //                return;
        //            }

        //            IResumeMessageRpc resume = result.AsyncState as IResumeMessageRpc;

        //            if (resume == null)
        //            {
        //                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(SR.Format(SR.SFxInvalidAsyncResultState0));
        //            }

        //            resume.Resume(result);
        //        }

        static void OnReplyCompletedCallback(Task result, object state)
        {
            IResumeMessageRpc resume = state as IResumeMessageRpc;

            if (resume == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(SR.SFxInvalidAsyncResultState0);
            }

            resume.Resume(result);
        }
        private void ResumeProcessing(IResumeMessageRpc resume)
        {
            bool flag;

            resume.Resume(out flag);
            if (flag)
            {
                string message = System.ServiceModel.SR.GetString("SFxMultipleCallbackFromSynchronizationContext", new object[] { this.context.GetType().ToString() });
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(message));
            }
        }
Exemplo n.º 4
0
        private void ResumeProcessing(IResumeMessageRpc resume)
        {
            bool alreadyResumedNoLock;

            resume.Resume(out alreadyResumedNoLock);

            if (alreadyResumedNoLock)
            {
                string text = SR.Format(SR.SFxMultipleCallbackFromSynchronizationContext, _context.GetType().ToString());
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text));
            }
        }
Exemplo n.º 5
0
        private static void OnReplyCompletedCallback(IAsyncResult result)
        {
            if (result.CompletedSynchronously)
            {
                return;
            }

            IResumeMessageRpc resume = result.AsyncState as IResumeMessageRpc;

            if (resume == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(SR.SFxInvalidAsyncResultState0);
            }

            resume.Resume(result);
        }
Exemplo n.º 6
0
            void IWaiter.Signal()
            {
                try
                {
                    bool alreadyResumedNoLock;
                    resume.Resume(out alreadyResumedNoLock);

                    if (alreadyResumedNoLock)
                    {
                        Fx.Assert("ConcurrencyBehavior resumed more than once for same call.");
                    }
                }
                catch (Exception e)
                {
                    if (Fx.IsFatal(e))
                    {
                        throw;
                    }
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperCallback(e);
                }
            }
Exemplo n.º 7
0
        private void ResumeProcessing(IResumeMessageRpc resume)
        {
            bool alreadyResumedNoLock;
            resume.Resume(out alreadyResumedNoLock);

            if (alreadyResumedNoLock)
            {
                string text = SR.Format(SR.SFxMultipleCallbackFromSynchronizationContext, _context.GetType().ToString());
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text));
            }
        }