コード例 #1
0
        bool SendFindResponses()
        {
            IAsyncResult result = new FindResponsesSendAsyncResult(
                this,
                this.PrepareAsyncCompletion(onSendFindResponsesCompletedCallback),
                this);

            return(result.CompletedSynchronously && OnSendFindResponsesCompleted(result));
        }
コード例 #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);
        }