public ScannerResult Scan <T>(T snapshot) where T : Snapshot { if (!_factory.TryGet(out DiagnosticScanner <T> scanner)) { return(DiagnosticCache.EmptyScannerResult); } var results = scanner.Scan(snapshot); return(new () { Id = NewId.NextGuid(), ScannerId = scanner.Metadata.Identifier, Results = results, Timestamp = DateTimeOffset.Now }); }
public ScannerResult Scan <T>(T snapshot) where T : Snapshot { if (!_factory.TryGet(out DiagnosticScanner <T> scanner)) { return(DiagnosticCache.EmptyScannerResult); } var results = scanner.Scan(snapshot); return(new SuccessfulScannerResult(scanner.Metadata.Identifier, results)); }