コード例 #1
0
 private void ServiceScanner_OnScanProgress(ProcessingQueueItem <ServiceInput, bool> item)
 {
     if (item.Output)
     {
         outputInput.WriteLine("Found service on: " + item.Input.Endpoint.ToString());
     }
 }
コード例 #2
0
 private void PingScanner_OnScanProgress(ProcessingQueueItem <PingInput, PingResult> item)
 {
     if (item.Output?.Reply?.Status == IPStatus.Success)
     {
         outputInput.WriteLine("Device found on: " + item.Input.Address);
     }
 }
コード例 #3
0
 private void PortScanner_OnScanProgress(ProcessingQueueItem <PortInput, List <PortResult> > item)
 {
     outputInput.WriteLine("Ports for " + item.Input.Address.ToString());
     foreach (var result in item.Output)
     {
         outputInput.WriteLine($"\t{result.Port} - {(result.IsOpen ? "Opened" : "Closed")}");
     }
 }
コード例 #4
0
 public override Task ReportProgress(ProcessingQueueItem <TestFile, bool> item)
 {
     if (item.Output)
     {
         lock (progressLock)
         {
             filesProcessed++;
             sizeProcessed += item.Input.FileSize;
             ReportFileProgress(GetFileProgress());
         }
     }
     return(Task.CompletedTask);
 }
コード例 #5
0
 public override Task ReportProgress(ProcessingQueueItem <PingInput, PingResult> item)
 {
     OnScanProgress(item);
     return(Task.CompletedTask);
 }
コード例 #6
0
 public override Task ReportProgress(ProcessingQueueItem <ServiceInput, bool> item)
 {
     OnScanProgress(item);
     return(Task.CompletedTask);
 }
コード例 #7
0
 public override Task ReportProgress(ProcessingQueueItem <int, int> item)
 {
     outputInput.WriteLine($"Processed item {item.Input} with result {item.Output}");
     return(Task.CompletedTask);
 }