public FindResponsesSendAsyncResult( ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> probeDuplexAsyncResult, AsyncCallback callback, object state) : base( probeDuplexAsyncResult.context.MaxResponseDelay, probeDuplexAsyncResult.findRequest.MatchingEndpoints, callback, state) { this.probeDuplexAsyncResult = probeDuplexAsyncResult; this.Start(this.probeDuplexAsyncResult.timeoutHelper.RemainingTime()); }
static void OnFindCompleted(IAsyncResult result) { if (result.CompletedSynchronously) { return; } else { ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> thisPtr = (ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel>)result.AsyncState; thisPtr.FinishFind(result); } }
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); }
public ProxyAnnouncementsSendAsyncResult( ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> probeDuplexAsyncResult, Collection <EndpointDiscoveryMetadata> redirectionEndpoints, AsyncCallback callback, object state) : base( redirectionEndpoints.Count, probeDuplexAsyncResult.context.MaxResponseDelay, callback, state) { this.probeDuplexAsyncResult = probeDuplexAsyncResult; this.redirectionEndpoints = redirectionEndpoints; this.Start(this.probeDuplexAsyncResult.timeoutHelper.RemainingTime()); }
static bool OnShouldRedirectFindCompleted(IAsyncResult result) { Collection <EndpointDiscoveryMetadata> redirectionEndpoints = null; ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> thisPtr = (ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel>)result.AsyncState; if (thisPtr.multicastSuppressionImpl.EndShouldRedirectFind(result, out redirectionEndpoints)) { return(thisPtr.SendProxyAnnouncements(redirectionEndpoints)); } else { return(thisPtr.ProcessFindRequest()); } }
public DuplexFindContext(FindCriteria criteria, ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> probeDuplexAsyncResult) : base(criteria) { this.matchingEndpoints = new InputQueue <EndpointDiscoveryMetadata>(); this.probeDuplexAsyncResult = probeDuplexAsyncResult; }