3 writes to SyntaxTreeOptionsProvider
Microsoft.CodeAnalysis (1)
Compilation\CompilationOptions.cs (1)
318this.SyntaxTreeOptionsProvider = syntaxTreeOptionsProvider;
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
589return new CSharpCompilationOptions(this) { SyntaxTreeOptionsProvider = provider };
Microsoft.CodeAnalysis.VisualBasic (1)
VisualBasicCompilationOptions.vb (1)
954Return New VisualBasicCompilationOptions(Me) With {.SyntaxTreeOptionsProvider = provider}
60 references to SyntaxTreeOptionsProvider
BuildActionTelemetryTable (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
75var providerAndTree = compilationOptions.SyntaxTreeOptionsProvider != null 76? (compilationOptions.SyntaxTreeOptionsProvider, tree)
Microsoft.CodeAnalysis (12)
Compilation\CompilationOptions.cs (3)
647object.Equals(this.SyntaxTreeOptionsProvider, other.SyntaxTreeOptionsProvider) && 694Hash.Combine(this.SyntaxTreeOptionsProvider,
Compilation\DeterministicKeyBuilder.cs (1)
500WriteType(writer, "syntaxTreeOptionsProvider", options.SyntaxTreeOptionsProvider?.GetType());
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
954compilation.Options.SyntaxTreeOptionsProvider?.TryGetGlobalDiagnosticValue(descriptor.Id, cancellationToken, out severity) == true) 969if (compilation.Options.SyntaxTreeOptionsProvider is not { } syntaxTreeProvider ||
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
63return _isAnalyzerSuppressedForTree(analyzer, tree, Compilation.Options.SyntaxTreeOptionsProvider, cancellationToken);
DiagnosticAnalyzer\AnalyzerManager.cs (3)
317if (analyzerExecutor.Compilation.Options.SyntaxTreeOptionsProvider is { } treeOptions) 390(options.SyntaxTreeOptionsProvider is object && options.SyntaxTreeOptionsProvider.TryGetGlobalDiagnosticValue(diag.Id, cancellationToken, out severity)))
DiagnosticAnalyzer\AnalyzerOptionsExtensions.cs (2)
54compilation.Options.SyntaxTreeOptionsProvider?.TryGetDiagnosticValue(tree, descriptor.Id, cancellationToken, out _) == true || 55compilation.Options.SyntaxTreeOptionsProvider?.TryGetGlobalDiagnosticValue(descriptor.Id, cancellationToken, out _) == true)
Microsoft.CodeAnalysis.CodeStyle (5)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
191var severityOptionsProvider = compilationOptions.SyntaxTreeOptionsProvider!;
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
103if (compilationWithAnalyzers.Compilation.Options.SyntaxTreeOptionsProvider != null && 104compilationWithAnalyzers.Compilation.Options.SyntaxTreeOptionsProvider.TryGetDiagnosticValue(tree, IDEDiagnosticIds.RemoveUnnecessarySuppressionDiagnosticId, cancellationToken, out var severity) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
75var providerAndTree = compilationOptions.SyntaxTreeOptionsProvider != null 76? (compilationOptions.SyntaxTreeOptionsProvider, tree)
Microsoft.CodeAnalysis.CSharp (10)
Binder\Binder.cs (1)
265!csTree.IsGeneratedCode(this.Compilation.Options.SyntaxTreeOptionsProvider, CancellationToken.None),
Compilation\CSharpSemanticModel.cs (1)
5463=> lazyDefaultState ??= syntaxTree.IsGeneratedCode(Compilation.Options.SyntaxTreeOptionsProvider, CancellationToken.None)
CSharpCompilationOptions.cs (3)
254syntaxTreeOptionsProvider: other.SyntaxTreeOptionsProvider, 584if (ReferenceEquals(provider, this.SyntaxTreeOptionsProvider)) 769SyntaxTreeOptionsProvider,
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
75var code = tree.IsGeneratedCode(binder.Compilation.Options.SyntaxTreeOptionsProvider, CancellationToken.None)
Errors\MessageProvider.cs (1)
134options.SyntaxTreeOptionsProvider,
Syntax\CSharpSyntaxTree.cs (3)
326/// <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param> 447/// <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param> 486/// <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param>
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
306var compilerTreeOptions = comp.Options.SyntaxTreeOptionsProvider;
Microsoft.CodeAnalysis.Features (3)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
191var severityOptionsProvider = compilationOptions.SyntaxTreeOptionsProvider!;
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
103if (compilationWithAnalyzers.Compilation.Options.SyntaxTreeOptionsProvider != null && 104compilationWithAnalyzers.Compilation.Options.SyntaxTreeOptionsProvider.TryGetDiagnosticValue(tree, IDEDiagnosticIds.RemoveUnnecessarySuppressionDiagnosticId, cancellationToken, out var severity) ||
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RoundTripUtil.cs (1)
229case nameof(CompilationOptions.SyntaxTreeOptionsProvider):
Microsoft.CodeAnalysis.VisualBasic (6)
Errors\MessageProvider.vb (1)
125options.SyntaxTreeOptionsProvider,
Syntax\VisualBasicSyntaxTree.vb (2)
159''' <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param> 234''' <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param>
VisualBasicCompilationOptions.vb (3)
327syntaxTreeOptionsProvider:=other.SyntaxTreeOptionsProvider, 950If provider Is Me.SyntaxTreeOptionsProvider Then 1138SyntaxTreeOptionsProvider,
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
133Dim syntaxTreeOptions = comp.Options.SyntaxTreeOptionsProvider
Microsoft.CodeAnalysis.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
75var providerAndTree = compilationOptions.SyntaxTreeOptionsProvider != null 76? (compilationOptions.SyntaxTreeOptionsProvider, tree)
Workspace\Solution\SolutionCompilationState.TranslationAction_Actions.cs (1)
117/// Updating editorconfig document updates <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/>.
Workspace\Workspace.cs (2)
1669projectChanges.OldProject.CompilationOptions.SyntaxTreeOptionsProvider); 1830projectChanges.OldProject.CompilationOptions!.SyntaxTreeOptionsProvider);
Microsoft.CodeAnalysis.Workspaces.UnitTests (14)
SolutionTests\SolutionTests.cs (14)
339var provider = compilation.Options.SyntaxTreeOptionsProvider!; 1742var originalSyntaxTreeOptionsProvider = solution.Projects.Single().CompilationOptions!.SyntaxTreeOptionsProvider; 1746Assert.Null(defaultOptions.SyntaxTreeOptionsProvider); 1752var newSyntaxTreeOptionsProvider = solution.Projects.Single().CompilationOptions!.SyntaxTreeOptionsProvider; 4698var provider = project.CompilationOptions.SyntaxTreeOptionsProvider; 4727var provider = project.CompilationOptions.SyntaxTreeOptionsProvider; 4736provider = project.CompilationOptions.SyntaxTreeOptionsProvider; 4767var provider = project.CompilationOptions.SyntaxTreeOptionsProvider; 4768Assert.Equal(provider, (await project.GetCompilationAsync()).Options.SyntaxTreeOptionsProvider); 4780provider = project.CompilationOptions.SyntaxTreeOptionsProvider; 4781Assert.Equal(provider, (await project.GetCompilationAsync()).Options.SyntaxTreeOptionsProvider); 4801var originalProvider = solution.GetProject(projectId).CompilationOptions.SyntaxTreeOptionsProvider; 4812var newProvider = solution.GetProject(projectId).CompilationOptions.SyntaxTreeOptionsProvider; 4817var finalProvider = solution.GetProject(projectId).CompilationOptions.SyntaxTreeOptionsProvider;