public IAsyncResult BeginResolveMatchOperation(ResolveMatchesMessageApril2005 response, AsyncCallback callback, object state)
 {
     Fx.Assert(response != null, "The response message cannot be null.");
     if ((response.ResolveMatches != null) && (response.ResolveMatches.ResolveMatch != null))
     {
         this.responseReceiver.ResolveMatchOperation(
             OperationContext.Current.IncomingMessageHeaders.RelatesTo,
             DiscoveryUtility.ToDiscoveryMessageSequenceOrNull(response.MessageSequence),
             response.ResolveMatches.ResolveMatch.ToEndpointDiscoveryMetadata());
     }
     return(new CompletedAsyncResult(callback, state));
 }
 protected override IAsyncResult BeginSendResolveResponse(
     IDiscoveryResponseContractApril2005 responseChannel,
     DiscoveryMessageSequence discoveryMessageSequence,
     EndpointDiscoveryMetadata matchingEndpoint,
     AsyncCallback callback,
     object state)
 {
     return(responseChannel.BeginResolveMatchOperation(
                ResolveMatchesMessageApril2005.Create(
                    discoveryMessageSequence,
                    matchingEndpoint),
                callback,
                state));
 }