Пример #1
0
        static bool OnSendResolveResponseCompleted(IAsyncResult result)
        {
            ResolveDuplexAsyncResult <TResolveMessage, TResponseChannel> thisPtr =
                (ResolveDuplexAsyncResult <TResolveMessage, TResponseChannel>)result.AsyncState;

            thisPtr.EndSendResolveResponse(thisPtr.ResponseChannel, result);
            return(true);
        }
Пример #2
0
        static bool OnOnResolveCompleted(IAsyncResult result)
        {
            ResolveDuplexAsyncResult <TResolveMessage, TResponseChannel> thisPtr =
                (ResolveDuplexAsyncResult <TResolveMessage, TResponseChannel>)result.AsyncState;

            EndpointDiscoveryMetadata matchingEndpoint = thisPtr.discoveryServiceImpl.EndResolve(result);

            return(thisPtr.SendResolveResponse(matchingEndpoint));
        }
Пример #3
0
 public ProxyAnnouncementsSendAsyncResult(
     ResolveDuplexAsyncResult <TResolveMessage, TResponseChannel> resolveDuplexAsyncResult,
     Collection <EndpointDiscoveryMetadata> redirectionEndpoints,
     AsyncCallback callback,
     object state)
     : base(
         redirectionEndpoints.Count,
         resolveDuplexAsyncResult.context.MaxResponseDelay,
         callback,
         state)
 {
     this.resolveDuplexAsyncResult = resolveDuplexAsyncResult;
     this.redirectionEndpoints     = redirectionEndpoints;
     this.Start(this.resolveDuplexAsyncResult.timeoutHelper.RemainingTime());
 }
Пример #4
0
        static bool OnShouldRedirectResolveCompleted(IAsyncResult result)
        {
            Collection <EndpointDiscoveryMetadata> redirectionEndpoints = null;

            ResolveDuplexAsyncResult <TResolveMessage, TResponseChannel> thisPtr =
                (ResolveDuplexAsyncResult <TResolveMessage, TResponseChannel>)result.AsyncState;

            if (thisPtr.multicastSuppressionImpl.EndShouldRedirectResolve(result, out redirectionEndpoints))
            {
                return(thisPtr.SendProxyAnnouncements(redirectionEndpoints));
            }
            else
            {
                return(thisPtr.ProcessResolveRequest());
            }
        }