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