Esempio n. 1
0
        bool SendFindResponses()
        {
            IAsyncResult result = new FindResponsesSendAsyncResult(
                this,
                this.PrepareAsyncCompletion(onSendFindResponsesCompletedCallback),
                this);

            return(result.CompletedSynchronously && OnSendFindResponsesCompleted(result));
        }
Esempio n. 2
0
        static bool OnSendFindResponsesCompleted(IAsyncResult result)
        {
            FindResponsesSendAsyncResult.End(result);

            ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> thisPtr =
                (ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel>)result.AsyncState;

            if (thisPtr.findException != null)
            {
                throw FxTrace.Exception.AsError(thisPtr.findException);
            }

            return(true);
        }