Example #1
0
 public ChannelReader <WorkerResponse <DnsLookupResponse> > DnsLookup(
     DnsLookupRequest request,
     CancellationToken cancellationToken
     )
 {
     return(new GenericRunner <DnsLookupRequest, DnsLookupResponse>(
                _workerProvider,
                client => client.DnsLookup(new Worker.DnsLookupRequest
     {
         Host = request.Host,
         Server = request.Server ?? "",
         Type = request.Type,
     }, cancellationToken: cancellationToken)).Run(request, Clients.Caller, request.Workers, cancellationToken));
 }
Example #2
0
        public ChannelReader <WorkerResponse <DnsTraversalResponse> > DnsTraversal(
            DnsLookupRequest request,
            CancellationToken cancellationToken
            )
        {
            var workers = request.Workers ?? new[] { _defaultWorker }.ToImmutableHashSet();

            return(new GenericRunner <DnsLookupRequest, DnsTraversalResponse>(
                       _workerProvider,
                       client => client.DnsTraversal(new Worker.DnsTraversalRequest
            {
                Host = request.Host,
                Type = request.Type,
            }, cancellationToken: cancellationToken)).Run(request, Clients.Caller, workers, cancellationToken));
        }