Arnolyzer.Tests.DiagnosticVerification.DiagnosticsGenerator.GetSortedDiagnosticsFromDocuments C# (CSharp) Метод

GetSortedDiagnosticsFromDocuments() приватный статический Метод

private static GetSortedDiagnosticsFromDocuments ( Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer analyzer, Microsoft.CodeAnalysis.TextDocument document, Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions options ) : IOrderedEnumerable
analyzer Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer
document Microsoft.CodeAnalysis.TextDocument
options Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions
Результат IOrderedEnumerable
        private static IOrderedEnumerable<Diagnostic> GetSortedDiagnosticsFromDocuments(DiagnosticAnalyzer analyzer,
                                                                                        TextDocument document,
                                                                                        AnalyzerOptions options)
        {
            var diagnostics = document.Project.GetCompilationAsync()
                                      .Result
                                      .WithAnalyzers(ImmutableArray.Create(analyzer),
                                                     options)
                                      .GetAnalyzerDiagnosticsAsync().Result;

            return SortDiagnostics(diagnostics);
        }