static void OnFinalizeCorrelationCompletedCallback(IAsyncResult result)
            {
                if (result.CompletedSynchronously)
                {
                    return;
                }

                ReplyAsyncResult thisPtr = (ReplyAsyncResult)result.AsyncState;

                Exception completionException = null;
                bool      completeSelf;

                try
                {
                    completeSelf = thisPtr.OnFinalizeCorrelationCompleted(result);
                }
                catch (Exception e)
                {
                    if (Fx.IsFatal(e))
                    {
                        throw;
                    }

                    completionException = e;
                    completeSelf        = true;
                }

                if (completeSelf)
                {
                    thisPtr.Complete(false, completionException);
                }
            }
            static void OnReplyCompletedCallback(IAsyncResult result)
            {
                if (result.CompletedSynchronously)
                {
                    return;
                }

                ReplyAsyncResult thisPtr = (ReplyAsyncResult)result.AsyncState;

                Exception completionException = null;

                try
                {
                    thisPtr.OnReplyCompleted(result);
                }
                catch (Exception e)
                {
                    if (Fx.IsFatal(e))
                    {
                        throw;
                    }

                    completionException = e;
                }

                thisPtr.Complete(false, completionException);
            }
Пример #3
0
            static void OnHttpPipelineSendCallback(object target, HttpResponseMessage httpResponseMessage)
            {
                ReplyAsyncResult thisPtr = (ReplyAsyncResult)target;

                Exception pendingException = null;
                bool      completed        = false;

                try
                {
                    completed = thisPtr.SendResponse(httpResponseMessage);
                }
                catch (Exception e)
                {
                    if (Fx.IsFatal(e))
                    {
                        throw;
                    }

                    pendingException = e;
                    completed        = true;
                }

                if (completed)
                {
                    thisPtr.Complete(false, pendingException);
                }
            }
Пример #4
0
 protected override void OnEndReply(IAsyncResult result)
 {
     ReplyAsyncResult.End(result);
 }
 public override void EndReply(IAsyncResult result)
 {
     ReplyAsyncResult.End(result);
 }