46 references to ToReadOnlyAndFree
Microsoft.CodeAnalysis (8)
CommandLine\AnalyzerConfigSet.cs (1)
479diagnostics = diagnosticBag.ToReadOnlyAndFree();
CommandLine\CommonCompiler.cs (2)
674ReportDiagnostics(diagnostics.ToReadOnlyAndFree(), consoleOutput, errorLoggerOpt: logger, compilation: null); 1506errors = diagnostics.ToReadOnlyAndFree().SelectAsArray(diag => new DiagnosticInfo(messageProvider, diag.IsWarningAsError, diag.Code, (object[])diag.Arguments));
Compilation\Compilation.cs (1)
2976return new EmitResult(success, diagnostics.ToReadOnlyAndFree());
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
884return allDiagnostics.ToReadOnlyAndFree();
SourceGeneration\GeneratorContexts.cs (1)
104=> (_additionalSources.ToImmutableAndFree(), _diagnostics.ToReadOnlyAndFree());
SourceGeneration\GeneratorDriver.cs (1)
57diagnostics = diagnosticsBag.ToReadOnlyAndFree();
SourceGeneration\IncrementalContexts.cs (1)
189=> (Sources.ToImmutableAndFree(), Diagnostics.ToReadOnlyAndFree(), GeneratorRunStateBuilder.ToImmutableAndFree(), HostOutputBuilder.ToImmutableAndFree());
Microsoft.CodeAnalysis.CSharp (18)
CommandLine\CSharpCommandLineParser.cs (2)
1746diagnostics = outputDiagnostics.ToReadOnlyAndFree(); 1781diagnostics = outputDiagnostics.ToReadOnlyAndFree();
CommandLine\CSharpCompiler.cs (1)
92if (ReportDiagnostics(diagnosticBag.ToReadOnlyAndFree(), consoleOutput, errorLogger, compilation: null))
Compilation\CSharpCompilation.cs (3)
1731entryPoint.Diagnostics.Diagnostics.Concat(diagnostics.ToReadOnlyAndFree()), entryPoint.Diagnostics.Dependencies)); 2656return diagnostics.ToReadOnlyAndFree(); 2899return diagnostics.ToReadOnlyAndFree();
Compilation\SyntaxAndDeclarationManager.cs (1)
260loadDirectives.Add(new LoadDirective(resolvedFilePath, diagnostics.ToReadOnlyAndFree()));
Declarations\DeclarationTreeBuilder.cs (6)
121diagnostics = bag.ToReadOnlyAndFree(); 387diagnostics: diagnostics.ToReadOnlyAndFree(), 537diagnostics: diagnostics.ToReadOnlyAndFree()); 685diagnostics: diagnostics.ToReadOnlyAndFree(), 733diagnostics: diagnostics.ToReadOnlyAndFree(), 771diagnostics: diagnostics.ToReadOnlyAndFree(),
Emitter\EditAndContinue\EmitHelpers.cs (2)
59diagnostics: diagnostics.ToReadOnlyAndFree(), 115diagnostics: diagnostics.ToReadOnlyAndFree(),
Symbols\Source\SourceAssemblySymbol.cs (1)
2726ImmutableInterlocked.InterlockedInitialize(ref _unusedFieldWarnings, diagnostics.ToReadOnlyAndFree());
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (2)
371Diagnostics = diagnostics.ToReadOnlyAndFree() 447new ExternAliasesAndDiagnostics() { ExternAliases = buildExternAliases(externAliasDirectives, declaringSymbol, diagnostics), Diagnostics = diagnostics.ToReadOnlyAndFree() },
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
LexicalAndXml\XmlDocCommentTests.cs (5)
3199diags.ToReadOnlyAndFree().Verify( 3216diags.ToReadOnlyAndFree().Verify(); 3228diags.ToReadOnlyAndFree().Verify( 3244diags.ToReadOnlyAndFree().Verify( 3264diags.ToReadOnlyAndFree().Verify(
Microsoft.CodeAnalysis.Test.Utilities (1)
Platform\CoreClr\CoreCLRRuntimeEnvironment.cs (1)
49_emitData.Diagnostics = diagnostics.ToReadOnlyAndFree();
Microsoft.CodeAnalysis.VisualBasic (6)
Compilation\VisualBasicCompilation.vb (2)
1660sealedDiagnostics = diagnostics.ToReadOnlyAndFree() 2115Return diagnostics.ToReadOnlyAndFree()
Emit\EditAndContinue\EmitHelpers.vb (2)
53diagnostics:=diagnostics.ToReadOnlyAndFree(), 99diagnostics:=diagnostics.ToReadOnlyAndFree(),
Symbols\Source\SourceFile.vb (1)
467Return diagBag.ToReadOnlyAndFree()
Symbols\Source\SourceModuleSymbol.vb (1)
753ImmutableInterlocked.InterlockedInitialize(_lazyLinkedAssemblyDiagnostics, diagnostics.ToReadOnlyAndFree)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
FlowAnalysis\FlowTestBase.vb (1)
36Return diagnostics.ToReadOnlyAndFree()
Semantics\FieldInitializerBindingTests.vb (1)
1582Dim sealedDiagnostics = diagnostics.ToReadOnlyAndFree()
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (6)
DocumentationComments\DocCommentTests.vb (6)
55AssertTheseDiagnostics(diags.ToReadOnlyAndFree(), 12533AssertTheseDiagnostics(diags.ToReadOnlyAndFree(), 12551Assert.Empty(diags.ToReadOnlyAndFree()) 12563AssertTheseDiagnostics(diags.ToReadOnlyAndFree(), 12580AssertTheseDiagnostics(diags.ToReadOnlyAndFree(), 12601AssertTheseDiagnostics(diags.ToReadOnlyAndFree(),