private static ExternalAnnotationsCache ScanForMemberExternalAnnotations() { var result = new ExternalAnnotationsMap(); var parser = new ExternalAnnotationDocumentParser(); var recorder = new HighestLastWriteTimeUtcRecorder(); foreach (string path in EnumerateAnnotationFiles()) { recorder.VisitFile(path); using (StreamReader reader = File.OpenText(path)) { parser.ProcessDocument(reader, result); } } Compact(result); if (!result.Any()) { throw GetErrorForMissingExternalAnnotations(); } return(new ExternalAnnotationsCache(recorder.HighestLastWriteTimeUtc, result)); }
private static DateTime GetHighestLastWriteTimeUtc() { using (new CodeTimer("ExternalAnnotationsCache:Scan")) { var recorder = new HighestLastWriteTimeUtcRecorder(); foreach (string path in EnumerateAnnotationFiles()) { recorder.VisitFile(path); } return(recorder.HighestLastWriteTimeUtc); } }
private static ExternalAnnotationsCache ScanForMemberExternalAnnotations() { var result = new ExternalAnnotationsMap(); var parser = new ExternalAnnotationDocumentParser(); var recorder = new HighestLastWriteTimeUtcRecorder(); foreach (string path in EnumerateAnnotationFiles()) { recorder.VisitFile(path); using (StreamReader reader = File.OpenText(path)) { parser.ProcessDocument(reader, result); } } Compact(result); return new ExternalAnnotationsCache(recorder.HighestLastWriteTimeUtc, result); }
private static DateTime GetHighestLastWriteTimeUtc() { var recorder = new HighestLastWriteTimeUtcRecorder(); foreach (string path in EnumerateAnnotationFiles()) { recorder.VisitFile(path); } return recorder.HighestLastWriteTimeUtc; }
private static DateTime GetHighestLastWriteTimeUtc() { using (new CodeTimer("ExternalAnnotationsCache:Scan")) { var recorder = new HighestLastWriteTimeUtcRecorder(); foreach (string path in EnumerateAnnotationFiles()) { recorder.VisitFile(path); } if (!recorder.HasSeenFiles) { throw GetErrorForMissingExternalAnnotations(); } return recorder.HighestLastWriteTimeUtc; } }