private void ServiceScanner_OnScanProgress(ProcessingQueueItem <ServiceInput, bool> item) { if (item.Output) { outputInput.WriteLine("Found service on: " + item.Input.Endpoint.ToString()); } }
private void PingScanner_OnScanProgress(ProcessingQueueItem <PingInput, PingResult> item) { if (item.Output?.Reply?.Status == IPStatus.Success) { outputInput.WriteLine("Device found on: " + item.Input.Address); } }
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")}"); } }
public override Task ReportProgress(ProcessingQueueItem <TestFile, bool> item) { if (item.Output) { lock (progressLock) { filesProcessed++; sizeProcessed += item.Input.FileSize; ReportFileProgress(GetFileProgress()); } } return(Task.CompletedTask); }
public override Task ReportProgress(ProcessingQueueItem <PingInput, PingResult> item) { OnScanProgress(item); return(Task.CompletedTask); }
public override Task ReportProgress(ProcessingQueueItem <ServiceInput, bool> item) { OnScanProgress(item); return(Task.CompletedTask); }
public override Task ReportProgress(ProcessingQueueItem <int, int> item) { outputInput.WriteLine($"Processed item {item.Input} with result {item.Output}"); return(Task.CompletedTask); }