2 overrides of GetDiagnostics
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpCompilation.cs (1)
2891public override ImmutableArray<Diagnostic> GetDiagnostics(CancellationToken cancellationToken = default)
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\VisualBasicCompilation.vb (1)
2080Public Overrides Function GetDiagnostics(Optional cancellationToken As CancellationToken = Nothing) As ImmutableArray(Of Diagnostic)
36 references to GetDiagnostics
AnalyzerRunner (1)
Program.cs (1)
151foreach (var diagnostic in compilation.GetDiagnostics(cancellationToken))
Microsoft.AspNetCore.Analyzer.Testing (1)
CodeFixRunner.cs (1)
51var diagnostics = compilation.GetDiagnostics();
Microsoft.AspNetCore.Http.Extensions.Tests (5)
RequestDelegateGenerator\CompileTimeCreationTests.cs (4)
70var diagnostics = updatedCompilation.GetDiagnostics(); 96var diagnostics = updatedCompilation.GetDiagnostics(); 178var diagnostics = updatedCompilation.GetDiagnostics(); 739var diagnostics = updatedCompilation.GetDiagnostics();
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
74var diagnostics = updatedCompilation.GetDiagnostics();
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
74var diagnostics = updatedCompilation.GetDiagnostics();
Microsoft.CodeAnalysis (5)
Compilation\Compilation.cs (2)
253if (previousScriptCompilation.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error)) 3186diagnostics.AddRange(this.GetDiagnostics(cancellationToken));
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (3)
313var compDiags = compilation.GetDiagnostics(cancellationToken); 756_ = compilation.GetDiagnostics(cancellationToken); 1027_ = compilation.GetDiagnostics(cancellationToken);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Semantics\SpeculationAnalyzerTests.cs (1)
540return !langCompilation.GetDiagnostics().Any(isProblem) &&
Workspaces\WorkspaceTests_EditorFeatures.cs (3)
499var errors = compilation2.GetDiagnostics(); 553var errors = compilation2y.GetDiagnostics(); 621var errors = compilation2y.GetDiagnostics();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\GetDiagnosticsTests.cs (1)
377var unused = compilation.GetDiagnostics();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\UsedAssembliesTests.cs (1)
279var diagnostics = comp.GetDiagnostics();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
172var diagnostics = compilation.GetDiagnostics().ToArray();
Microsoft.CodeAnalysis.Features.UnitTests (5)
FindUsages\DefinitionItemFactoryTests.cs (5)
935Assert.Empty(compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error)); 1340Assert.Empty(compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error)); 1400Assert.Empty(compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error)); 1515Assert.Empty(compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error)); 1586Assert.Empty(compilation.GetDiagnostics());
Microsoft.CodeAnalysis.Scripting (1)
Script.cs (1)
367return ImmutableArray.CreateRange(GetCompilation().GetDiagnostics(cancellationToken).Where(d => d.Severity == DiagnosticSeverity.Warning));
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\DiagnosticExtensions.cs (1)
108var diagnostics = c.GetDiagnostics();
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
UsedAssembliesTests.vb (1)
130Dim diagnostics = comp.GetDiagnostics()
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
CompilationTestUtils.vb (1)
757AssertNoErrors(compilation.GetDiagnostics())
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (5)
VisualStudioMSBuildWorkspaceTests.cs (5)
374var diagnostics = compilation.GetDiagnostics() 1469var diagnostics = compilation.GetDiagnostics(); 2308var errs = comp.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error); 2413comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).Verify(); 2430comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).Verify();
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\SolutionTests.cs (2)
4846var diagnostics = originalCompilation.GetDiagnostics(); 4867diagnostics = newCompilation.GetDiagnostics();