51 references to SemanticModelOptions
Microsoft.CodeAnalysis (13)
Compilation\Compilation.cs (8)
317=> GetSemanticModel(syntaxTree, ignoreAccessibility ? SemanticModelOptions.IgnoreAccessibility : SemanticModelOptions.None); 321public SemanticModel GetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options) 326/// If <see cref="SemanticModelProvider"/> is non-null, it attempts to use <see cref="SemanticModelProvider.GetSemanticModel(SyntaxTree, Compilation, SemanticModelOptions)"/> 327/// to get a semantic model. Otherwise, it creates a new semantic model using <see cref="CreateSemanticModel(SyntaxTree, SemanticModelOptions)"/>. 330protected abstract SemanticModel CommonGetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options); 334/// Unlike the <see cref="GetSemanticModel(SyntaxTree, bool)"/> and <see cref="CommonGetSemanticModel(SyntaxTree, SemanticModelOptions)"/>, 338internal abstract SemanticModel CreateSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options);
Compilation\SemanticModel.cs (1)
18/// an instance is obtained by a call to <see cref="Compilation.GetSemanticModel(SyntaxTree, SemanticModelOptions)"/>.
Compilation\SemanticModelProvider.cs (1)
18public abstract SemanticModel GetSemanticModel(SyntaxTree tree, Compilation compilation, SemanticModelOptions options = default);
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (3)
36public override SemanticModel GetSemanticModel(SyntaxTree tree, Compilation compilation, SemanticModelOptions options = default) 68public SemanticModel GetSemanticModel(SyntaxTree tree, SemanticModelOptions options) 71return options == SemanticModelOptions.None
Microsoft.CodeAnalysis.CSharp (13)
Compilation\CSharpCompilation.cs (5)
2482=> GetSemanticModel(syntaxTree, ignoreAccessibility ? SemanticModelOptions.IgnoreAccessibility : SemanticModelOptions.None); 2489public new SemanticModel GetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options) 2512internal override SemanticModel CreateSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options) 3921protected override SemanticModel CommonGetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options)
Compilation\SyntaxTreeSemanticModel.cs (8)
39private readonly SemanticModelOptions _options; 44internal SyntaxTreeSemanticModel(CSharpCompilation compilation, SyntaxTree syntaxTree, SemanticModelOptions options) 50_binderFactory = compilation.GetBinderFactory(SyntaxTree, (options & SemanticModelOptions.IgnoreAccessibility) != 0); 53internal SyntaxTreeSemanticModel(CSharpCompilation parentCompilation, SyntaxTree parentSyntaxTree, SyntaxTree speculatedSyntaxTree, SemanticModelOptions options) 57_binderFactory = _compilation.GetBinderFactory(parentSyntaxTree, ignoreAccessibility: (options & SemanticModelOptions.IgnoreAccessibility) != 0); 94internal SemanticModelOptions Options => _options; 101get { return (_options & SemanticModelOptions.IgnoreAccessibility) != 0; } 104public override bool NullableAnalysisIsDisabled => (_options & SemanticModelOptions.DisableNullableAnalysis) != 0;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4056public override SemanticModel GetSemanticModel(SyntaxTree tree, Compilation compilation, SemanticModelOptions options)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Symbols\Source\NullablePublicAPITests.cs (6)
5190test(SemanticModelOptions.None, expectedAnnotation: PublicNullableAnnotation.Annotated); 5191test(SemanticModelOptions.DisableNullableAnalysis, expectedAnnotation: PublicNullableAnnotation.None); 5193void test(SemanticModelOptions options, PublicNullableAnnotation expectedAnnotation) 5225test(SemanticModelOptions.None); 5226test(SemanticModelOptions.DisableNullableAnalysis); 5228void test(SemanticModelOptions options)
Microsoft.CodeAnalysis.VisualBasic (8)
Compilation\VisualBasicCompilation.vb (8)
2045model = SemanticModelProvider.GetSemanticModel(syntaxTree, Me, If(ignoreAccessibility, SemanticModelOptions.IgnoreAccessibility, SemanticModelOptions.None)) 2049Return If(model, CreateSemanticModel(syntaxTree, If(ignoreAccessibility, SemanticModelOptions.IgnoreAccessibility, SemanticModelOptions.None))) 2052Friend Overrides Function CreateSemanticModel(syntaxTree As SyntaxTree, options As SemanticModelOptions) As SemanticModel 2053Return New SyntaxTreeSemanticModel(Me, DirectCast(Me.SourceModule, SourceModuleSymbol), syntaxTree, ignoreAccessibility:=(options And SemanticModelOptions.IgnoreAccessibility) <> 0) 2751Protected Overrides Function CommonGetSemanticModel(syntaxTree As SyntaxTree, options As SemanticModelOptions) As SemanticModel 2752Return Me.GetSemanticModel(syntaxTree, ignoreAccessibility:=(options And SemanticModelOptions.IgnoreAccessibility) <> 0)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Diagnostics\DiagnosticAnalyzerTests.vb (2)
1710Public Overrides Function GetSemanticModel(tree As SyntaxTree, compilation As Compilation, Optional options As SemanticModelOptions = SemanticModelOptions.None) As SemanticModel
Microsoft.CodeAnalysis.Workspaces (8)
ReassignedVariable\AbstractReassignedVariableService.cs (1)
95model = compilation.GetSemanticModel(syntaxTree, SemanticModelOptions.DisableNullableAnalysis);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
55semanticModel = await document.GetSemanticModelAsync(SemanticModelOptions.DisableNullableAnalysis, cancellationToken).ConfigureAwait(false);
Workspace\Solution\Document.cs (6)
285internal async Task<SemanticModel?> GetSemanticModelAsync(SemanticModelOptions options, CancellationToken cancellationToken = default) 288disableNullableAnalysis: (options & SemanticModelOptions.DisableNullableAnalysis) == SemanticModelOptions.DisableNullableAnalysis, 301semanticModel = await this.GetSemanticModelAsync(SemanticModelOptions.DisableNullableAnalysis, cancellationToken).ConfigureAwait(false); 355var result = compilation.GetSemanticModel(syntaxTree, disableNullableAnalysis ? SemanticModelOptions.DisableNullableAnalysis : SemanticModelOptions.None);