public FindRequestResponseContext(
     FindCriteria criteria,
     ProbeRequestResponseAsyncResult <TProbeMessage, TResponseMessage> probeRequestResponseAsyncResult)
     : base(criteria)
 {
     this.matchingEndpoints = new Collection <EndpointDiscoveryMetadata>();
     this.probeRequestResponseAsyncResult = probeRequestResponseAsyncResult;
 }
        static bool OnOnFindCompleted(IAsyncResult result)
        {
            ProbeRequestResponseAsyncResult <TProbeMessage, TResponseMessage> thisPtr =
                (ProbeRequestResponseAsyncResult <TProbeMessage, TResponseMessage>)result.AsyncState;

            lock (thisPtr.findCompletedLock)
            {
                thisPtr.isFindCompleted = true;
            }

            thisPtr.discoveryServiceImpl.EndFind(result);
            return(true);
        }