1 write to Diagnostics
Microsoft.CodeAnalysis (1)
Compilation\EmitResult.cs (1)
32Diagnostics = diagnostics;
199 references to Diagnostics
BuildValidator (2)
CompilationDiff.cs (2)
145foreach (var diag in emitResult.Diagnostics) 153diagnostics: emitResult.Diagnostics);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
151Assert.Empty(result.Diagnostics.Where(d => d.Severity > DiagnosticSeverity.Warning));
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
151Assert.Empty(result.Diagnostics.Where(d => d.Severity > DiagnosticSeverity.Warning));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
359result.Diagnostics);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
CompilerFailedExceptionFactoryTest.cs (1)
60emitResult.Diagnostics);
Microsoft.CodeAnalysis (2)
Compilation\EmitResult.cs (2)
38if (Diagnostics != null) 40result += ", Diagnostics.Count = " + Diagnostics.Length;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
327Assert.Empty(result.Diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error));
Semantics\SpeculationAnalyzerTests.cs (1)
541!langCompilation.Emit(temporaryStream).Diagnostics.Any(isProblem);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (72)
CodeGen\CodeGenExprLambdaTests.cs (6)
470CreateCompilationWithMscorlib40AndSystemCore(program).Emit(new System.IO.MemoryStream()).Diagnostics 5383result.Diagnostics.Verify( 5445result.Diagnostics.Verify( 5518result.Diagnostics.Verify( 6035result.Diagnostics.Verify( 6082result.Diagnostics.Verify(
CodeGen\CodeGenFieldInitTests.cs (1)
702.Emit(new System.IO.MemoryStream()).Diagnostics
CodeGen\CodeGenMscorlib.cs (1)
492compilation2.Emit(new System.IO.MemoryStream()).Diagnostics.Verify(
CodeGen\CodeGenTests.cs (4)
14569result.Diagnostics.Verify( 14603result.Diagnostics.Verify( 14639result.Diagnostics.Verify( 14662result.Diagnostics.Verify();
CodeGen\EventTests.cs (1)
671compilation2.Emit(new System.IO.MemoryStream()).Diagnostics.Verify(
Emit\CompilationEmitTests.cs (34)
55emitResult.Diagnostics.Verify( 162emitResult.Diagnostics.Verify( 219emitResult.Diagnostics.Verify(); 242emitResult.Diagnostics.Verify(); 277emitResult.Diagnostics.Verify(); 322emitResult.Diagnostics.Verify(); 369emitResult.Diagnostics.Verify( 423emitResult.Diagnostics.Verify( 479emitResult.Diagnostics.Verify( 531emitResult.Diagnostics.Verify(); 571emitResult.Diagnostics.Verify(); 710emitResult.Diagnostics.Verify(); 736emitResult.Diagnostics.Verify(); 760emitResult.Diagnostics.Verify(); 788emitResult.Diagnostics.Verify(); 840emitResult.Diagnostics.Verify(); 881emitResult.Diagnostics.Verify(); 1327options: refonlyOptions, manifestResources: hash_resources).Diagnostics; 1336options: refoutOptions, manifestResources: hash_resources).Diagnostics; 2101Assert.Equal(!success, emitResult.Diagnostics.HasAnyErrors()); 2713emitResult.Diagnostics.Verify(); 2766emitResult.Diagnostics.Verify(); 3378Assert.NotEmpty(emitResult.Diagnostics); 4234result.Diagnostics.Verify( 4640Assert.Empty(result.Diagnostics); 5168result.Diagnostics.Verify( 5175result.Diagnostics.Verify(); 5195result.Diagnostics.Verify( 5214var err = result.Diagnostics.Single(); 5225err = result.Diagnostics.Single(); 5459result.Diagnostics.Verify( 5481result.Diagnostics.Verify( 5606emitResult.Diagnostics.Verify( 5651emitResult.Diagnostics.Verify(
Emit\EmitErrorTests.cs (2)
245result.Diagnostics.Verify(expectedDiagnostics.Concat(new[] 256result.Diagnostics.Verify();
Emit\NoPiaEmbedTypes.cs (3)
137result.Diagnostics.Verify(expectedFullBuildDiagnostics); 147result.Diagnostics.Verify(); 152result.Diagnostics.Verify(expectedMetadataOnlyDiagnostics ?? expectedFullBuildDiagnostics);
Emit\ResourceTests.cs (20)
216result.Diagnostics.Verify( 227result.Diagnostics.Verify( 247result.Diagnostics.Verify( 267result.Diagnostics.Verify( 280result.Diagnostics.Verify( 300result.Diagnostics.Verify( 320result.Diagnostics.Verify(); 330result.Diagnostics.Verify(); 347result.Diagnostics.Verify( 362result.Diagnostics.Verify( 376result.Diagnostics.Verify(); 389result.Diagnostics.Verify( 474Assert.NotEmpty(result.Diagnostics.Where(x => x.Code == (int)ErrorCode.ERR_CantRefResource)); 484Assert.NotEmpty(result.Diagnostics.Where(x => x.Code == (int)ErrorCode.ERR_CantRefResource)); 493Assert.NotEmpty(result.Diagnostics.Where(x => x.Code == (int)ErrorCode.ERR_CantRefResource)); 718result6.Diagnostics.Verify( 737result6.Diagnostics.Verify( 781Assert.Equal((int)ErrorCode.ERR_CantReadResource, result.Diagnostics.ToArray()[0].Code); 808Assert.Equal((int)ErrorCode.ERR_CantReadResource, result.Diagnostics.ToArray()[0].Code); 906result.Diagnostics.Verify(
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (19)
PDB\PDBConstantTests.cs (1)
537result.Diagnostics.Verify();
PDB\PDBSourceLinkTests.cs (2)
124result.Diagnostics.Verify( 163result.Diagnostics.Verify(
PDB\PDBTests.cs (14)
53result.Diagnostics.Verify( 73result.Diagnostics.Verify(); 114result.Diagnostics.Verify(); 143result.Diagnostics.Verify(); 268result.Diagnostics.Verify( 300result.Diagnostics.Verify( 332result.Diagnostics.Verify( 364result.Diagnostics.Verify( 379CompileWithMockedCustomMetadata(length).Diagnostics.Verify(); 390CompileWithMockedCustomMetadata(length).Diagnostics.Verify( 716result.Diagnostics.Verify( 721result.Diagnostics.Verify( 726result.Diagnostics.Verify( 731result.Diagnostics.Verify(
PDB\PDBUsingTests.cs (1)
2911result.Diagnostics.Verify(
PDB\PortablePdbTests.cs (1)
383result.Diagnostics.Verify(
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (13)
Attributes\AttributeTests.cs (2)
10038emitResult2.Diagnostics.Verify( 10052emitResult3.Diagnostics.Verify(
Attributes\AttributeTests_Security.cs (1)
1641emitResult.Diagnostics.VerifyErrorCodes(
Attributes\InternalsVisibleToAndStrongNameTests.cs (9)
1563success.Diagnostics.Verify(); 1651Assert.True(success.Diagnostics[0].Code == (int)ErrorCode.ERR_SignButNoPrivateKey); 1705success.Diagnostics.Verify( 1801success.Diagnostics.Verify( 2454emitResult.Diagnostics.Verify( 2548success.Diagnostics.Verify( 2579result.Diagnostics.VerifyErrorCodes( 2609success.Diagnostics.Verify( 2664success.Diagnostics.Verify(
FlowAnalysis\FlowDiagnosticTests.cs (1)
1871var emitDiags = comp.Emit(new System.IO.MemoryStream()).Diagnostics.ToArray();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\SemanticErrorTests.cs (2)
7340CreateCompilation(source).Emit(new System.IO.MemoryStream()).Diagnostics 21585result.Diagnostics.Verify(
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\CompilationAPITests.cs (1)
408result.Diagnostics.Verify(
Symbols\AnonymousTypesSymbolTests.cs (3)
593result.Diagnostics.Verify(); 1760result.Diagnostics.Verify( 1814result.Diagnostics.Verify(
Symbols\SymbolErrorTests.cs (1)
74emitResult.Diagnostics.Verify(Diagnostic(ErrorCode.ERR_BadDelegateConstructor, "Goo").WithArguments("F"));
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (3)
PdbTests.cs (3)
80r.Diagnostics.Verify(); 96r.Diagnostics.Verify(); 113r.Diagnostics.Verify();
Microsoft.CodeAnalysis.Features (3)
EditAndContinue\EditSession.cs (3)
1107if (!emitResult.Diagnostics.IsEmpty) 1109diagnostics.Add(new(newProject.Id, emitResult.Diagnostics)); 1112Telemetry.LogProjectAnalysisSummary(projectSummary, newProject.State.ProjectInfo.Attributes.TelemetryId, emitResult.Diagnostics);
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RoundTripUtil.cs (1)
108Assert.Empty(result.Diagnostics);
Microsoft.CodeAnalysis.Scripting (1)
ScriptBuilder.cs (1)
134diagnostics.AddRange(emitResult.Diagnostics);
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\CompilationExtensions.cs (4)
90Assert.True(emitResult.Success, "Diagnostics:\r\n" + string.Join("\r\n", emitResult.Diagnostics.Select(d => d.ToString()))); 94emitResult.Diagnostics.Verify(expectedWarnings); 104Assert.True(emitResult.Success, "Diagnostics: " + string.Join(", ", emitResult.Diagnostics.Select(d => d.ToString()))); 108emitResult.Diagnostics.Verify(expectedWarnings);
Compilation\IRuntimeEnvironment.cs (1)
284diagnostics.AddRange(result.Diagnostics);
Diagnostics\DiagnosticExtensions.cs (1)
367return c.Emit(new MemoryStream(), pdbStream: pdbStream, options: options, manifestResources: manifestResources).Diagnostics;
TestBase.cs (1)
202emitResult.Diagnostics.Verify();
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (51)
Attributes\AssemblyAttributes.vb (10)
536AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics, 542AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics, 552AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics, 573AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics, 606AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics, 649AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics, 655AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics, 665AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics, 1055AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics, 1070AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream(), manifestResources:=hash_resources).Diagnostics,
Attributes\EmitTestStrongNameProvider.vb (1)
42comp.Emit(New MemoryStream()).Diagnostics.Verify(
Attributes\InternalsVisibleToAndStrongNameTests.vb (9)
1208CompilationUtils.AssertTheseDiagnostics(emitResult.Diagnostics, 1228CompilationUtils.AssertTheseDiagnostics(emitResult.Diagnostics, 1273CompilationUtils.AssertTheseDiagnostics(emitResult.Diagnostics, <errors>BC40060: Delay signing was specified and requires a public key, but no public key was specified.</errors>) 1447success.Diagnostics.Verify() 1786AssertTheseDiagnostics(emitResult.Diagnostics, 1822Dim err = emitResult.Diagnostics.Single() 1855AssertTheseDiagnostics(emitResult.Diagnostics, 1909AssertTheseDiagnostics(emitResult.Diagnostics, 1963Assert.True(emitResult.Diagnostics.IsEmpty)
CodeGen\CodeGenScriptTests.vb (1)
282emitResult.Diagnostics.AssertTheseDiagnostics(expectedErrors)
Emit\CompilationEmitTests.vb (11)
45CompilationUtils.AssertTheseDiagnostics(emitResult.Diagnostics, 274CompilationUtils.AssertNoErrors(emitResult.Diagnostics) 297CompilationUtils.AssertNoErrors(emitResult.Diagnostics) 330emitResult.Diagnostics.Verify() 376emitResult.Diagnostics.Verify() 422emitResult.Diagnostics.Verify( 471emitResult.Diagnostics.Verify( 521emitResult.Diagnostics.Verify() 570emitResult.Diagnostics.Verify() 3770emitResult.Diagnostics.VerifyErrorCodes( 4463CompilationUtils.AssertTheseDiagnostics(emitResult.Diagnostics,
Emit\NoPiaEmbedTypes.vb (2)
508result.Diagnostics.AssertTheseDiagnostics(errors) 518result.Diagnostics.AssertTheseDiagnostics(errors)
Emit\ResourceTests.vb (14)
192result.Diagnostics.Verify(Diagnostic(ERRID.ERR_UnableToOpenResourceFile1).WithArguments("file", "bad stuff")) 197result.Diagnostics.Verify(Diagnostic(ERRID.ERR_UnableToOpenResourceFile1).WithArguments("file", CodeAnalysisResources.ResourceDataProviderShouldReturnNonNullStream)) 271result.Diagnostics.Verify( 299result.Diagnostics.Verify( 392result.Diagnostics.Verify(Diagnostic(ERRID.ERR_DuplicateResourceName1).WithArguments("A")) 678result.Diagnostics.Verify(Diagnostic(ERRID.ERR_DuplicateResourceName1).WithArguments("A")) 688result.Diagnostics.Verify(Diagnostic(ERRID.ERR_DuplicateResourceName1).WithArguments("A")) 715result.Diagnostics.Verify(Diagnostic(ERRID.ERR_DuplicateResourceFileName1).WithArguments("x.goo")) 722result.Diagnostics.Verify() 735result.Diagnostics.Verify(Diagnostic(ERRID.ERR_DuplicateResourceFileName1).WithArguments("netModule1.netmodule")) 760result.Diagnostics.Verify() 769result.Diagnostics.Verify() 795result.Diagnostics.Verify( 808result.Diagnostics.Verify(
PDB\PDBTests.vb (3)
33result.Diagnostics.Verify( 50result.Diagnostics.Verify() 89result.Diagnostics.Verify()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (1)
504result.Diagnostics.Verify(
Semantics\NameLengthTests.vb (1)
537Dim diagnostics = comp.Emit(assemblyStream, pdbStream:=pdbStream, manifestResources:=resources).Diagnostics
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Source\PropertyTests.vb (1)
8264Assert.Equal(String.Empty, String.Join(Environment.NewLine, result.Diagnostics))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
CompilationTestUtils.vb (1)
823Dim diagnostics = compilation.Emit(assemblyStream, pdbStream:=pdbStream).Diagnostics
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (2)
272foreach (var diagnostic in emitResult.Diagnostics) 283var groups = emitResult.Diagnostics.GroupBy(d => d.Id).Select(g => $"{g.Key}:{g.Count()}");
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ProjectSystemShim\TempPECompiler.TempPEProject.vb (1)
52Return emitResult.Diagnostics.Where(Function(d) d.Severity = DiagnosticSeverity.Error).Count()
Roslyn.Test.PdbUtilities (2)
EditAndContinue\EditAndContinueTest.cs (1)
102diff.EmitResult.Diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error).Verify(expectedErrors);
Reader\PdbValidation.cs (1)
536result.Diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
System.Windows.Forms.Design.Tests (1)
System\Resources\Tools\CodeDomCompileHelper.cs (1)
53throw new InvalidOperationException(string.Join('\n', result.Diagnostics.Select(d => d.GetMessage())));
VBCSCompiler.UnitTests (1)
AnalyzerConsistencyCheckerTests.cs (1)
73Assert.Empty(emitResult.Diagnostics.Where(x => x.Severity == DiagnosticSeverity.Error));
WinShimmer (1)
Program.cs (1)
81throw new InvalidProgramException($"The generated program contained errors: \n{string.Join("\n", emit.Diagnostics.AsEnumerable())}");