Ejemplo n.º 1
0
        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 });
        }
Ejemplo n.º 2
0
        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));
        }