public IAsyncResult BeginProbeMatchOperation(ProbeMatchesMessageApril2005 response, AsyncCallback callback, object state) { Fx.Assert(response != null, "The response message cannot be null."); if (response.ProbeMatches != null) { this.responseReceiver.ProbeMatchOperation( OperationContext.Current.IncomingMessageHeaders.RelatesTo, DiscoveryUtility.ToDiscoveryMessageSequenceOrNull(response.MessageSequence), DiscoveryUtility.ToEndpointDiscoveryMetadataCollection(response.ProbeMatches), false); } return(new CompletedAsyncResult(callback, state)); }
public void EndProbeOperation(IAsyncResult result) { ProbeMatchesMessageCD1 response = base.Channel.EndProbeOperation(result); AsyncOperationContext context = (AsyncOperationContext)result.AsyncState; if ((response != null) && (response.ProbeMatches != null)) { this.responseReceiver.ProbeMatchOperation( context.OperationId, DiscoveryUtility.ToDiscoveryMessageSequenceOrNull(response.MessageSequence), DiscoveryUtility.ToEndpointDiscoveryMetadataCollection(response.ProbeMatches), true); } else { this.responseReceiver.PostFindCompletedAndRemove(context.OperationId, false, null); } }
public void ProbeOperation(FindCriteria findCriteria) { ProbeMessageCD1 request = new ProbeMessageCD1(); request.Probe = FindCriteriaCD1.FromFindCriteria(findCriteria); ProbeMatchesMessageCD1 response = base.Channel.ProbeOperation(request); if ((response != null) && (response.ProbeMatches != null)) { this.responseReceiver.ProbeMatchOperation( OperationContext.Current.IncomingMessageHeaders.RelatesTo, DiscoveryUtility.ToDiscoveryMessageSequenceOrNull(response.MessageSequence), DiscoveryUtility.ToEndpointDiscoveryMetadataCollection(response.ProbeMatches), true); } else { this.responseReceiver.PostFindCompletedAndRemove(OperationContext.Current.IncomingMessageHeaders.RelatesTo, false, null); } }
public IAsyncResult BeginProbeMatchOperation(ProbeMatchesMessageCD1 response, AsyncCallback callback, object state) { Fx.Assert(response != null, "The response message cannot be null."); if ((response.MessageSequence != null) && (response.ProbeMatches != null)) { this.responseReceiver.ProbeMatchOperation( OperationContext.Current.IncomingMessageHeaders.RelatesTo, response.MessageSequence.ToDiscoveryMessageSequence(), DiscoveryUtility.ToEndpointDiscoveryMetadataCollection(response.ProbeMatches), false); } else { if (response.MessageSequence == null && TD.DiscoveryMessageWithNullMessageSequenceIsEnabled()) { TD.DiscoveryMessageWithNullMessageSequence( ProtocolStrings.TracingStrings.ProbeMatches, OperationContext.Current.IncomingMessageHeaders.MessageId.ToString()); } } return(new CompletedAsyncResult(callback, state)); }