8 references to ToReadOnlyAndFree
Microsoft.CodeAnalysis (8)
CommandLine\AnalyzerConfigSet.cs (1)
468
diagnostics = diagnosticBag.
ToReadOnlyAndFree
();
CommandLine\CommonCompiler.cs (2)
751
ReportDiagnostics(diagnostics.
ToReadOnlyAndFree
(), consoleOutput, errorLoggerOpt: logger, compilation: null);
1648
errors = diagnostics.
ToReadOnlyAndFree
().SelectAsArray(diag => new DiagnosticInfo(messageProvider, diag.IsWarningAsError, diag.Code, (object[])diag.Arguments));
Compilation\Compilation.cs (1)
3028
return new EmitResult(success, diagnostics.
ToReadOnlyAndFree
());
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
888
return allDiagnostics.
ToReadOnlyAndFree
();
SourceGeneration\GeneratorContexts.cs (1)
112
=> (_additionalSources.ToImmutableAndFree(), _diagnostics.
ToReadOnlyAndFree
());
SourceGeneration\GeneratorDriver.cs (1)
72
diagnostics = diagnosticsBag.
ToReadOnlyAndFree
();
SourceGeneration\IncrementalContexts.cs (1)
267
=> (Sources.ToImmutableAndFree(), Diagnostics.
ToReadOnlyAndFree
(), GeneratorRunStateBuilder.ToImmutableAndFree(), HostOutputBuilder.ToImmutable());