2 types derived from SemanticModel
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpSemanticModel.cs (1)
45internal abstract class CSharpSemanticModel : SemanticModel
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\SemanticModel.vb (1)
38Inherits SemanticModel
7578 references to SemanticModel
ILLink.RoslynAnalyzer (1)
RequiresAnalyzerBase.cs (1)
65 var model = syntaxNodeAnalysisContext.SemanticModel;
Microsoft.Analyzers.Extra (12)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (10)
40internal Func<Document, CancellationToken, Task<SemanticModel?>> GetSemanticModelAsync = (d, t) => d.GetSemanticModelAsync(t); 41internal Func<SemanticModel, SyntaxNode, CancellationToken, IOperation?> GetOperation = (sm, sn, t) => sm.GetOperation(sn, t); 45internal Func<SemanticModel, BaseMethodDeclarationSyntax, CancellationToken, IMethodSymbol?> GetDeclaredSymbol = (sm, m, t) => sm.GetDeclaredSymbol(m, t); 80var sm = await GetSemanticModelAsync(invocationDoc, cancellationToken).ConfigureAwait(false); 140var invocationSM = (await invocationDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false))!; 144var sm = docEditor.SemanticModel; 472var sm = docEditor.SemanticModel; 577var invocationSM = (await invocationDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false))!; 582var sm = docEditor.SemanticModel; 628var semanticModel = comp.GetSemanticModel(targetClass.SyntaxTree);
Utilities\SyntaxNodeExtensions.cs (2)
44SemanticModel semanticModel, 104SemanticModel semanticModel,
Microsoft.Analyzers.Extra.Tests (6)
CallAnalysis\LegacyLoggingTests.cs (1)
862GetSemanticModelAsync = (_, _) => Task.FromResult<SemanticModel?>(null)
SyntaxNodeExtensionsTests.cs (5)
24Assert.Null(node.FindNodeInTreeUpToSpecifiedParentByMethodName(new Mock<SemanticModel>().Object, emptyList, new List<Type>())); 53var model = compilation.GetSemanticModel(tree); 85var model = compilation.GetSemanticModel(tree); 148var model = compilation.GetSemanticModel(tree); 178var model = compilation.GetSemanticModel(tree);
Microsoft.AspNetCore.Analyzers (1)
CompilationFeatureDetector.cs (1)
39var semanticModel = compilation.GetSemanticModel(syntaxReferences[j].SyntaxTree);
Microsoft.AspNetCore.App.Analyzers (27)
Infrastructure\RouteUsageCache.cs (1)
49var semanticModel = _compilation.GetSemanticModel(syntaxToken.SyntaxTree);
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (4)
124var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 293private static SyntaxToken? TryGetMvcActionRouteToken(CompletionContext context, SemanticModel semanticModel, MethodDeclarationSyntax method) 356private static bool HasNonRouteAttribute(SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken) 386private static bool IsCurrentParameterBindable(SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken)
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (10)
19public static bool IsRouteStringSyntaxToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken, out RouteOptions options) 58SemanticModel semanticModel, 240SemanticModel semanticModel, 272SemanticModel semanticModel, 282SemanticModel semanticModel, 367private static ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 372private static IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, CancellationToken cancellationToken) 375private static IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, CancellationToken cancellationToken) 385SemanticModel semanticModel, 462SemanticModel semanticModel,
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (4)
57public static RouteUsageContext BuildContext(RouteOptions routeOptions, SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken) 232public static MapMethodParts? FindMapMethodParts(SemanticModel semanticModel, WellKnownTypes wellKnownTypes, SyntaxNode container, CancellationToken cancellationToken) 260private static MapMethodParts? FindValidMapMethodParts(SemanticModel semanticModel, WellKnownTypes wellKnownTypes, BaseArgumentListSyntax argumentList, IMethodSymbol method) 333private static IMethodSymbol? GetMethodInfo(SemanticModel semanticModel, SyntaxNode syntaxNode, CancellationToken cancellationToken)
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
29var semanticModel = context.SemanticModel;
RouteEmbeddedLanguage\RoutePatternBraceMatcher.cs (1)
19public AspNetCoreBraceMatchingResult? FindBraces(SemanticModel semanticModel, SyntaxToken token, int position, CancellationToken cancellationToken)
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
108var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (3)
22SemanticModel semanticModel, SyntaxToken token, int position, CancellationToken cancellationToken) 35RouteUsageModel routeUsage, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 72private static void HighlightSymbol(SemanticModel semanticModel, IMethodSymbol methodSymbol, IList<AspNetCoreHighlightSpan> highlightSpans, ISymbol matchingParameter, CancellationToken cancellationToken)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
202SemanticModel? model,
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
137public static bool IsType(this INamedTypeSymbol type, string typeName, SemanticModel semanticModel)
Microsoft.AspNetCore.App.Analyzers.Test (3)
Infrastructure\WellKnownTypesTests.cs (1)
111var semanticModel = context.SemanticModel;
TestDiagnosticAnalyzer.cs (2)
68private async Task<(SyntaxToken token, SemanticModel model)> TryGetStringSyntaxTokenAtPositionAsync(int caretPosition, params string[] sources) 73var semanticModel = await document.GetSemanticModelAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.AspNetCore.App.CodeFixes (5)
Authorization\AddAuthorizationBuilderFixer.cs (1)
35var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Dependencies\AddPackageFixer.cs (1)
37var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Dependencies\ExtensionMethodsCompletionProvider.cs (1)
47var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Http\HeaderDictionaryAddFixer.cs (1)
36var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
RouteParameterUnusedParameterFixer.cs (1)
37var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (7)
RequestDelegateGeneratorSuppressor.cs (1)
57var semanticModel = context.GetSemanticModel(sourceTree);
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
137public static bool IsType(this INamedTypeSymbol type, string typeName, SemanticModel semanticModel)
StaticRouteHandlerModel\Endpoint.cs (1)
19public Endpoint(IInvocationOperation operation, WellKnownTypes wellKnownTypes, SemanticModel semanticModel)
StaticRouteHandlerModel\InvocationOperationExtensions.cs (4)
42public static bool TryGetRouteHandlerMethod(this IInvocationOperation invocation, SemanticModel semanticModel, [NotNullWhen(true)] out IMethodSymbol? method) 83private static IMethodSymbol? ResolveMethodFromOperation(IOperation operation, SemanticModel semanticModel) => operation switch 97private static IOperation? ResolveDeclarationOperation(ISymbol symbol, SemanticModel? semanticModel) 112var targetSemanticModel = semanticModel?.Compilation.GetSemanticModel(expr.SyntaxTree);
Microsoft.AspNetCore.Mvc.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
202SemanticModel? model,
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
AddResponseTypeAttributeCodeFixAction.cs (3)
130var semanticModel = await _document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 255public CodeActionContext(SemanticModel semanticModel, 276public SemanticModel SemanticModel { get; }
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
202SemanticModel? model,
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (5)
HubClientProxyGenerator.Parser.cs (3)
208var registerCallbackProviderSemanticModel = _compilation.GetSemanticModel(methodDeclarationSyntax.SyntaxTree); 251var argModel = _compilation.GetSemanticModel(argType.SyntaxTree); 260var argModel = _compilation.GetSemanticModel(als.Arguments[0].Expression.SyntaxTree);
HubServerProxyGenerator.Parser.cs (2)
197var getProxySemanticModel = _compilation.GetSemanticModel(methodDeclarationSyntax.SyntaxTree); 236var argumentModel = _compilation.GetSemanticModel(proxyType.SyntaxTree);
Microsoft.CodeAnalysis (281)
Compilation\Compilation.cs (7)
307/// Gets a new <see cref="SemanticModel"/> for the specified syntax tree. 314public SemanticModel GetSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility = false) 321public SemanticModel GetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options) 325/// Gets a <see cref="SemanticModel"/> for the given <paramref name="syntaxTree"/>. 330protected abstract SemanticModel CommonGetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options); 333/// Creates a new <see cref="SemanticModel"/> for the given <paramref name="syntaxTree"/>. 338internal abstract SemanticModel CreateSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options);
Compilation\ControlFlowAnalysis.cs (1)
11/// information is returned from a call to <see cref="SemanticModel.AnalyzeControlFlow(SyntaxNode)" />.
Compilation\DataFlowAnalysis.cs (1)
12/// <see cref="SemanticModel.AnalyzeDataFlow(SyntaxNode, SyntaxNode)" />, or one of its language-specific overloads,
Compilation\Extensions.cs (12)
19public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken = default(CancellationToken)) 43public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel semanticModel, int position, SyntaxNode expression, SpeculativeBindingOption bindingOption) 55public static TypeInfo GetTypeInfo(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken = default(CancellationToken)) 68public static IAliasSymbol? GetAliasInfo(this SemanticModel semanticModel, SyntaxNode nameSyntax, CancellationToken cancellationToken = default(CancellationToken)) 90public static IAliasSymbol? GetSpeculativeAliasInfo(this SemanticModel semanticModel, int position, SyntaxNode nameSyntax, SpeculativeBindingOption bindingOption) 114public static TypeInfo GetSpeculativeTypeInfo(this SemanticModel semanticModel, int position, SyntaxNode expression, SpeculativeBindingOption bindingOption) 129public static ISymbol? GetDeclaredSymbol(this SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken = default(CancellationToken)) 140public static ImmutableArray<ISymbol> GetMemberGroup(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken = default(CancellationToken)) 148public static ControlFlowAnalysis AnalyzeControlFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 156public static ControlFlowAnalysis AnalyzeControlFlow(this SemanticModel semanticModel, SyntaxNode statement) 164public static DataFlowAnalysis AnalyzeDataFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 173public static DataFlowAnalysis AnalyzeDataFlow(this SemanticModel semanticModel, SyntaxNode statementOrExpression)
Compilation\IImportScope.cs (1)
39/// cref="SemanticModel.GetImportScopes"/>.</item>
Compilation\SemanticModel.cs (3)
261public SemanticModel? ParentModel 270protected abstract SemanticModel? ParentModelCore 279internal abstract SemanticModel ContainingPublicModelOrSelf
Compilation\SemanticModelProvider.cs (2)
16/// Gets a <see cref="SemanticModel"/> for the given <paramref name="tree"/> that belongs to the given <paramref name="compilation"/>. 18public abstract SemanticModel GetSemanticModel(SyntaxTree tree, Compilation compilation, SemanticModelOptions options = default);
DiagnosticAnalyzer\AnalysisContextInfo.cs (1)
27public AnalysisContextInfo(SemanticModel model) :
DiagnosticAnalyzer\AnalyzerDriver.cs (11)
1002private SemanticModel GetOrCreateSemanticModel(SyntaxTree tree) 1005protected SemanticModel GetOrCreateSemanticModel(SyntaxTree tree, Compilation compilation) 1266var model = compilation.GetSemanticModel(location.SourceTree); 1326var model = compilation.GetSemanticModel(tree); 1887var model = compilation.GetSemanticModel(syntaxReference.SyntaxTree); 1904var semanticModel = GetOrCreateSemanticModel(completedEvent.CompilationUnit, completedEvent.Compilation); 2538SemanticModel semanticModel, 2556private static void ComputeDeclarationsInNode(SemanticModel semanticModel, ISymbol declaredSymbol, SyntaxNode declaringReferenceSyntax, SyntaxNode topmostNodeForAnalysis, ArrayBuilder<DeclarationInfo> builder, CancellationToken cancellationToken) 2585var semanticModel = symbolEvent.SemanticModelWithCachedBoundNodes ?? 2843SemanticModel semanticModel, 2917SemanticModel semanticModel,
DiagnosticAnalyzer\AnalyzerExecutor.cs (14)
42private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 111Func<SyntaxTree, SemanticModel> getSemanticModel, 143Func<SyntaxTree, SemanticModel> getSemanticModel, 514SemanticModel semanticModel, 639SemanticModel semanticModel, 665SemanticModel semanticModel, 696SemanticModel semanticModel, 734SemanticModel semanticModel, 754SemanticModel semanticModel, 876SemanticModel semanticModel, 957SemanticModel model, 985SemanticModel model, 1060SemanticModel model, 1086SemanticModel model,
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (5)
36public override SemanticModel GetSemanticModel(SyntaxTree tree, Compilation compilation, SemanticModelOptions options = default) 55private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _semanticModelsMap; 59private readonly Func<SyntaxTree, SemanticModel> _createSemanticModel; 64_semanticModelsMap = new ConcurrentDictionary<SyntaxTree, SemanticModel>(); 68public SemanticModel GetSemanticModel(SyntaxTree tree, SemanticModelOptions options)
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (8)
186private void VerifyModel(SemanticModel model) 598public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, TextSpan? filterSpan, CancellationToken cancellationToken) 613public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 628public Task<AnalysisResult> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, CancellationToken cancellationToken) 643public Task<AnalysisResult> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 651private async Task<AnalysisResult> GetAnalysisResultCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 658private async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 1034var mappedModel = compilation.GetSemanticModel(analysisScope.FilterFileOpt!.Value.SourceTree!);
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
34var semanticModel = _compilation.GetSemanticModel(context.Tree);
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (32)
64/// which will operate on the <see cref="SemanticModel"/> of the document. A semantic model action 67/// <param name="action">Action to be executed for a document's <see cref="SemanticModel"/>.</param> 359/// which will operate on the <see cref="SemanticModel"/> of the document. A semantic model action 362/// <param name="action">Action to be executed for a document's <see cref="SemanticModel"/>.</param> 679/// A semantic model action operates on the <see cref="CodeAnalysis.SemanticModel"/> of a code document, and can use a <see cref="SemanticModelAnalysisContext"/> to report <see cref="Diagnostic"/>s about the model. 683private readonly SemanticModel _semanticModel; 690/// <see cref="CodeAnalysis.SemanticModel"/> that is the subject of the analysis. 692public SemanticModel SemanticModel { get { return _semanticModel; } } 717/// Indicates if the underlying <see cref="SemanticModel.SyntaxTree"/> is generated code. 722public SemanticModelAnalysisContext(SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 728SemanticModel semanticModel, 747/// Report a <see cref="Diagnostic"/> about a <see cref="CodeAnalysis.SemanticModel"/>. 1022private readonly SemanticModel _semanticModel; 1037/// <see cref="CodeAnalysis.SemanticModel"/> that can provide semantic information about the <see cref="SyntaxNode"/>s in the code block. 1039public SemanticModel SemanticModel { get { return _semanticModel; } } 1069protected CodeBlockStartAnalysisContext(SyntaxNode codeBlock, ISymbol owningSymbol, SemanticModel semanticModel, AnalyzerOptions options, CancellationToken cancellationToken) 1077SemanticModel semanticModel, 1130private readonly SemanticModel _semanticModel; 1147/// <see cref="CodeAnalysis.SemanticModel"/> that can provide semantic information about the <see cref="SyntaxNode"/>s in the code block. 1149public SemanticModel SemanticModel { get { return _semanticModel; } } 1179public CodeBlockAnalysisContext(SyntaxNode codeBlock, ISymbol owningSymbol, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1187SemanticModel semanticModel, 1662private readonly SemanticModel _semanticModel; 1679/// <see cref="CodeAnalysis.SemanticModel"/> that can provide semantic information about the <see cref="SyntaxNode"/>. 1681public SemanticModel SemanticModel => _semanticModel; 1716public SyntaxNodeAnalysisContext(SyntaxNode node, ISymbol? containingSymbol, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1722public SyntaxNodeAnalysisContext(SyntaxNode node, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1730SemanticModel semanticModel, 1885private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 1920Func<SyntaxTree, SemanticModel> getSemanticModel, 1961/// Gets a <see cref="SemanticModel"/> for the given <see cref="SyntaxTree"/>, which is shared across all analyzers. 1963public SemanticModel GetSemanticModel(SyntaxTree syntaxTree) => _getSemanticModel(syntaxTree);
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (1)
295SemanticModel semanticModel,
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
163var model = _compilation.GetSemanticModel(location.SourceTree);
DiagnosticAnalyzer\SymbolDeclaredCompilationEvent.cs (2)
23SemanticModel? semanticModelWithCachedBoundNodes = null) 35public SemanticModel? SemanticModelWithCachedBoundNodes { get; }
Generated\Operations.Generated.cs (134)
4001internal BlockOperation(ImmutableArray<IOperation> operations, ImmutableArray<ILocalSymbol> locals, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4058internal VariableDeclarationGroupOperation(ImmutableArray<IVariableDeclarationOperation> declarations, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4113internal SwitchOperation(ImmutableArray<ILocalSymbol> locals, IOperation value, ImmutableArray<ISwitchCaseOperation> cases, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4183protected BaseLoopOperation(IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4199internal ForEachLoopOperation(IOperation loopControlVariable, IOperation collection, ImmutableArray<IOperation> nextVariables, ForEachLoopOperationInfo? info, bool isAsynchronous, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4289internal ForLoopOperation(ImmutableArray<IOperation> before, ImmutableArray<ILocalSymbol> conditionLocals, IOperation? condition, ImmutableArray<IOperation> atLoopBottom, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4381internal ForToLoopOperation(IOperation loopControlVariable, IOperation initialValue, IOperation limitValue, IOperation stepValue, bool isChecked, ImmutableArray<IOperation> nextVariables, (ILocalSymbol LoopObject, ForToLoopOperationUserDefinedInfo UserDefinedInfo) info, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4493internal WhileLoopOperation(IOperation? condition, bool conditionIsTop, bool conditionIsUntil, IOperation? ignoredCondition, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4517internal LabeledOperation(ILabelSymbol label, IOperation? operation, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4570internal BranchOperation(ILabelSymbol target, BranchKind branchKind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4590internal EmptyOperation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4604internal ReturnOperation(IOperation? returnedValue, OperationKind kind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4656internal LockOperation(IOperation lockedValue, IOperation body, ILocalSymbol? lockTakenSymbol, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4720internal TryOperation(IBlockOperation body, ImmutableArray<ICatchClauseOperation> catches, IBlockOperation? @finally, ILabelSymbol? exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4799internal UsingOperation(IOperation resources, IOperation body, ImmutableArray<ILocalSymbol> locals, bool isAsynchronous, DisposeOperationInfo disposeInfo, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4867internal ExpressionStatementOperation(IOperation operation, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4918internal LocalFunctionOperation(IMethodSymbol symbol, IBlockOperation? body, IBlockOperation? ignoredBody, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4982internal StopOperation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4996internal EndOperation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 5010internal RaiseEventOperation(IEventReferenceOperation eventReference, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 5076internal LiteralOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5094internal ConversionOperation(IOperation operand, IConvertibleConversion conversion, bool isTryCast, bool isChecked, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5154internal InvocationOperation(IMethodSymbol targetMethod, ITypeSymbol? constrainedToType, IOperation? instance, bool isVirtual, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5227internal ArrayElementReferenceOperation(IOperation arrayReference, ImmutableArray<IOperation> indices, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5294internal LocalReferenceOperation(ILocalSymbol local, bool isDeclaration, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5316internal ParameterReferenceOperation(IParameterSymbol parameter, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5335protected BaseMemberReferenceOperation(IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 5345internal FieldReferenceOperation(IFieldSymbol field, bool isDeclaration, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5400internal MethodReferenceOperation(IMethodSymbol method, ITypeSymbol? constrainedToType, bool isVirtual, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5456internal PropertyReferenceOperation(IPropertySymbol property, ITypeSymbol? constrainedToType, ImmutableArray<IArgumentOperation> arguments, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5525internal EventReferenceOperation(IEventSymbol @event, ITypeSymbol? constrainedToType, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5579internal UnaryOperation(UnaryOperatorKind operatorKind, IOperation operand, bool isLifted, bool isChecked, IMethodSymbol? operatorMethod, ITypeSymbol? constrainedToType, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5642internal BinaryOperation(BinaryOperatorKind operatorKind, IOperation leftOperand, IOperation rightOperand, bool isLifted, bool isChecked, bool isCompareText, IMethodSymbol? operatorMethod, ITypeSymbol? constrainedToType, IMethodSymbol? unaryOperatorMethod, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5720internal ConditionalOperation(IOperation condition, IOperation whenTrue, IOperation? whenFalse, bool isRef, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5797internal CoalesceOperation(IOperation value, IOperation whenNull, IConvertibleConversion valueConversion, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5864internal AnonymousFunctionOperation(IMethodSymbol symbol, IBlockOperation body, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 5917internal ObjectCreationOperation(IMethodSymbol? constructor, IObjectOrCollectionInitializerOperation? initializer, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5987internal TypeParameterObjectCreationOperation(IObjectOrCollectionInitializerOperation? initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6039internal ArrayCreationOperation(ImmutableArray<IOperation> dimensionSizes, IArrayInitializerOperation? initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6106internal InstanceReferenceOperation(InstanceReferenceKind referenceKind, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6125internal IsTypeOperation(IOperation valueOperand, ITypeSymbol typeOperand, bool isNegated, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6181internal AwaitOperation(IOperation operation, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6233protected BaseAssignmentOperation(IOperation target, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 6244internal SimpleAssignmentOperation(bool isRef, IOperation target, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 6306internal CompoundAssignmentOperation(IConvertibleConversion inConversion, IConvertibleConversion outConversion, BinaryOperatorKind operatorKind, bool isLifted, bool isChecked, IMethodSymbol? operatorMethod, ITypeSymbol? constrainedToType, IOperation target, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6381internal ParenthesizedOperation(IOperation operand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 6434internal EventAssignmentOperation(IOperation eventReference, IOperation handlerValue, bool adds, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6499internal ConditionalAccessOperation(IOperation operation, IOperation whenNotNull, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6562internal ConditionalAccessInstanceOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6579internal InterpolatedStringOperation(ImmutableArray<IInterpolatedStringContentOperation> parts, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 6636internal AnonymousObjectCreationOperation(ImmutableArray<IOperation> initializers, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6692internal ObjectOrCollectionInitializerOperation(ImmutableArray<IOperation> initializers, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6748internal MemberInitializerOperation(IOperation initializedMember, IObjectOrCollectionInitializerOperation initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6811internal NameOfOperation(IOperation argument, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 6864internal TupleOperation(ImmutableArray<IOperation> elements, ITypeSymbol? naturalType, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6922internal DynamicMemberReferenceOperation(IOperation? instance, string memberName, ImmutableArray<ITypeSymbol> typeArguments, ITypeSymbol? containingType, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6980internal TranslatedQueryOperation(IOperation operation, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7032internal DelegateCreationOperation(IOperation target, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7084internal DefaultValueOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 7102internal TypeOfOperation(ITypeSymbol typeOperand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7121internal SizeOfOperation(ITypeSymbol typeOperand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 7141internal AddressOfOperation(IOperation reference, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7193internal IsPatternOperation(IOperation value, IPatternOperation pattern, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7256internal IncrementOrDecrementOperation(bool isPostfix, bool isLifted, bool isChecked, IOperation target, IMethodSymbol? operatorMethod, ITypeSymbol? constrainedToType, OperationKind kind, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7319internal ThrowOperation(IOperation? exception, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7371internal DeconstructionAssignmentOperation(IOperation target, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7430internal DeclarationExpressionOperation(IOperation expression, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7482internal OmittedArgumentOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7499protected BaseSymbolInitializerOperation(ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7510internal FieldInitializerOperation(ImmutableArray<IFieldSymbol> initializedFields, ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7561internal VariableInitializerOperation(ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7608internal PropertyInitializerOperation(ImmutableArray<IPropertySymbol> initializedProperties, ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7659internal ParameterInitializerOperation(IParameterSymbol parameter, ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7710internal ArrayInitializerOperation(ImmutableArray<IOperation> elementValues, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7765internal VariableDeclaratorOperation(ILocalSymbol symbol, IVariableInitializerOperation? initializer, ImmutableArray<IOperation> ignoredArguments, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7833internal VariableDeclarationOperation(ImmutableArray<IVariableDeclaratorOperation> declarators, IVariableInitializerOperation? initializer, ImmutableArray<IOperation> ignoredDimensions, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7914internal ArgumentOperation(ArgumentKind argumentKind, IParameterSymbol? parameter, IOperation value, IConvertibleConversion inConversion, IConvertibleConversion outConversion, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7975internal CatchClauseOperation(IOperation? exceptionDeclarationOrExpression, ITypeSymbol exceptionType, ImmutableArray<ILocalSymbol> locals, IOperation? filter, IBlockOperation handler, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8052internal SwitchCaseOperation(ImmutableArray<ICaseClauseOperation> clauses, ImmutableArray<IOperation> body, ImmutableArray<ILocalSymbol> locals, IOperation? condition, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8126protected BaseCaseClauseOperation(ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8136internal DefaultCaseClauseOperation(ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8150internal PatternCaseClauseOperation(ILabelSymbol label, IPatternOperation pattern, IOperation? guard, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8213internal RangeCaseClauseOperation(IOperation minimumValue, IOperation maximumValue, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8275internal RelationalCaseClauseOperation(IOperation value, BinaryOperatorKind relation, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8328internal SingleValueCaseClauseOperation(IOperation value, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8379protected BaseInterpolatedStringContentOperation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8384internal InterpolatedStringTextOperation(IOperation text, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8435internal InterpolationOperation(IOperation expression, IOperation? alignment, IOperation? formatString, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8508protected BasePatternOperation(ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8519internal ConstantPatternOperation(IOperation value, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8570internal DeclarationPatternOperation(ITypeSymbol? matchedType, bool matchesNull, ISymbol? declaredSymbol, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8592internal TupleBinaryOperation(BinaryOperatorKind operatorKind, IOperation leftOperand, IOperation rightOperand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8657protected BaseMethodBodyBaseOperation(IBlockOperation? blockBody, IBlockOperation? expressionBody, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8668internal MethodBodyOperation(IBlockOperation? blockBody, IBlockOperation? expressionBody, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8724internal ConstructorBodyOperation(ImmutableArray<ILocalSymbol> locals, IOperation? initializer, IBlockOperation? blockBody, IBlockOperation? expressionBody, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8795internal DiscardOperation(IDiscardSymbol discardSymbol, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8814internal FlowCaptureOperation(CaptureId id, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8867internal FlowCaptureReferenceOperation(CaptureId id, bool isInitialization, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 8889internal IsNullOperation(IOperation operand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 8942internal CaughtExceptionOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8959internal StaticLocalInitializationSemaphoreOperation(ILocalSymbol local, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8978internal CoalesceAssignmentOperation(IOperation target, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9037internal RangeOperation(IOperation? leftOperand, IOperation? rightOperand, bool isLifted, IMethodSymbol? method, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9104internal ReDimOperation(ImmutableArray<IReDimClauseOperation> clauses, bool preserve, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9161internal ReDimClauseOperation(IOperation operand, ImmutableArray<IOperation> dimensionSizes, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9227internal RecursivePatternOperation(ITypeSymbol matchedType, ISymbol? deconstructSymbol, ImmutableArray<IPatternOperation> deconstructionSubpatterns, ImmutableArray<IPropertySubpatternOperation> propertySubpatterns, ISymbol? declaredSymbol, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9303internal DiscardPatternOperation(ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9317internal SwitchExpressionOperation(IOperation value, ImmutableArray<ISwitchExpressionArmOperation> arms, bool isExhaustive, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9386internal SwitchExpressionArmOperation(IPatternOperation pattern, IOperation? guard, IOperation value, ImmutableArray<ILocalSymbol> locals, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9461internal PropertySubpatternOperation(IOperation member, IPatternOperation pattern, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9523internal AggregateQueryOperation(IOperation group, IOperation aggregation, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9586internal FixedOperation(ImmutableArray<ILocalSymbol> locals, IVariableDeclarationGroupOperation variables, IOperation body, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9650internal NoPiaObjectCreationOperation(IObjectOrCollectionInitializerOperation? initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9702internal PlaceholderOperation(PlaceholderKind placeholderKind, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9721internal WithStatementOperation(IOperation body, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9783internal UsingDeclarationOperation(IVariableDeclarationGroupOperation declarationGroup, bool isAsynchronous, DisposeOperationInfo disposeInfo, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9838internal NegatedPatternOperation(IPatternOperation pattern, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9889internal BinaryPatternOperation(BinaryOperatorKind operatorKind, IPatternOperation leftPattern, IPatternOperation rightPattern, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9953internal TypePatternOperation(ITypeSymbol matchedType, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9971internal RelationalPatternOperation(BinaryOperatorKind operatorKind, IOperation value, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 10024internal WithOperation(IOperation operand, IMethodSymbol? cloneMethod, IObjectOrCollectionInitializerOperation initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 10089internal InterpolatedStringHandlerCreationOperation(IOperation handlerCreation, bool handlerCreationHasSuccessParameter, bool handlerAppendCallsReturnBool, IOperation content, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 10156internal InterpolatedStringAdditionOperation(IOperation left, IOperation right, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 10218internal InterpolatedStringAppendOperation(IOperation appendCall, OperationKind kind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 10270internal InterpolatedStringHandlerArgumentPlaceholderOperation(int argumentIndex, InterpolatedStringArgumentPlaceholderKind placeholderKind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 10290internal FunctionPointerInvocationOperation(IOperation target, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 10357internal ListPatternOperation(ISymbol? lengthSymbol, ISymbol? indexerSymbol, ImmutableArray<IPatternOperation> patterns, ISymbol? declaredSymbol, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 10418internal SlicePatternOperation(ISymbol? sliceSymbol, IPatternOperation? pattern, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 10471internal ImplicitIndexerReferenceOperation(IOperation instance, IOperation argument, ISymbol lengthSymbol, ISymbol indexerSymbol, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 10538internal Utf8StringOperation(string value, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 10557internal AttributeOperation(IOperation operation, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 10608internal InlineArrayAccessOperation(IOperation instance, IOperation argument, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 10671internal CollectionExpressionOperation(IMethodSymbol? constructMethod, ImmutableArray<IOperation> elements, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 10729internal SpreadOperation(IOperation operand, ITypeSymbol? elementType, IConvertibleConversion elementConversion, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit)
Operations\ControlFlowGraph.cs (2)
80/// Returns null if <see cref="SemanticModel.GetOperation(SyntaxNode, CancellationToken)"/> returns null for the given <paramref name="node"/> and <paramref name="semanticModel"/>. 83public static ControlFlowGraph? Create(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken = default)
Operations\IOperation.cs (2)
74/// Non-null for operations generated from source with <see cref="SemanticModel.GetOperation(SyntaxNode, System.Threading.CancellationToken)"/> API 78SemanticModel? SemanticModel { get; }
Operations\Operation.cs (5)
21private readonly SemanticModel? _owningSemanticModelOpt; 27protected Operation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 123SemanticModel? IOperation.SemanticModel => _owningSemanticModelOpt?.ContainingPublicModelOrSelf; 128/// is the semantic model on which <see cref="SemanticModel.GetOperation(SyntaxNode, CancellationToken)"/> was invoked 131internal SemanticModel? OwningSemanticModel => _owningSemanticModelOpt;
Operations\OperationExtensions.cs (1)
47var model = operation.SemanticModel;
Operations\OperationFactory.cs (1)
11public static IInvalidOperation CreateInvalidOperation(SemanticModel semanticModel, SyntaxNode syntax, ImmutableArray<IOperation> children, bool isImplicit)
Operations\OperationNodes.cs (8)
18public NoneOperation(ImmutableArray<IOperation> children, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) : 87public InvalidOperation(ImmutableArray<IOperation> children, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) : 235protected HasDynamicArgumentsExpression(ImmutableArray<IOperation> arguments, ImmutableArray<string?> argumentNames, ImmutableArray<RefKind> argumentRefKinds, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) : 252public DynamicObjectCreationOperation(IObjectOrCollectionInitializerOperation? initializer, ImmutableArray<IOperation> arguments, ImmutableArray<string?> argumentNames, ImmutableArray<RefKind> argumentRefKinds, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) : 334public DynamicInvocationOperation(IOperation operation, ImmutableArray<IOperation> arguments, ImmutableArray<string?> argumentNames, ImmutableArray<RefKind> argumentRefKinds, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) : 416public DynamicIndexerAccessOperation(IOperation operation, ImmutableArray<IOperation> arguments, ImmutableArray<string?> argumentNames, ImmutableArray<RefKind> argumentRefKinds, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) : 688public static BlockOperation CreateTemporaryBlock(ImmutableArray<IOperation> statements, SemanticModel semanticModel, SyntaxNode syntax) 691private BlockOperation(ImmutableArray<IOperation> statements, SemanticModel semanticModel, SyntaxNode syntax)
SourceGeneration\GeneratorContexts.cs (4)
231private readonly Lazy<SemanticModel>? _semanticModel; 233internal GeneratorSyntaxContext(SyntaxNode node, Lazy<SemanticModel>? semanticModel, ISyntaxHelper syntaxHelper) 246/// The <see cref="CodeAnalysis.SemanticModel" /> that can be queried to obtain information about <see cref="Node"/>. 248public SemanticModel SemanticModel => _semanticModel!.Value;
SourceGeneration\GeneratorSyntaxWalker.cs (1)
23public void VisitWithModel(Lazy<SemanticModel>? model, SyntaxNode node)
SourceGeneration\ISyntaxReceiver.cs (1)
46/// <see cref="SemanticModel"/> that can be queried to obtain more information, before generation
SourceGeneration\Nodes\ISyntaxStrategy.cs (1)
20void VisitTree(Lazy<SyntaxNode> root, EntryState state, Lazy<SemanticModel>? model, CancellationToken cancellationToken);
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (1)
64Lazy<SemanticModel>? model,
SourceGeneration\Nodes\SyntaxReceiverStrategy.cs (1)
70Lazy<SemanticModel>? model,
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (3)
32public SemanticModel SemanticModel { get; } 47SemanticModel semanticModel, 104var semanticModel = compilation.GetSemanticModel(syntaxTree);
SourceGeneration\SyntaxStore.cs (1)
90var model = state != EntryState.Removed ? new Lazy<SemanticModel>(() => _compilation.GetSemanticModel(tree)) : null;
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (5)
15internal static DeclarationInfo GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, IEnumerable<SyntaxNode>? executableCodeBlocks, CancellationToken cancellationToken) 27internal static DeclarationInfo GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, CancellationToken cancellationToken) 32internal static DeclarationInfo GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, SyntaxNode executableCodeBlock, CancellationToken cancellationToken) 37internal static DeclarationInfo GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, CancellationToken cancellationToken, params SyntaxNode[] executableCodeBlocks) 42private static ISymbol? GetDeclaredSymbol(SemanticModel model, SyntaxNode node, bool getSymbol, CancellationToken cancellationToken)
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (3)
21private SemanticModel? _semanticModelOpt; 39protected SemanticModel? SemanticModelOpt => _semanticModelOpt; 73SemanticModel? semanticModelOpt,
Symbols\ISymbol.cs (2)
257SemanticModel semanticModel, 272SemanticModel semanticModel,
Symbols\ITypeSymbol.cs (2)
166SemanticModel semanticModel, 182SemanticModel semanticModel,
Microsoft.CodeAnalysis.CodeStyle (156)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (2)
41protected abstract (CommonConversion conversion, ITypeSymbol? collectionElementType) GetForEachInfo(SemanticModel semanticModel, TForEachStatementSyntax node); 53var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
34protected abstract bool IsWrittenTo(SemanticModel semanticModel, TThisExpression expression, CancellationToken cancellationToken);
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
93private bool IsFixSupported(SemanticModel semanticModel, TNamespaceSyntax namespaceDeclaration, CancellationToken cancellationToken) 170protected bool ContainsPartialTypeWithMultipleDeclarations(TNamespaceSyntax namespaceDeclaration, SemanticModel semanticModel)
src\Analyzers\Core\Analyzers\RemoveUnnecessaryCast\AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (2)
32protected abstract bool IsUnnecessaryCast(SemanticModel model, TCastExpression node, CancellationToken cancellationToken); 56private Diagnostic? TryRemoveCastExpression(SemanticModel model, TCastExpression node, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
44TParenthesizedExpressionSyntax parenthesizedExpression, SemanticModel semanticModel, CancellationToken cancellationToken,
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
74public void AnalyzeAssemblyOrModuleAttribute(SyntaxNode attributeSyntax, SemanticModel model, Action<Diagnostic> reportDiagnostic, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (3)
85SemanticModel semanticModel, 392SemanticModel semanticModel, 734SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
47SemanticModel model,
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
601SemanticModel? lazyModel = null;
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
52protected abstract CommonConversion GetConversion(SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken); 73var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
171private static bool IsType<T>(INamedTypeSymbol type, SemanticModel semanticModel) 174private static INamedTypeSymbol? FindType<T>(SemanticModel semanticModel)
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (3)
80SemanticModel model, SyntaxNode node, TSimplifierOptions options, 114public bool TrySimplify(SemanticModel model, SyntaxNode node, [NotNullWhen(true)] out Diagnostic? diagnostic, TSimplifierOptions options, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken) 135internal static Diagnostic CreateDiagnostic(SemanticModel model, TSimplifierOptions options, AnalyzerOptions analyzerOptions, TextSpan issueSpan, string diagnosticId, bool inDeclaration)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (9)
97protected abstract TExpression? GetSetterExpression(SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken); 100SemanticModel semanticModel, IMethodSymbol accessor, HashSet<string> fieldNames, HashSet<IFieldSymbol> result, CancellationToken cancellationToken); 103HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 231SemanticModel semanticModel, 263SemanticModel semanticModel, 282SemanticModel semanticModel, IMethodSymbol setMethod, HashSet<string> fieldNames, CancellationToken cancellationToken) 298SemanticModel semanticModel, 340var semanticModel = context.SemanticModel; 500SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
62var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (2)
43protected abstract bool IsTargetTyped(SemanticModel semanticModel, TConditionalExpressionSyntax conditional, System.Threading.CancellationToken cancellationToken); 102var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (2)
38protected abstract bool IsTargetTyped(SemanticModel semanticModel, TConditionalExpressionSyntax conditional, System.Threading.CancellationToken cancellationToken); 100var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (4)
48protected SemanticModel SemanticModel => this.State.SemanticModel; 97SemanticModel semanticModel, 125SemanticModel semanticModel, 154SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerAnalyzer.cs (1)
58SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
83SemanticModel semanticModel, TObjectCreationExpressionSyntax objectCreationExpression, INamedTypeSymbol? expressionType, bool allowSemanticsChange, CancellationToken cancellationToken, out bool changesSemantics); 124var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (2)
34public readonly SemanticModel SemanticModel; 59SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
138var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (3)
41ISyntaxFacts syntaxFacts, SyntaxNode expr, SemanticModel semanticModel, CancellationToken cancellationToken) 47ISyntaxFacts syntaxFacts, SyntaxNode expr, SemanticModel semanticModel, 100SyntaxNode expr, SemanticModel semanticModel, bool isTopLevel, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
60var semanticModel = context.SemanticModel; 148private static ITypeParameterSymbol? GetGenericParameterSymbol(ISyntaxFacts syntaxFacts, SemanticModel semanticModel, SyntaxNode node1, SyntaxNode node2, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (4)
141var semanticModel = context.SemanticModel; 302var semanticModel = context.SemanticModel; 330SemanticModel semanticModel, 354ISyntaxFacts syntaxFacts, SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
56var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
95var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
50SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (3)
80var semanticModel = context.Operation.SemanticModel; 139private static bool ValueIsAccessed(SemanticModel semanticModel, IConditionalOperation ifOperation, IBlockOperation containingBlock, ISymbol localOrParameter, IExpressionStatementOperation expressionStatement, IAssignmentOperation assignmentExpression) 270SemanticModel semanticModel, IThrowOperation throwOperation,
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
181SemanticModel semanticModel, 191SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
22/// <see cref="SemanticModel"/> is needed, use <see cref="SemanticSpanAnalysis"/> or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
23SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
577public static bool IsAwaitableNonDynamic([NotNullWhen(true)] this ISymbol? symbol, SemanticModel semanticModel, int position)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (7)
17public static bool AreEquivalent(SemanticModel semanticModel, SyntaxNode node1, SyntaxNode node2) 21SemanticModel semanticModel1, 22SemanticModel semanticModel2, 51SemanticModel semanticModel1, 52SemanticModel semanticModel2, 132SemanticModel semanticModel1, 133SemanticModel semanticModel2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (20)
32public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 35public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode statementOrExpression) 38public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 41public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode statement) 44public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 47public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken) 53public static IOperation GetRequiredOperation(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 59public static ISymbol GetRequiredEnclosingSymbol(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 65public static TSymbol? GetEnclosingSymbol<TSymbol>(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 81public static ISymbol GetEnclosingNamedTypeOrAssembly(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 87public static INamedTypeSymbol? GetEnclosingNamedType(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 90public static INamespaceSymbol? GetEnclosingNamespace(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 94this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null) 102public static SemanticModel GetOriginalSemanticModel(this SemanticModel semanticModel) 116this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? filter = null) 128SemanticModel semanticModel, SyntaxNode node, 150public static string GenerateNameFromType(this SemanticModel semanticModel, ITypeSymbol type, ISyntaxFacts syntaxFacts, bool capitalize) 181private static bool ShouldPluralize(this SemanticModel semanticModel, ITypeSymbol type) 232this SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (3)
21SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 23public ImmutableArray<TSyntaxNode> GetUnnecessaryImports(SemanticModel model, TextSpan? span, CancellationToken cancellationToken) 27SemanticModel model, TextSpan? span, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\IUnnecessaryImportsProvider.cs (2)
15ImmutableArray<TSyntaxNode> GetUnnecessaryImports(SemanticModel model, TextSpan? span, CancellationToken cancellationToken); 18SemanticModel model,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFacts.cs (24)
53bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 60bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 61bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 62bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 63bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 65bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken); 67ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken); 74bool TryGetSpeculativeSemanticModel(SemanticModel oldSemanticModel, SyntaxNode oldNode, SyntaxNode newNode, [NotNullWhen(true)] out SemanticModel? speculativeModel); 79ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken); 81ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement); 82SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 84IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node); 86ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node); 88ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node); 92IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken); 94IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 95IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 97ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken); 98ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken); 100ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken); 102bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 109bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken); 111string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (3)
17SemanticModel semanticModel) 121public static IParameterSymbol? FindParameterForArgument(this ISemanticFacts semanticFacts, SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 124public static IParameterSymbol? FindParameterForAttributeArgument(this ISemanticFacts semanticFacts, SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (2)
44var semanticModel = reader.Compilation.GetSemanticModel(syntaxTree); 59SemanticModel semanticModel, SyntaxNode syntaxNode, string name, ISymbol target,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs (1)
53var semanticModel = reader.Compilation.GetSemanticModel(syntaxTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (4)
88TryGetSemanticModel(compilation, syntaxTree, out var semanticModel)) 117[NotNullWhen(true)] out SemanticModel? semanticModel) 186TryGetSemanticModel(reader.Compilation, firstSourceTree, out var semanticModel)) 256SemanticModel semanticModel, SyntaxNode containerDeclaration, SymbolKind kind, string localName, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
727var semanticModel = Compilation.GetSemanticModel(location.SourceTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (18)
52private SemanticModel? _lazySpeculativeSemanticModel; 77SemanticModel semanticModel, 98protected abstract SemanticModel CreateSpeculativeSemanticModel(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel); 104protected abstract TConversion ClassifyConversion(SemanticModel model, TExpressionSyntax expression, ITypeSymbol targetType); 105protected abstract TConversion ClassifyConversion(SemanticModel model, ITypeSymbol originalType, ITypeSymbol targetType); 106protected abstract bool ConversionsAreCompatible(SemanticModel model1, TExpressionSyntax expression1, SemanticModel model2, TExpressionSyntax expression2); 111protected abstract bool IsForEachTypeInferred(TForEachStatementSyntax forEachStatement, SemanticModel semanticModel); 112protected abstract bool ForEachConversionsAreCompatible(SemanticModel originalModel, TForEachStatementSyntax originalForEach, SemanticModel newModel, TForEachStatementSyntax newForEach); 114SemanticModel model, TForEachStatementSyntax forEach, out IMethodSymbol getEnumeratorMethod, out ITypeSymbol elementType, out ImmutableArray<ILocalSymbol> localVariables); 154public SemanticModel OriginalSemanticModel { get; } 189public SemanticModel SpeculativeSemanticModel 223protected abstract void ValidateSpeculativeSemanticModel(SemanticModel speculativeSemanticModel, SyntaxNode nodeToSpeculate); 980SemanticModel speculativeSemanticModel) 1034private bool IsReceiverNonUniquePossibleValueTypeParam(TExpressionSyntax invocation, SemanticModel semanticModel) 1052private static bool IsReceiverUniqueInstance(TExpressionSyntax receiver, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
28SemanticModel semanticModel, 49public static void AddAliasSymbols(SemanticModel semanticModel, int namespaceId, IEnumerable<IAliasSymbol> aliasSymbols)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ISpeculationAnalyzer.cs (4)
11/// <see cref="SemanticModel.SyntaxTree"/> that <see cref="OriginalSemanticModel"/> points at. 17/// cref="SemanticModel.SyntaxTree"/> that <see cref="SpeculativeSemanticModel"/> points at. 24SemanticModel OriginalSemanticModel { get; } 30SemanticModel SpeculativeSemanticModel { get; }
Microsoft.CodeAnalysis.CodeStyle.Fixes (245)
LanguageServices\SemanticModelWorkspaceService\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (1)
20public ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersCodeFixProvider.cs (1)
47var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (2)
91var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 101Document document, SemanticModel semanticModel, Diagnostic diagnostic,
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (7)
49Document document, SemanticModel semanticModel, SyntaxNode root, 61Document document, SemanticModel semanticModel, SyntaxNode root, 73var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 118SemanticModel semanticModel, 161protected virtual (SyntaxNode finalTarget, SyntaxNode finalReplacement) Cast(SemanticModel semanticModel, TExpressionSyntax targetNode, ITypeSymbol conversionType) 164private static string GetSubItemName(SemanticModel semanticModel, int position, ITypeSymbol conversionType) 173SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (4)
27protected abstract SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, TArgumentListSyntax newArgumentList); 40SemanticModel semanticModel, 110SemanticModel semanticModel, 204private bool IsInvocationExpressionWithNewArgumentsApplicable(SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (2)
33internal sealed class InheritanceDistanceComparer<TExpressionSyntax>(SemanticModel semanticModel) 37private readonly SemanticModel _semanticModel = semanticModel;
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (9)
38protected abstract ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken); 47SemanticModel semanticModel, 61var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 116SemanticModel semanticModel, 137SemanticModel semanticModel, 185SemanticModel semanticModel, 396var semanticModel = await invocationDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 414var semanticModel = await invocationDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 431SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
42var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (3)
20protected abstract Task<string> GetDescriptionAsync(Diagnostic diagnostic, SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken); 21protected abstract Task<Tuple<SyntaxTree, SyntaxNode>> GetRootInOtherSyntaxTreeAsync(SyntaxNode node, SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken); 64var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ConvertTypeOfToNameOf\AbstractConvertTypeOfToNameOfCodeFixProvider.cs (3)
22protected abstract SyntaxNode GetSymbolTypeExpression(SemanticModel model, TMemberAccessExpressionSyntax node, CancellationToken cancellationToken); 38var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 51public void ConvertTypeOfToNameOf(SemanticModel semanticModel, SyntaxEditor editor, TMemberAccessExpressionSyntax nodeToReplace, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (3)
25protected abstract ITypeSymbol GetForEachElementType(SemanticModel semanticModel, TForEachStatementSyntax forEachStatement); 48var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 59SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (5)
38protected abstract ITypeSymbol GetArgumentType(SemanticModel semanticModel, Argument argument, CancellationToken cancellationToken); 39protected abstract string GenerateNameForExpression(SemanticModel semanticModel, TExpressionSyntax expression, CancellationToken cancellationToken); 43protected abstract IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken); 44protected abstract IMethodSymbol GetDelegatedConstructor(SemanticModel semanticModel, IMethodSymbol constructor, CancellationToken cancellationToken); 157protected string GenerateNameForArgument(SemanticModel semanticModel, Argument argument, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (3)
289private static ITypeSymbol FixType(ITypeSymbol typeSymbol, SemanticModel semanticModel, IEnumerable<ITypeParameterSymbol> allTypeParameters) 624var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 642var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
73SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
179SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
22public abstract ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (1)
28protected abstract ITypeSymbol DetermineReturnTypeForSimpleNameOrMemberAccessExpression(ITypeInferenceService typeInferenceService, SemanticModel semanticModel, TExpressionSyntax expression, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (2)
30protected abstract bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel); 31protected abstract bool AreSpecialOptionsActive(SemanticModel semanticModel);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
37protected abstract bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
397private static IMethodSymbol FindContainingMethodSymbol(int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
49var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (3)
30protected abstract bool TryInitializeState(Document document, SemanticModel model, SyntaxNode interfaceNode, CancellationToken cancellationToken, out SyntaxNode classOrStructDecl, out INamedTypeSymbol classOrStructType, out ImmutableArray<INamedTypeSymbol> interfaceTypes); 41var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 59var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.State.cs (3)
20SemanticModel model) : IImplementInterfaceInfo 26public SemanticModel Model { get; } = model; 40SemanticModel model,
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
76var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (4)
46var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 87private static IMethodSymbol? GetMethodSymbol(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 115var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 176var semanticModel = await newDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (3)
57var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 88var semanticModel = await newDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 126var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
33var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
73var model = await document.GetRequiredSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (3)
50Document document, SyntaxEditor editor, SemanticModel semanticModel, 149var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 159SyntaxEditor editor, SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
30Document document, SyntaxEditor editor, SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
31Document document, SyntaxEditor editor, SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (4)
44var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 69var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 104private static IMethodSymbol? GetMethodSymbol(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 166private static ControlFlowAnalysis? GetControlFlowAnalysis(SyntaxGenerator generator, SemanticModel semanticModel, SyntaxNode node)
src\Analyzers\Core\CodeFixes\RemoveRedundantEquality\RemoveRedundantEqualityCodeFixProvider.cs (1)
43var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesCodeFixProvider.cs (1)
26TParenthesizedExpressionSyntax current, SemanticModel semanticModel, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\RemoveUnusedMembers\AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
50var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (8)
122protected virtual SyntaxNode? TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel) => null; 302var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 349SemanticModel semanticModel, 386SemanticModel semanticModel, 445SemanticModel semanticModel, 916var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 928SemanticModel semanticModel, 933private readonly SemanticModel _semanticModel = semanticModel;
src\Analyzers\Core\CodeFixes\SimplifyBooleanExpression\SimplifyConditionalCodeFixProvider.cs (1)
61SyntaxNode SimplifyConditional(SemanticModel semanticModel, Diagnostic diagnostic, SyntaxNode expr)
src\Analyzers\Core\CodeFixes\SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs (1)
53var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
35var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (2)
30SemanticModel semanticModel, SyntaxNode expressionToCoalesce, 38var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
41var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (2)
42var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 58SyntaxEditor editor, SemanticModel semanticModel, INamedTypeSymbol? expressionTypeOpt,
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
75var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
92var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
65var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForReturn\AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
54var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (2)
72var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 92SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
67var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseSystemHashCode\UseSystemHashCodeCodeFixProvider.cs (1)
47var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (2)
204public string ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null) 207public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
70public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 73public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (5)
69protected abstract INamespaceSymbol? GetExplicitNamespaceSymbol(SyntaxNode node, SemanticModel model); 74SemanticModel model, 90SemanticModel model, 117var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 254private static bool IsInsideNamespace(SyntaxNode node, INamespaceSymbol symbol, SemanticModel model, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ContextQuery\ISyntaxContextService.cs (1)
13SyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ContextQuery\SyntaxContext.cs (2)
15public SemanticModel SemanticModel { get; } 60SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (6)
38public static async ValueTask<SemanticModel> GetRequiredSemanticModelAsync(this Document document, CancellationToken cancellationToken) 40if (document.TryGetSemanticModel(out var semanticModel)) 116public static ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, int position, CancellationToken cancellationToken) 133public static async ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, TextSpan span, CancellationToken cancellationToken) 158public static ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, SyntaxNode? node, CancellationToken cancellationToken) 183var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (11)
15public static ImmutableArray<ITypeSymbol> InferTypes(this ITypeInferenceService service, SemanticModel semanticModel, SyntaxNode expression, CancellationToken cancellationToken) 18public static ImmutableArray<ITypeSymbol> InferTypes(this ITypeInferenceService service, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 21public static ImmutableArray<TypeInferenceInfo> GetTypeInferenceInfo(this ITypeInferenceService service, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 24public static ImmutableArray<TypeInferenceInfo> GetTypeInferenceInfo(this ITypeInferenceService service, SemanticModel semanticModel, SyntaxNode expression, CancellationToken cancellationToken) 29SemanticModel semanticModel, 39SemanticModel semanticModel, 47private static INamedTypeSymbol? GetFirstDelegateType(SemanticModel semanticModel, ImmutableArray<ITypeSymbol> types) 55SemanticModel semanticModel, 67SemanticModel semanticModel, 85SemanticModel semanticModel, 97SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (13)
30Func<SemanticModel, TType, TNode, bool> canReplace, 31Func<SemanticModel, SyntaxNode, TType, TNode, SyntaxNode> updateRoot, 53Func<SemanticModel, TType, TNode, bool> canReplace, 54Func<SemanticModel, SyntaxNode, TType, TNode, SyntaxNode> updateRoot, 75Func<SemanticModel, TNode, bool> canReplace, 76Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot, 97Func<SemanticModel, TType, TNode, bool> canReplace, 98Func<SemanticModel, SyntaxNode, TType, TNode, SyntaxNode> updateRoot, 119Func<SemanticModel, TNode, bool> canReplace, 120Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot, 155Func<SemanticModel, TType, TNode, bool> canReplace, 156Func<SemanticModel, SyntaxNode, TType, TNode, SyntaxNode> updateRoot, 172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (4)
318SemanticModel semanticModel, 369SemanticModel semanticModel, 431SemanticModel semanticModel, 441this SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, string identifierName)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
67SemanticModel semanticModel, 459SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (7)
39SemanticModel semanticModel, 49SemanticModel semanticModel, 60SemanticModel semanticModel, 144SemanticModel semanticModel, 236SemanticModel semanticModel, 262private static SyntaxNode GetNegationOfIsPatternExpression(SyntaxNode isExpression, SyntaxGenerator generator, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, CancellationToken cancellationToken) 474SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsService.cs (2)
31var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 38var currentModel = await current.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (30)
40SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 48SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 56SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 64SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 72SemanticModel semanticModel, 91protected virtual IEnumerable<ISymbol> GetCollidableSymbols(SemanticModel semanticModel, SyntaxNode location, SyntaxNode container, CancellationToken cancellationToken) 179public bool IsWrittenTo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 182public bool IsOnlyWrittenTo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 185public bool IsInOutContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 188public bool IsInRefContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 191public bool IsInInContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 194public bool CanReplaceWithRValue(SemanticModel semanticModel, SyntaxNode expression, CancellationToken cancellationToken) 197public ISymbol GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 203public bool TryGetSpeculativeSemanticModel(SemanticModel oldSemanticModel, SyntaxNode oldNode, SyntaxNode newNode, out SemanticModel speculativeModel) 206public ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken) 209public ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement) 212public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 215public IMethodSymbol GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 218public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 221public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 227public IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 230public IParameterSymbol FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 233public IParameterSymbol FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 236public ISymbol FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, CancellationToken cancellationToken) 239public ISymbol FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, CancellationToken cancellationToken) 242public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 245public bool IsInsideNameOfExpression(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 251public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol expressionTypeOpt, CancellationToken cancellationToken) 254public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (17)
15bool IsExpressionContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 16bool IsStatementContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 17bool IsTypeContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 18bool IsNamespaceContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 19bool IsNamespaceDeclarationNameContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 20bool IsTypeDeclarationContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 21bool IsMemberDeclarationContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 22bool IsGlobalStatementContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 23bool IsLabelContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 24bool IsAttributeNameContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 27SemanticModel semanticModel, SyntaxNode location, 31SemanticModel semanticModel, SyntaxNode location, 34SyntaxToken GenerateUniqueName(SemanticModel semanticModel, SyntaxNode location, SyntaxNode? container, string baseName, 38SemanticModel semanticModel, SyntaxNode location, 42SemanticModel semanticModel, SyntaxNode location, 47CommonConversion ClassifyConversion(SemanticModel semanticModel, SyntaxNode expression, ITypeSymbol destination); 49IMethodSymbol? TryGetDisposeMethod(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
21protected readonly SemanticModel SemanticModel; 29protected AbstractTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (8)
15protected abstract AbstractTypeInferrer CreateTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken); 18SemanticModel semanticModel, ImmutableArray<ITypeSymbol> result, string nameOpt) 29SemanticModel semanticModel, ImmutableArray<TypeInferenceInfo> result, string nameOpt) 44SemanticModel semanticModel, string name) 82SemanticModel semanticModel, int position, 94SemanticModel semanticModel, SyntaxNode expression, 106SemanticModel semanticModel, int position, 114SemanticModel semanticModel, SyntaxNode expression,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\ITypeInferenceService.cs (4)
29ImmutableArray<ITypeSymbol> InferTypes(SemanticModel semanticModel, SyntaxNode expression, string nameOpt, CancellationToken cancellationToken); 30ImmutableArray<ITypeSymbol> InferTypes(SemanticModel semanticModel, int position, string nameOpt, CancellationToken cancellationToken); 32ImmutableArray<TypeInferenceInfo> GetTypeInferenceInfo(SemanticModel semanticModel, int position, string nameOpt, CancellationToken cancellationToken); 33ImmutableArray<TypeInferenceInfo> GetTypeInferenceInfo(SemanticModel semanticModel, SyntaxNode expression, string nameOpt, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractReducer.IExpressionRewriter.cs (1)
18SyntaxNodeOrToken VisitNodeOrToken(SyntaxNodeOrToken nodeOrTokenToReduce, SemanticModel semanticModel, bool simplifyAllDescendants);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (9)
40protected abstract SemanticModel GetSpeculativeSemanticModel(ref SyntaxNode nodeToSpeculate, SemanticModel originalSemanticModel, SyntaxNode originalNode); 50public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 51public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 70var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 187var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 213var semanticModelForReduce = semanticModel; 313var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 334protected abstract void GetUnusedNamespaceImports(SemanticModel model, HashSet<SyntaxNode> namespaceImports, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (2)
18SemanticModel semanticModel, 26SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
64public static ISymbol? GetOriginalSymbolInfo(SemanticModel semanticModel, SyntaxNode expression) 100public static bool IsNamespaceOrTypeOrThisParameter(SyntaxNode expression, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\Simplifiers\AbstractMemberAccessExpressionSimplifier.cs (2)
24SemanticModel semanticModel, TMemberAccessExpressionSyntax memberAccessExpression, CancellationToken cancellationToken); 34SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\Simplifiers\AbstractSimplifier.cs (1)
18SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (3)
12internal sealed class SemanticDocument(Document document, SourceText text, SyntaxNode root, SemanticModel semanticModel) 15public readonly SemanticModel SemanticModel = semanticModel; 21var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\WorkspaceServices\SemanticModelReuse\ISemanticModelReuseWorkspaceService.cs (1)
21ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
Microsoft.CodeAnalysis.CSharp (158)
Compilation\CSharpCompilation.cs (6)
797var model = GetSemanticModel(tree); 2480public new SemanticModel GetSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility) 2489public new SemanticModel GetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options) 2501SemanticModel? model = null; 2512internal override SemanticModel CreateSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options) 3921protected override SemanticModel CommonGetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options)
Compilation\CSharpSemanticModel.cs (21)
2507/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2509public bool TryGetSpeculativeSemanticModelForMethodBody(int position, BaseMethodDeclarationSyntax method, out SemanticModel speculativeModel) 2534/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2536public bool TryGetSpeculativeSemanticModelForMethodBody(int position, AccessorDeclarationSyntax accessor, out SemanticModel speculativeModel) 2563/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2565public bool TryGetSpeculativeSemanticModel(int position, TypeSyntax type, out SemanticModel speculativeModel, SpeculativeBindingOption bindingOption = SpeculativeBindingOption.BindAsExpression) 2589/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2591public bool TryGetSpeculativeSemanticModel(int position, StatementSyntax statement, out SemanticModel speculativeModel) 2616/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2618public bool TryGetSpeculativeSemanticModel(int position, EqualsValueClauseSyntax initializer, out SemanticModel speculativeModel) 2643/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2645public bool TryGetSpeculativeSemanticModel(int position, ArrowExpressionClauseSyntax expressionBody, out SemanticModel speculativeModel) 2673/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2675public bool TryGetSpeculativeSemanticModel(int position, ConstructorInitializerSyntax constructorInitializer, out SemanticModel speculativeModel) 2702/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2704public bool TryGetSpeculativeSemanticModel(int position, PrimaryConstructorBaseTypeSyntax constructorInitializer, out SemanticModel speculativeModel) 2732/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2734public bool TryGetSpeculativeSemanticModel(int position, CrefSyntax crefSyntax, out SemanticModel speculativeModel) 2758/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2760public bool TryGetSpeculativeSemanticModel(int position, AttributeSyntax attribute, out SemanticModel speculativeModel) 4925protected sealed override SemanticModel ParentModelCore
Compilation\MemberSemanticModel.cs (1)
137internal sealed override SemanticModel ContainingPublicModelOrSelf
Compilation\PublicSemanticModel.cs (2)
11/// Instances of this <see cref="SemanticModel"/> can be exposed to external consumers. 51internal sealed override SemanticModel ContainingPublicModelOrSelf => this;
CSharpExtensions.cs (96)
456public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, OrderingSyntax node, CancellationToken cancellationToken = default(CancellationToken)) 472public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken)) 496public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 513public static SymbolInfo GetCollectionInitializerSymbolInfo(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 529public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, ConstructorInitializerSyntax constructorInitializer, CancellationToken cancellationToken = default(CancellationToken)) 545public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, PrimaryConstructorBaseTypeSyntax constructorInitializer, CancellationToken cancellationToken = default(CancellationToken)) 561public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, AttributeSyntax attributeSyntax, CancellationToken cancellationToken = default(CancellationToken)) 577public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, CrefSyntax crefSyntax, CancellationToken cancellationToken = default(CancellationToken)) 595public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption) 613public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, CrefSyntax expression, SpeculativeBindingOption bindingOption) 631public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, AttributeSyntax attribute) 651public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, ConstructorInitializerSyntax constructorInitializer) 672public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, PrimaryConstructorBaseTypeSyntax constructorInitializer) 688public static TypeInfo GetTypeInfo(this SemanticModel? semanticModel, ConstructorInitializerSyntax constructorInitializer, CancellationToken cancellationToken = default(CancellationToken)) 701public static TypeInfo GetTypeInfo(this SemanticModel? semanticModel, SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken)) 717public static TypeInfo GetTypeInfo(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 733public static TypeInfo GetTypeInfo(this SemanticModel? semanticModel, AttributeSyntax attributeSyntax, CancellationToken cancellationToken = default(CancellationToken)) 751public static TypeInfo GetSpeculativeTypeInfo(this SemanticModel? semanticModel, int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption) 764public static Conversion GetConversion(this SemanticModel? semanticModel, SyntaxNode expression, CancellationToken cancellationToken = default(CancellationToken)) 878public static Conversion GetSpeculativeConversion(this SemanticModel? semanticModel, int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption) 891public static ForEachStatementInfo GetForEachStatementInfo(this SemanticModel? semanticModel, ForEachStatementSyntax forEachStatement) 904public static ForEachStatementInfo GetForEachStatementInfo(this SemanticModel? semanticModel, CommonForEachStatementSyntax forEachStatement) 917public static DeconstructionInfo GetDeconstructionInfo(this SemanticModel? semanticModel, AssignmentExpressionSyntax assignment) 922public static DeconstructionInfo GetDeconstructionInfo(this SemanticModel? semanticModel, ForEachVariableStatementSyntax @foreach) 927public static AwaitExpressionInfo GetAwaitExpressionInfo(this SemanticModel? semanticModel, AwaitExpressionSyntax awaitExpression) 940public static ImmutableArray<ISymbol> GetMemberGroup(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 953public static ImmutableArray<ISymbol> GetMemberGroup(this SemanticModel? semanticModel, AttributeSyntax attribute, CancellationToken cancellationToken = default(CancellationToken)) 966public static ImmutableArray<ISymbol> GetMemberGroup(this SemanticModel? semanticModel, ConstructorInitializerSyntax initializer, CancellationToken cancellationToken = default(CancellationToken)) 982public static ImmutableArray<IPropertySymbol> GetIndexerGroup(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 995public static Optional<object> GetConstantValue(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 1011public static QueryClauseInfo GetQueryClauseInfo(this SemanticModel? semanticModel, QueryClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken)) 1028public static IAliasSymbol? GetAliasInfo(this SemanticModel? semanticModel, IdentifierNameSyntax nameSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1038public static IAliasSymbol? GetSpeculativeAliasInfo(this SemanticModel? semanticModel, int position, IdentifierNameSyntax nameSyntax, SpeculativeBindingOption bindingOption) 1047public static ControlFlowAnalysis? AnalyzeControlFlow(this SemanticModel? semanticModel, StatementSyntax firstStatement, StatementSyntax lastStatement) 1056public static ControlFlowAnalysis? AnalyzeControlFlow(this SemanticModel? semanticModel, StatementSyntax statement) 1065public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, ConstructorInitializerSyntax constructorInitializer) 1074public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, PrimaryConstructorBaseTypeSyntax primaryConstructorBaseType) 1083public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, ExpressionSyntax expression) 1092public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, StatementSyntax firstStatement, StatementSyntax lastStatement) 1101public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, StatementSyntax statement) 1112public static bool TryGetSpeculativeSemanticModelForMethodBody([NotNullWhen(true)] this SemanticModel? semanticModel, int position, BaseMethodDeclarationSyntax method, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1131public static bool TryGetSpeculativeSemanticModelForMethodBody([NotNullWhen(true)] this SemanticModel? semanticModel, int position, AccessorDeclarationSyntax accessor, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1150public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, TypeSyntax type, [NotNullWhen(true)] out SemanticModel? speculativeModel, SpeculativeBindingOption bindingOption = SpeculativeBindingOption.BindAsExpression) 1169public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, CrefSyntax crefSyntax, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1188public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, StatementSyntax statement, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1207public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, EqualsValueClauseSyntax initializer, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1226public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, ArrowExpressionClauseSyntax expressionBody, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1247public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, ConstructorInitializerSyntax constructorInitializer, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1268public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, PrimaryConstructorBaseTypeSyntax constructorInitializer, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1287public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, AttributeSyntax attribute, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1306public static Conversion ClassifyConversion(this SemanticModel? semanticModel, ExpressionSyntax expression, ITypeSymbol destination, bool isExplicitInSource = false) 1326public static Conversion ClassifyConversion(this SemanticModel? semanticModel, int position, ExpressionSyntax expression, ITypeSymbol destination, bool isExplicitInSource = false) 1342public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, MemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1351public static IMethodSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, CompilationUnitSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1361public static INamespaceSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, NamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1372public static INamespaceSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, FileScopedNamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1382public static INamedTypeSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, BaseTypeDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1391public static INamedTypeSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, DelegateDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1400public static IFieldSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, EnumMemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1409public static IMethodSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, BaseMethodDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1418public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, BasePropertyDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1427public static IPropertySymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, PropertyDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1436public static IPropertySymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, IndexerDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1445public static IEventSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, EventDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1454public static IPropertySymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, AnonymousObjectMemberDeclaratorSyntax declaratorSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1463public static INamedTypeSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, AnonymousObjectCreationExpressionSyntax declaratorSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1472public static INamedTypeSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, TupleExpressionSyntax declaratorSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1481public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ArgumentSyntax declaratorSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1490public static IMethodSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, AccessorDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1499public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, SingleVariableDesignationSyntax designationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1508public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, VariableDeclaratorSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1517public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, TupleElementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1526public static ILabelSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1535public static ILabelSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1544public static IAliasSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, UsingDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1553public static IAliasSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ExternAliasDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1562public static IParameterSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ParameterSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1571public static ITypeParameterSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, TypeParameterSyntax typeParameter, CancellationToken cancellationToken = default(CancellationToken)) 1581public static ILocalSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ForEachStatementSyntax forEachStatement, CancellationToken cancellationToken = default(CancellationToken)) 1592public static ILocalSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, CatchDeclarationSyntax catchDeclaration, CancellationToken cancellationToken = default(CancellationToken)) 1599public static IRangeVariableSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, QueryClauseSyntax queryClause, CancellationToken cancellationToken = default(CancellationToken)) 1608public static IRangeVariableSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, JoinIntoClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken)) 1617public static IRangeVariableSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, QueryContinuationSyntax node, CancellationToken cancellationToken = default(CancellationToken)) 1627public static IMethodSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, LocalFunctionStatementSyntax node, CancellationToken cancellationToken = default(CancellationToken)) 1636public static IMethodSymbol? GetInterceptorMethod(this SemanticModel? semanticModel, InvocationExpressionSyntax node, CancellationToken cancellationToken = default) 1647public static InterceptableLocation? GetInterceptableLocation(this SemanticModel? semanticModel, InvocationExpressionSyntax node, CancellationToken cancellationToken = default)
Errors\ErrorFacts.cs (1)
577/// <see cref="SemanticModel.GetDiagnostics(Text.TextSpan?, System.Threading.CancellationToken)"/> API.
Operations\CSharpOperationFactory.cs (2)
20private readonly SemanticModel _semanticModel; 22public CSharpOperationFactory(SemanticModel semanticModel)
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (4)
23SemanticModel model, 35SemanticModel model, 57SemanticModel model, 361SemanticModel model,
SymbolDisplay\SymbolDisplay.cs (10)
61SemanticModel? semanticModelOpt, 93SemanticModel semanticModel, 105SemanticModel semanticModel, 115SemanticModel semanticModel, 184SemanticModel semanticModel, 197SemanticModel semanticModel, 208SemanticModel semanticModel, 220SemanticModel? semanticModelOpt, 230SemanticModel? semanticModelOpt, 245SemanticModel? semanticModelOpt,
SymbolDisplay\SymbolDisplayVisitor.cs (3)
33SemanticModel? semanticModelOpt, 44SemanticModel? semanticModelOpt, 58protected new void Initialize(ArrayBuilder<SymbolDisplayPart> builder, SymbolDisplayFormat format, bool isFirstSymbolVisited, SemanticModel? semanticModelOpt, int positionOpt, bool inNamespaceOrType)
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
180SemanticModel semanticModel;
Symbols\PublicModel\PreprocessingSymbol.cs (2)
88string ISymbol.ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat? format) 93ImmutableArray<SymbolDisplayPart> ISymbol.ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat? format)
Symbols\PublicModel\Symbol.cs (3)
174string ISymbol.ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format) 179ImmutableArray<SymbolDisplayPart> ISymbol.ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format) 184internal static CSharpSemanticModel GetCSharpSemanticModel(SemanticModel semanticModel)
Symbols\PublicModel\TypeSymbol.cs (2)
157string ITypeSymbol.ToMinimalDisplayString(SemanticModel semanticModel, CodeAnalysis.NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format) 162ImmutableArray<SymbolDisplayPart> ITypeSymbol.ToMinimalDisplayParts(SemanticModel semanticModel, CodeAnalysis.NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format)
Symbols\Symbol.cs (2)
1467SemanticModel semanticModel, 1475SemanticModel semanticModel,
Symbols\TypeSymbol.cs (2)
674SemanticModel semanticModel, 683SemanticModel semanticModel,
Microsoft.CodeAnalysis.CSharp.CodeStyle (255)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
45SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
59var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (2)
33SemanticModel semanticModel, 82private (VariableDeclaratorSyntax, ISymbol)? TryGetVariableDeclaratorAndSymbol(SemanticModel semanticModel)
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
27SemanticModel semanticModel, CommonForEachStatementSyntax node)
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (3)
131var semanticModel = context.SemanticModel; 283SemanticModel semanticModel, 361SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
295var semanticModel = syntaxContext.SemanticModel;
src\Analyzers\CSharp\Analyzers\MakeFieldReadonly\CSharpMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
21protected override bool IsWrittenTo(SemanticModel semanticModel, ThisExpressionSyntax expression, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
50var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticHelper.cs (3)
17private static bool TryGetDataFlowAnalysis(LocalFunctionStatementSyntax localFunction, SemanticModel semanticModel, [NotNullWhen(returnValue: true)] out DataFlowAnalysis? dataFlow) 38public static bool CanMakeLocalFunctionStaticBecauseNoCaptures(LocalFunctionStatementSyntax localFunction, SemanticModel semanticModel) 43public static bool CanMakeLocalFunctionStaticByRefactoringCaptures(LocalFunctionStatementSyntax localFunction, SemanticModel semanticModel, out ImmutableArray<ISymbol> captures)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
221var semanticModel = blockOperation.SemanticModel; 264SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
48var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryCast\CSharpRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
26protected override bool IsUnnecessaryCast(SemanticModel model, ExpressionSyntax cast, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
50var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (3)
63var semanticModel = context.SemanticModel; 241SemanticModel semanticModel1, 243SemanticModel semanticModel2,
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
324private SyntaxTreeState GetOrCreateSyntaxTreeState(SyntaxTree tree, bool defaultCompleted, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (2)
18SemanticModel semanticModel, 23private readonly SemanticModel _semanticModel = semanticModel;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryParentheses\CSharpRemoveUnnecessaryExpressionParenthesesDiagnosticAnalyzer.cs (2)
29SemanticModel semanticModel, CancellationToken cancellationToken, 38ParenthesizedExpressionSyntax parenthesizedExpression, SemanticModel semanticModel, CancellationToken cancellationToken,
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryParentheses\CSharpRemoveUnnecessaryPatternParenthesesDiagnosticAnalyzer.cs (1)
29SemanticModel semanticModel, CancellationToken cancellationToken,
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
45var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\SimplifyBooleanExpression\CSharpSimplifyConditionalDiagnosticAnalyzer.cs (1)
25protected override CommonConversion GetConversion(SemanticModel semanticModel, ExpressionSyntax node, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (3)
68SemanticModel semanticModel, 223SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken) 257SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCoalesceExpression\CSharpUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
27protected override bool IsTargetTyped(SemanticModel semanticModel, ConditionalExpressionSyntax conditional, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseCoalesceExpression\CSharpUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
25protected override bool IsTargetTyped(SemanticModel semanticModel, ConditionalExpressionSyntax conditional, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseCoalesceExpression\UseCoalesceExpressionHelpers.cs (1)
12public static bool IsTargetTyped(SemanticModel semanticModel, ConditionalExpressionSyntax conditional, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (4)
37var semanticModel = context.SemanticModel; 62SemanticModel semanticModel, 119SemanticModel semanticModel, 140var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (2)
39var semanticModel = context.SemanticModel; 102SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (1)
33var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
29var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
82var semanticModel = context.SemanticModel; 168var semanticModel = state.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (3)
43var semanticModel = context.SemanticModel; 85var semanticModel = context.SemanticModel; 124SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (7)
47SemanticModel semanticModel, 65SemanticModel semanticModel, 357SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 601private static bool IsInTargetTypedLocation(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 819SemanticModel semanticModel, 940SemanticModel semanticModel, 1106SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerDiagnosticAnalyzer.cs (1)
43protected override bool CanUseCollectionExpression(SemanticModel semanticModel, BaseObjectCreationExpressionSyntax objectCreationExpression, INamedTypeSymbol? expressionType, bool allowSemanticsChange, CancellationToken cancellationToken, out bool changesSemantics)
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (3)
57var semanticModel = context.SemanticModel; 123var semanticModel = context.SemanticModel; 178SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (6)
90SemanticModel semanticModel, 120SemanticModel semanticModel, 135SemanticModel semanticModel, 202SemanticModel semanticModel, INamedTypeSymbol tupleType, 247SemanticModel semanticModel, SyntaxNode searchScope, ILocalSymbol local, 288SemanticModel semanticModel, SyntaxNode container, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (1)
56protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, AccessorDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConstructorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConstructorDeclarationSyntax declaration) => false;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConversionOperatorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConversionOperatorDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (2)
64protected override IndexerDeclarationSyntax WithGenerateBody(SemanticModel semanticModel, IndexerDeclarationSyntax declaration) 67protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, IndexerDeclarationSyntax declaration) => true;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
54SemanticModel semanticModel, LocalFunctionStatementSyntax statement)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
54SemanticModel semanticModel, MethodDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForOperatorsHelper.cs (1)
52protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, OperatorDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForPropertiesHelper.cs (2)
64protected override PropertyDeclarationSyntax WithGenerateBody(SemanticModel semanticModel, PropertyDeclarationSyntax declaration) 67protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, PropertyDeclarationSyntax declaration) => true;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper.cs (1)
31public abstract SyntaxNode Update(SemanticModel semanticModel, SyntaxNode declaration, bool useExpressionBody, CancellationToken cancellationToken);
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (5)
78public sealed override SyntaxNode Update(SemanticModel semanticModel, SyntaxNode declaration, bool useExpressionBody, CancellationToken cancellationToken) 229public TDeclaration Update(SemanticModel semanticModel, TDeclaration declaration, bool useExpressionBody, CancellationToken cancellationToken) 260protected abstract bool CreateReturnStatementForExpression(SemanticModel semanticModel, TDeclaration declaration); 268protected virtual TDeclaration WithGenerateBody(SemanticModel semanticModel, TDeclaration declaration) 283protected TDeclaration WithAccessorList(SemanticModel semanticModel, TDeclaration declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
71SemanticModel semanticModel, CodeStyleOption2<ExpressionBodyPreference> option,
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
21SemanticModel semanticModel, ExpressionBodyPreference preference,
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (2)
40var semanticModel = context.SemanticModel; 68SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
44var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
198var semanticModel = instance.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
84var semanticModel = operation.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (2)
53var semanticModel = context.SemanticModel; 70SemanticModel semanticModel, ExpressionSyntax left, ExpressionSyntax right)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
88var semanticModel = operation.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
86var semanticModel = syntaxContext.SemanticModel; 237SemanticModel semanticModel, INamedTypeSymbol? expressionTypeOpt, ISymbol local, BlockSyntax block, 391SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
59var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
62if (operation.SemanticModel.TryGetSpeculativeSemanticModel(typeSyntax.SpanStart, dummyStatement, out var speculativeModel))
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
73var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
63var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (3)
18private readonly SemanticModel _semanticModel; 27SemanticModel semanticModel, 52SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
86var semanticModel = syntaxContext.SemanticModel; 278SemanticModel semanticModel, 326SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
111var semanticModel = syntaxContext.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
72var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (4)
389var semanticModel = compilation.GetSemanticModel(primaryConstructorDeclaration.SyntaxTree); 407SemanticModel semanticModel, 464SemanticModel semanticModel, 546var semanticModel = operation.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (4)
84var semanticModel = context.SemanticModel; 130SemanticModel semanticModel, BlockSyntax parentBlock, 156SemanticModel semanticModel, 206SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
108var semanticModel = syntaxContext.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
86var semanticModel = context.Operation.SemanticModel;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (2)
32SemanticModel semanticModel, 118SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
41SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
24SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DefaultExpressionSyntaxExtensions.cs (3)
22SemanticModel semanticModel, 38DefaultExpressionSyntax defaultExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 83DefaultExpressionSyntax defaultExpression, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (4)
321SemanticModel semanticModel, 424[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 454[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 465this ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (3)
21this ParenthesizedExpressionSyntax node, SemanticModel semanticModel, CancellationToken cancellationToken) 301SemanticModel semanticModel, CancellationToken cancellationToken) 368ParenthesizedExpressionSyntax node, ExpressionSyntax parentExpression, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (16)
23this SemanticModel semanticModel, 40this SemanticModel semanticModel, 103this SemanticModel semanticModel, 128public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token) 161public static ISet<INamespaceSymbol> GetUsingNamespacesInScope(this SemanticModel semanticModel, SyntaxNode location) 184this SemanticModel semanticModel, 319this SemanticModel semanticModel, 353this SemanticModel semanticModel, ExpressionSyntax expression, 426SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 456public static INamedTypeSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, BaseTypeDeclarationSyntax syntax, CancellationToken cancellationToken) 462public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ConstructorDeclarationSyntax syntax, CancellationToken cancellationToken) 468public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, LocalFunctionStatementSyntax syntax, CancellationToken cancellationToken) 474public static IParameterSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ParameterSyntax syntax, CancellationToken cancellationToken) 480public static IPropertySymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, PropertyDeclarationSyntax syntax, CancellationToken cancellationToken) 486public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, VariableDeclaratorSyntax syntax, CancellationToken cancellationToken) 492public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SingleVariableDesignationSyntax syntax, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
786SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
26public static bool IsTypeInferred(this TypeSyntax typeSyntax, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\VariableDeclaratorExtensions.cs (1)
23public static bool IsTypeInferred(this VariableDeclaratorSyntax variable, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Helpers\RemoveUnnecessaryImports\CSharpUnnecessaryImportsProvider.cs (1)
24SemanticModel model,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (29)
40public bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 43public bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 46public bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 49public bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 52public bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 55public bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken) 58public ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 111SemanticModel oldSemanticModel, 114[NotNullWhen(true)] out SemanticModel? speculativeModel) 118var model = oldSemanticModel; 128public ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken) 169public ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement) 187public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 190public IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 201public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 213public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 251SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 268public IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 271public IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 275public ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 278public ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 283public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken) 296static ImmutableArray<ISymbol> GetCallingConventionSymbols(SemanticModel model, FunctionPointerUnmanagedCallingConventionSyntax syntax) 305/// cref="ModelExtensions.GetSymbolInfo(SemanticModel, SyntaxNode, CancellationToken)"/>, but sometimes employs 309private static ImmutableArray<ISymbol> GetSymbolInfo(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 378public bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 386var semanticModel = compilation.GetSemanticModel(syntaxReference.SyntaxTree); 402public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken) 405public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (34)
45public static bool IsUnnecessaryCast(ExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 53public static bool IsUnnecessaryAsCast(BinaryExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 60public static bool IsUnnecessaryCast(CastExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 114SemanticModel semanticModel, 146SemanticModel semanticModel, 171SemanticModel originalSemanticModel, CancellationToken cancellationToken) 242SemanticModel originalSemanticModel, IDelegateCreationOperation originalDelegateCreationOperation, 282SemanticModel originalSemanticModel, IConversionOperation originalConversionOperation, 569SemanticModel originalSemanticModel, 633ExpressionSyntax castNode, ExpressionSyntax castedExpressionNode, SemanticModel semanticModel, CancellationToken cancellationToken) 720ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, 787ExpressionSyntax castNode, SemanticModel originalSemanticModel, 788ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, CancellationToken cancellationToken) 868SemanticModel semanticModel, 944SemanticModel semanticModel, 1003SemanticModel semanticModel, CancellationToken cancellationToken) 1070private static bool IsFieldOrArrayElement(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 1077ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 1091SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1144SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1178SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel) 1209SemanticModel originalSemanticModel, 1210SemanticModel rewrittenSemanticModel, 1318SemanticModel originalSemanticModel, 1319SemanticModel rewrittenSemanticModel, 1358SemanticModel semanticModel, 1396MemberAccessExpressionSyntax memberAccessExpression, SemanticModel semanticModel, 1452SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1474private static (SemanticModel? rewrittenSemanticModel, ExpressionSyntax? rewrittenExpression) GetSemanticModelWithCastRemoved( 1477SemanticModel originalSemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (17)
58SemanticModel semanticModel, 104protected override void ValidateSpeculativeSemanticModel(SemanticModel speculativeSemanticModel, SyntaxNode nodeToSpeculate) 113protected override SemanticModel CreateSpeculativeSemanticModel(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel) 116public static SemanticModel CreateSpeculativeSemanticModelForNode(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel) 123public static SemanticModel CreateSpeculativeSemanticModelForNode(SyntaxNode nodeToSpeculate, SemanticModel semanticModel, int position, bool isInNamespaceOrTypeContext) 134SemanticModel speculativeModel; 654protected override bool IsForEachTypeInferred(CommonForEachStatementSyntax forEachStatement, SemanticModel semanticModel) 813protected override bool ConversionsAreCompatible(SemanticModel originalModel, ExpressionSyntax originalExpression, SemanticModel newModel, ExpressionSyntax newExpression) 877protected override bool ForEachConversionsAreCompatible(SemanticModel originalModel, CommonForEachStatementSyntax originalForEach, SemanticModel newModel, CommonForEachStatementSyntax newForEach) 886SemanticModel model, 934protected override Conversion ClassifyConversion(SemanticModel model, ExpressionSyntax expression, ITypeSymbol targetType) 937protected override Conversion ClassifyConversion(SemanticModel model, ITypeSymbol originalType, ITypeSymbol targetType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (8)
19private readonly SemanticModel _semanticModel; 38public TypeStyleResult(CSharpTypeStyleHelper helper, TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, bool isStylePreferred, NotificationOption2 notificationOption, CancellationToken cancellationToken) : this() 59TypeSyntax typeName, SemanticModel semanticModel, 77TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken); 80SyntaxToken identifier, TypeSyntax typeName, ExpressionSyntax initializer, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken); 82internal TypeSyntax? FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 115protected virtual bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 118protected virtual bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.State.cs (4)
31SyntaxNode declaration, SemanticModel semanticModel, 65private static bool IsTypeApparentInDeclaration(VariableDeclarationSyntax variableDeclaration, SemanticModel semanticModel, UseVarPreference stylePreferences, CancellationToken cancellationToken) 92private static bool IsPredefinedTypeInDeclaration(SyntaxNode declarationStatement, SemanticModel semanticModel) 131private static bool IsInferredPredefinedType(SyntaxNode declarationStatement, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (4)
54protected override bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 67TypeSyntax typeName, SemanticModel semanticModel, 118protected override bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken) 141SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (8)
30TypeSyntax typeName, SemanticModel semanticModel, 60protected override bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 92TypeSyntax typeName, SemanticModel semanticModel, 172SemanticModel semanticModel, 202var newSemanticModel = semanticModel.Compilation.ReplaceSyntaxTree(tree, newTree).GetSemanticModel(newTree); 211private static bool IsSafeToSwitchToVarWithoutNeedingSpeculation(DeclarationExpressionSyntax declarationExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 274SemanticModel semanticModel, 346protected override bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (140)
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\ArgumentFixer.cs (1)
29protected override SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, ArgumentListSyntax newArgumentList)
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\AttributeArgumentFixer.cs (1)
29protected override SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, AttributeArgumentListSyntax newArgumentList)
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\CSharpAddExplicitCastCodeFixProvider.cs (2)
52SemanticModel semanticModel, 90SemanticModel semanticModel, ExpressionSyntax targetNode, ITypeSymbol conversionType)
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
46SemanticModel? semanticModel = null;
src\Analyzers\CSharp\CodeFixes\AddParameter\CSharpAddParameterCodeFixProvider.cs (2)
46protected override ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken) 50SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (3)
24private readonly SemanticModel _semanticModel; 30private Rewriter(SemanticModel semanticModel, bool isAllThrowStatements, CancellationToken cancellationToken) 39SemanticModel model,
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (3)
33SemanticModel semanticModel, 45SemanticModel semanticModel, 62SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
38SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\ConvertTypeOfToNameOf\CSharpConvertTypeOfToNameOfCodeFixProvider.cs (1)
26protected override SyntaxNode GetSymbolTypeExpression(SemanticModel model, MemberAccessExpressionSyntax node, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (1)
51SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken,
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
154private static ITypeSymbol? InferTupleType(TupleExpressionSyntax tuple, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\ForEachCast\CSharpForEachCastCodeFixProvider.cs (1)
21SemanticModel semanticModel, CommonForEachStatementSyntax forEachStatement)
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (4)
176protected override string GenerateNameForExpression(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 179protected override ITypeSymbol GetArgumentType(SemanticModel semanticModel, Argument argument, CancellationToken cancellationToken) 185protected override IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 188protected override IMethodSymbol GetDelegatedConstructor(SemanticModel semanticModel, IMethodSymbol constructor, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
64var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (2)
48protected override bool AreSpecialOptionsActive(SemanticModel semanticModel) 51protected override bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (3)
34protected override bool AreSpecialOptionsActive(SemanticModel semanticModel) 37protected override bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel) 40public override ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (3)
41protected override bool AreSpecialOptionsActive(SemanticModel semanticModel) 44protected override bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel) 152SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
42Document document, SemanticModel model, SyntaxNode node, CancellationToken cancellationToken,
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (4)
96CSharpSimplifierOptions options, SemanticModel semanticModel, 337SemanticModel semanticModel, 397SemanticModel semanticModel, 399out SemanticModel speculativeModel)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (5)
88SemanticModel model, ExpressionSyntax? expression, [NotNullWhen(true)] out ITypeSymbol? returnExpressionType) 102SyntaxNode node, SemanticModel model, CancellationToken cancellationToken, 116private static bool IsCorrectTypeForYieldReturn(ITypeSymbol typeArgument, ITypeSymbol returnExpressionType, ITypeSymbol methodReturnType, SemanticModel model) 150private static bool CanConvertTypes(ITypeSymbol typeArgument, ITypeSymbol returnExpressionType, SemanticModel model) 189private static bool IsCorrectTypeForYieldReturn(ITypeSymbol methodReturnType, SemanticModel model)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (1)
112SemanticModel model,
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (2)
100Document document, SemanticModel model, SyntaxEditor editor, SyntaxNode node, HashSet<TypeSyntax> alreadyHandled, CancellationToken cancellationToken) 112Document document, SemanticModel? model, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryParentheses\CSharpRemoveUnnecessaryParenthesesCodeFixProvider.cs (1)
20protected override bool CanRemoveParentheses(SyntaxNode current, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
92protected override SyntaxNode? TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
78SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UseCoalesceExpression\CSharpUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
23SemanticModel semanticModel, SyntaxNode expressionToCoalesce,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
101SemanticModel semanticModel, ExpressionSyntax expression, INamedTypeSymbol? expressionType)
src\Analyzers\CSharp\CodeFixes\UseDeconstruction\CSharpUseDeconstructionCodeFixProvider.cs (1)
60SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (1)
76SemanticModel semanticModel, SyntaxEditor editor, Diagnostic diagnostic,
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (4)
22internal static LambdaExpressionSyntax Update(SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration, CancellationToken cancellationToken) 26SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration, CancellationToken cancellationToken) 56SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration, ExpressionSyntax expressionBody) 79SemanticModel semanticModel, LambdaExpressionSyntax declaration)
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeFixProvider.cs (1)
60SyntaxEditor editor, SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (2)
146SemanticModel semanticModel, 218private static ITypeSymbol GetConvertedType(SemanticModel semanticModel, SyntaxNode typeSyntax, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
63SemanticModel semanticModel, SyntaxNode currentRoot,
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (2)
55var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 124SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
84SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpUseNotPatternCodeFixProvider.cs (1)
47SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (2)
63SemanticModel? semanticModel, 78SemanticModel? semanticModel,
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
91private static IArrayCreationOperation GetArrayCreationOperation(SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (5)
28protected override INamespaceSymbol? GetExplicitNamespaceSymbol(SyntaxNode node, SemanticModel model) 42SemanticModel model, 52private static INamespaceSymbol? GetExplicitNamespaceSymbol(ExpressionSyntax fullName, ExpressionSyntax namespacePart, SemanticModel model) 79private readonly SemanticModel _model; 100SemanticModel model,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (3)
52SemanticModel semanticModel, 179public static CSharpSyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 183Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContextService.cs (1)
18public SyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
686public static bool IsNumericTypeContext(this SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (9)
617SemanticModel? semanticModel = null) 718this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, SemanticModel? semanticModel = null) 963SemanticModel? semanticModelOpt = null) 1713SemanticModel? semanticModelOpt = null) 1999public static bool IsInstanceContext(this SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken) 2168SemanticModel? semanticModel = null) 2741public static bool IsNameOfContext(this SyntaxTree syntaxTree, int position, SemanticModel? semanticModelOpt = null, CancellationToken cancellationToken = default) 2809SemanticModel semanticModel, 3000public static bool IsEnumTypeMemberAccessContext(this SyntaxTree syntaxTree, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
105SemanticModel semanticModel, 168SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (2)
18SemanticModel semanticModel, 24public static ITypeSymbol DetermineParameterType(ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
113public static async Task<ISymbol?> FindApplicableAliasAsync(this ITypeSymbol type, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (7)
21public static INamespaceSymbol GetDeclaredSymbol(this SemanticModel semanticModel, BaseNamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default) 35this SemanticModel semanticModel, 44this SemanticModel semanticModel, 53this SemanticModel semanticModel, 76this SemanticModel semanticModel, 98this SemanticModel semanticModel, ArgumentSyntax argument, CancellationToken cancellationToken) 111this SemanticModel semanticModel, AttributeArgumentSyntax argument, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
71public static IEnumerable<BaseTypeSyntax> GetAllBaseListTypes(this TypeDeclarationSyntax typeNode, SemanticModel model, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
16public static bool IsPotentialTypeName([NotNullWhen(true)] this TypeSyntax? typeSyntax, SemanticModel? semanticModelOpt, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (13)
40protected override IEnumerable<ISymbol> GetCollidableSymbols(SemanticModel semanticModel, SyntaxNode location, SyntaxNode container, CancellationToken cancellationToken) 73public bool IsExpressionContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 81public bool IsStatementContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 87public bool IsTypeContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 90public bool IsNamespaceContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 93public bool IsNamespaceDeclarationNameContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 96public bool IsTypeDeclarationContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 102public bool IsMemberDeclarationContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 108public bool IsGlobalStatementContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 111public bool IsLabelContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 114public bool IsAttributeNameContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 117public CommonConversion ClassifyConversion(SemanticModel semanticModel, SyntaxNode expression, ITypeSymbol destination) 122public IMethodSymbol? TryGetDisposeMethod(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.cs (1)
27protected override AbstractTypeInferrer CreateTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (23)
30SemanticModel semanticModel, 101var typeInfo = SemanticModel.GetTypeInfo(node, CancellationToken); 102var symbolInfo = SemanticModel.GetSymbolInfo(node, CancellationToken); 192var syntaxTree = SemanticModel.SyntaxTree; 387var info = SemanticModel.GetSymbolInfo(initializer, CancellationToken); 434var info = SemanticModel.GetTypeInfo(creation, CancellationToken); 459var info = SemanticModel.GetSymbolInfo(invocation, CancellationToken); 471SemanticModel.GetMemberGroup(invocation.Expression, CancellationToken) 483var typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken); 542var info = SemanticModel.GetSymbolInfo(attribute, CancellationToken); 550var info = SemanticModel.GetTypeInfo(elementAccess.Expression, CancellationToken); 1205SemanticModel.GetDeclaredSymbol(equalsValue.Parent, CancellationToken) is IParameterSymbol parameter) 1217var typeInfo = SemanticModel.GetTypeInfo(propertyDeclaration.Type); 1295var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(initializerExpression).GetAllSymbols(); 1313var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expressionOpt).GetAllSymbols(); 1404var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expressionOpt).GetAllSymbols(); 1520_ when SemanticModel.GetOperation(pattern, CancellationToken) is IPatternOperation patternOperation => 1537var typeInfo = SemanticModel.GetTypeInfo(recursivePattern); 1810SemanticModel.GetSymbolInfo(identifierName.Identifier).Symbol?.Kind == SymbolKind.Parameter) 2037var currentSemanticModel = SemanticModel; 2162var symbol = SemanticModel.GetDeclaredSymbol(variableDeclarator); 2208var descendantSymbol = SemanticModel.GetSymbolInfo(descendant, CancellationToken).GetAnySymbol(); 2237var symbol = SemanticModel.GetRequiredDeclaredSymbol(designation, CancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (3)
18/// <see cref="IsSymbolAssignedPossiblyNullValue(SemanticModel, IOperation, ISymbol)"/>. Note 22public static bool IsDeclaredSymbolAssignedPossiblyNullValue(SemanticModel semanticModel, SyntaxNode declarationSyntax, CancellationToken cancellationToken) 45public static bool? IsSymbolAssignedPossiblyNullValue(SemanticModel semanticModel, IOperation operation, ISymbol symbol)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (5)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
342var semanticModel = semanticDocument.SemanticModel;
EventHookup\EventHookupSessionManager_EventHookupSession.cs (3)
206private IEventSymbol? GetEventSymbol(SemanticModel semanticModel, SyntaxToken plusEqualsToken, CancellationToken cancellationToken) 218IEventSymbol eventSymbol, SyntaxToken plusEqualsToken, SemanticModel semanticModel, 241private string? GetNameObjectPart(IEventSymbol eventSymbol, SyntaxToken plusEqualsToken, SemanticModel semanticModel, ISyntaxFactsService syntaxFactsService)
GoToBase\CSharpGoToBaseService.cs (1)
40var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (17)
CodeGeneration\SyntaxGeneratorTests.cs (3)
48var semanticModel = await newDocument.GetSemanticModelAsync(); 78var semanticModel = await document.GetSemanticModelAsync(); 86out var speculativeModel));
Semantics\SpeculationAnalyzerTests.cs (1)
544protected override bool ReplacementChangesSemantics(SyntaxNode initialNode, SyntaxNode replacementNode, SemanticModel initialModel)
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (4)
159var model = bindingtuples.Item2; 257var model = comp40.GetSemanticModel(comp40.SyntaxTrees.First()); 347var model = bindingtuples.Item2; 431var model = bindingtuples.Item2;
SymbolKey\SymbolKeyTestBase.cs (8)
54internal static void ResolveAndVerifyTypeSymbol(ExpressionSyntax node, ITypeSymbol sourceSymbol, SemanticModel model, CSharpCompilation sourceComp) 60internal static void ResolveAndVerifySymbol(ExpressionSyntax node, ISymbol sourceSymbol, SemanticModel model, CSharpCompilation sourceComp, SymbolKeyComparison comparison = SymbolKeyComparison.None) 253var model = comp.GetSemanticModel(tree); 283var model = _compilation.GetSemanticModel(declarator.SyntaxTree); 308var model = _compilation.GetSemanticModel(node.SyntaxTree); 348private static void GetLabelSymbols(BlockSyntax body, SemanticModel model, List<ISymbol> list) 370private static void GetAnonymousTypeOrFuncSymbols(BlockSyntax body, SemanticModel model, List<ISymbol> list) 387private static void GetAnonymousExprSymbols(ExpressionSyntax expr, SemanticModel model, List<ISymbol> list)
SymbolKey\SymbolKeyTests.cs (1)
293var semanticModel = bodyCompilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
74var semanticModel = compilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (279)
CodeGen\CodeGenAsyncIteratorTests.cs (2)
8740var model = comp.GetSemanticModel(tree); 8806var model = comp.GetSemanticModel(tree);
CodeGen\CodeGenAsyncMethodBuilderOverrideTests.cs (2)
894var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 946var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false);
CodeGen\CodeGenAwaitForeachTests.cs (8)
935var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 4238var model = comp.GetSemanticModel(tree); 4744var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9106var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9182var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9260var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9321var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9392var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
CodeGen\CodeGenCheckedTests.cs (2)
2914var model = comp.GetSemanticModel(tree); 2946var model = comp.GetSemanticModel(tree);
CodeGen\CodeGenDeconstructTests.cs (86)
94var model = compilation.GetSemanticModel(tree); 254var model = comp.Compilation.GetSemanticModel(tree); 310var model = comp.GetSemanticModel(tree); 1110var model = comp.Compilation.GetSemanticModel(tree); 1365var model = compilation.GetSemanticModel(tree); 1422var model = compilation.GetSemanticModel(tree); 1466var model = comp.GetSemanticModel(tree); 1507var model = comp.GetSemanticModel(tree); 1560var model = comp.GetSemanticModel(tree); 1667var model = compilation.GetSemanticModel(tree); 2286var model = comp.Compilation.GetSemanticModel(tree); 2686var model = compilation.GetSemanticModel(tree); 3128var model = compilation.GetSemanticModel(tree); 3176var model = compilation.GetSemanticModel(tree); 3240var model = compilation.GetSemanticModel(tree); 3278var model = compilation.GetSemanticModel(tree); 3328var model = compilation.GetSemanticModel(tree); 3366var model = compilation.GetSemanticModel(tree); 3441var model = compilation.GetSemanticModel(tree); 3477var model = compilation.GetSemanticModel(tree); 3542var model = compilation.GetSemanticModel(tree); 3562private static void VerifyModelForDeconstructionLocal(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 3567private static void VerifyModelForLocal(SemanticModel model, SingleVariableDesignationSyntax decl, LocalDeclarationKind kind, params IdentifierNameSyntax[] references) 3572private static void VerifyModelForDeconstructionForeach(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 3577private static void VerifyModelForDeconstruction(SemanticModel model, SingleVariableDesignationSyntax decl, LocalDeclarationKind kind, params IdentifierNameSyntax[] references) 3609private static void VerifyModelForDeconstructionField(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 3688var model = compilation.GetSemanticModel(tree); 3733var model = compilation.GetSemanticModel(tree); 3790var model = compilation.GetSemanticModel(tree); 3840var model = compilation.GetSemanticModel(tree); 3886var model = compilation.GetSemanticModel(tree); 3930var model = compilation.GetSemanticModel(tree); 3976var model = compilation.GetSemanticModel(tree); 4025var model = compilation.GetSemanticModel(tree); 4131var model = compilation.GetSemanticModel(tree); 4216var model = compilation.GetSemanticModel(tree); 4327var model = compilation.GetSemanticModel(tree); 4403var model = compilation.GetSemanticModel(tree); 4436var model = compilation.GetSemanticModel(tree); 4590var model = compilation.GetSemanticModel(tree); 5019var model = compilation.GetSemanticModel(tree); 5171var model = compilation.GetSemanticModel(tree); 5308var model = compilation.GetSemanticModel(tree); 5344var model = compilation.GetSemanticModel(tree); 5399var model = comp.GetSemanticModel(tree); 5432var model = comp.GetSemanticModel(tree); 5470var model = comp.GetSemanticModel(tree); 5502var model = comp.GetSemanticModel(tree); 5533var model = comp.GetSemanticModel(tree); 5562var model = comp.GetSemanticModel(tree); 5602var model = comp.GetSemanticModel(tree); 5641var model = comp.GetSemanticModel(tree); 5685var model = comp.GetSemanticModel(tree); 5724var model = comp.GetSemanticModel(tree); 5766var model = comp.GetSemanticModel(tree); 5802var model = comp.GetSemanticModel(tree); 5852var model = comp.GetSemanticModel(tree); 5906var model = comp.GetSemanticModel(tree); 5997var model = comp.GetSemanticModel(tree); 6029var model = comp.GetSemanticModel(tree); 6082var model = comp.GetSemanticModel(tree); 6131var model = comp.GetSemanticModel(tree); 6180var model = comp.GetSemanticModel(tree); 6210var model = comp.GetSemanticModel(tree); 6252var model = comp.GetSemanticModel(tree); 6303var model = comp.GetSemanticModel(tree); 6335var model = comp.GetSemanticModel(tree); 6365var model = comp.GetSemanticModel(tree); 6392var model = comp.GetSemanticModel(tree); 6437var model = compilation.GetSemanticModel(tree); 6560var model = comp.GetSemanticModel(tree); 6858var model = compilation.GetSemanticModel(tree); 6930var model = compilation.GetSemanticModel(tree); 6973var model = comp.GetSemanticModel(tree); 7066var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 7121var model = compilation.GetSemanticModel(tree); 7174var model = compilation.GetSemanticModel(tree); 7229var model = compilation.GetSemanticModel(tree); 7267var model = compilation.GetSemanticModel(tree); 7304var model = compilation.GetSemanticModel(tree); 7352var model = compilation.GetSemanticModel(tree); 7391var model = compilation.GetSemanticModel(tree); 7427var model = compilation.GetSemanticModel(tree); 7504var model = compilation.GetSemanticModel(tree); 7561var model = compilation.GetSemanticModel(tree); 9009var model = comp.GetSemanticModel(tree);
CodeGen\CodeGenExprLambdaTests.cs (2)
1848var model = comp.GetSemanticModel(tree); 1885var model = comp.GetSemanticModel(tree);
CodeGen\CodeGenForEachTests.cs (1)
1757var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
CodeGen\CodeGenFunctionPointersTests.cs (17)
3060var model = comp.GetSemanticModel(syntaxTree); 3112var model = comp.GetSemanticModel(syntaxTree); 3337var model = comp.GetSemanticModel(syntaxTree); 3408var model = comp.GetSemanticModel(syntaxTree); 3455var model = comp.GetSemanticModel(syntaxTree); 3566var model = comp.GetSemanticModel(tree); 3618var model = comp.GetSemanticModel(tree); 3669var model = comp.GetSemanticModel(tree); 3708var model = comp.GetSemanticModel(tree); 4113var model = comp.GetSemanticModel(syntaxTree); 4915var model = comp.GetSemanticModel(syntaxTree); 7413var model = comp.GetSemanticModel(tree); 7515var model = comp.GetSemanticModel(tree); 7571var model = allInCoreLib.GetSemanticModel(tree); 7640var model = allInCoreLib.GetSemanticModel(tree); 7727var model = comp1.GetSemanticModel(tree); 10802var model = comp.GetSemanticModel(tree);
CodeGen\CodeGenLocalFunctionTests.cs (5)
145var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 5746var semanticModel = comp.GetSemanticModel(syntaxTree); 5821var semanticModel = comp.GetSemanticModel(syntaxTree); 5896var semanticModel = comp.GetSemanticModel(syntaxTree); 6161var model = comp.GetSemanticModel(tree);
CodeGen\CodeGenOperators.cs (3)
5407var model = result.Compilation.GetSemanticModel(tree); 5695var model = compilation.GetSemanticModel(tree); 5733var model = compilation.GetSemanticModel(tree);
CodeGen\CodeGenRefLocalTests.cs (3)
4031var model = comp.GetSemanticModel(tree); 4068var model = comp.GetSemanticModel(tree); 4102var model = comp.GetSemanticModel(tree);
CodeGen\CodeGenTupleEqualityTests.cs (36)
359var model = comp.Compilation.GetSemanticModel(tree); 680var model = comp.Compilation.GetSemanticModel(tree); 711var model = comp.Compilation.GetSemanticModel(tree); 768var model = comp.GetSemanticModel(tree); 790var model = comp.GetSemanticModel(tree); 852var model = comp.GetSemanticModel(tree); 900var model = comp.GetSemanticModel(tree); 949var model = comp.GetSemanticModel(tree); 999var model = comp.GetSemanticModel(tree); 1053var model = comp.GetSemanticModel(tree); 1087var model = comp.GetSemanticModel(tree); 1119var model = comp.GetSemanticModel(tree); 1150var model = comp.GetSemanticModel(tree); 1210var model = comp.GetSemanticModel(tree); 1310var model = comp.GetSemanticModel(tree); 1396var model = comp.GetSemanticModel(tree); 1461var model = comp.GetSemanticModel(tree); 1494var model = comp.GetSemanticModel(tree); 1555var model = comp.GetSemanticModel(tree); 1592var model = comp.GetSemanticModel(tree); 1617var model = comp.GetSemanticModel(tree); 1672var model = comp.GetSemanticModel(tree); 1774var model = comp.GetSemanticModel(tree); 1916var model = comp.GetSemanticModel(tree); 2571var model = comp.GetSemanticModel(tree); 2639var model = comp.GetSemanticModel(tree); 3276var model = comp.GetSemanticModel(tree); 3682var model = comp.GetSemanticModel(tree); 3806var model = comp.GetSemanticModel(tree); 3909var model = comp.GetSemanticModel(tree); 4034var model = comp.GetSemanticModel(tree); 4081var model = comp.GetSemanticModel(tree); 4182var model = comp.GetSemanticModel(tree); 4275var model = comp.GetSemanticModel(tree); 5120var model = comp.GetSemanticModel(tree); 5156var model = comp.GetSemanticModel(tree);
CodeGen\CodeGenTupleTest.cs (100)
1608var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 3217var model = compilation.GetSemanticModel(tree); 3250var model = compilation.GetSemanticModel(tree); 3463var model = compilation.GetSemanticModel(tree); 3634var model = compilation.GetSemanticModel(tree); 3685var model = compilation.GetSemanticModel(tree); 3931var model = compilation.GetSemanticModel(tree); 3988var model = compilation.GetSemanticModel(tree); 4021var model = compilation.GetSemanticModel(tree); 4153var model = compilation.GetSemanticModel(tree); 4838var model = comp.GetSemanticModel(tree); 5074var model = comp.GetSemanticModel(tree); 5118var model = comp.GetSemanticModel(tree); 5159var model = comp.GetSemanticModel(tree); 5203var model = comp.GetSemanticModel(tree); 5472var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 7496var model = comp.GetSemanticModel(tree); 7529var model = comp.GetSemanticModel(tree); 7566var model = comp.GetSemanticModel(tree); 7629var model = comp.GetSemanticModel(tree); 8290var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8321var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8376var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8405var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8434var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8482var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8516var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8549var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8578var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8625var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8660var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8689var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8718var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8748var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8803var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8833var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8892var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8939var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9012var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9069var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9141var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9222var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9305var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9853var model = comp.GetSemanticModel(tree); 9904var model = comp.GetSemanticModel(tree); 9946var model = comp.GetSemanticModel(tree); 9992var model = comp.GetSemanticModel(tree); 10058var model = comp.GetSemanticModel(tree); 10097var model = comp.GetSemanticModel(tree); 10131var model = comp.GetSemanticModel(tree); 12691var model = c.GetSemanticModel(tree); 13972var model = c.GetSemanticModel(tree); 14243var model = c.GetSemanticModel(tree); 14431var model = comp.GetSemanticModel(tree); 16538var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 16565var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 16602var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17209var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17270var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17329var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17367var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17400var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17433var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 19061var model = comp.GetSemanticModel(tree); 19100var model = comp.GetSemanticModel(tree); 19139var model = comp.GetSemanticModel(tree); 19178var model = comp.GetSemanticModel(tree); 19228var model = comp.GetSemanticModel(tree); 19290var model = comp.GetSemanticModel(tree); 19393var model = comp.GetSemanticModel(tree); 19424var model = comp.GetSemanticModel(tree); 19478var model = comp.GetSemanticModel(tree); 19536var model = comp.GetSemanticModel(tree); 19659var model = comp.GetSemanticModel(tree); 19703var model = comp.GetSemanticModel(tree); 19734var model = comp.GetSemanticModel(tree); 20356var model = comp.GetSemanticModel(tree); 21349var model = comp.GetSemanticModel(tree); 22854var model = compilation.GetSemanticModel(tree); 24179var model = compilation.GetSemanticModel(tree); 24258var model = comp.GetSemanticModel(tree); 24321var model = comp.GetSemanticModel(tree); 24385var model = comp.GetSemanticModel(tree); 24458var model = comp.GetSemanticModel(tree); 24531var model = comp.GetSemanticModel(tree); 24605var model = comp.GetSemanticModel(tree); 25023var model = comp.GetSemanticModel(tree); 25051var model = comp.GetSemanticModel(tree); 25082var model = comp.GetSemanticModel(tree); 25702var model = comp.GetSemanticModel(tree); 25773var model = comp.GetSemanticModel(tree); 25838var model = comp.GetSemanticModel(tree); 25880var model = comp.GetSemanticModel(tree); 25910var model = comp.GetSemanticModel(tree); 26222var model = comp.GetSemanticModel(tree); 26294var model = comp.GetSemanticModel(tree); 26327var model = comp.GetSemanticModel(tree); 26360var model = comp.GetSemanticModel(tree); 26393var model = comp.GetSemanticModel(tree); 27566var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
CodeGen\ForeachTest.cs (1)
1686var model = comp.GetSemanticModel(tree);
CodeGen\GotoTest.cs (2)
1147var model = CreateCompilationWithMscorlib461(new[] { tree }).GetSemanticModel(tree, ignoreAccessibility: false); 1160var model = CreateCompilationWithMscorlib461(new[] { tree }).GetSemanticModel(tree, ignoreAccessibility: false);
CodeGen\IndexAndRangeTests.cs (3)
28private static (SemanticModel model, List<ElementAccessExpressionSyntax> accesses) GetModelAndAccesses(CSharpCompilation comp) 32var model = comp.GetSemanticModel(syntaxTree); 3859var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
CodeGen\ObjectAndCollectionInitializerTests.cs (2)
1106var model = comp.GetSemanticModel(tree); 3588var model = comp.GetSemanticModel(tree);
CodeGen\PatternTests.cs (3)
5002var model = compilation.GetSemanticModel(tree); 5128var model = compilation.GetSemanticModel(tree); 5277var model = compilation.GetSemanticModel(tree);
Emit\EntryPointTests.cs (1)
1597var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (33)
CodeGen\IndexAndRangeTests.cs (18)
90var model = comp.GetSemanticModel(tree); 331var model = comp.GetSemanticModel(tree); 418var model = comp.GetSemanticModel(tree); 505var model = comp.GetSemanticModel(tree); 623var model = comp.GetSemanticModel(tree); 1572var model = comp.GetSemanticModel(tree); 1807var model = comp.GetSemanticModel(tree); 2262var model = comp.GetSemanticModel(tree); 2677var model = comp.GetSemanticModel(tree); 2840var model = comp.GetSemanticModel(tree); 3018var model = comp.GetSemanticModel(tree); 3132var model = comp.GetSemanticModel(tree); 3303var model = comp.GetSemanticModel(tree); 3454var model = comp.GetSemanticModel(tree); 3640var model = comp.GetSemanticModel(tree); 3730var model = comp.GetSemanticModel(tree); 3816var model = comp.GetSemanticModel(tree); 3889var model = comp.GetSemanticModel(tree);
Emit\NumericIntPtrTests.cs (15)
698var model = comp.GetSemanticModel(tree); 1916var model = comp.GetSemanticModel(tree); 1968var model = comp.GetSemanticModel(tree); 6008var model = comp.GetSemanticModel(tree); 6244var model = comp.GetSemanticModel(tree); 6617var model = comp.GetSemanticModel(tree); 6851var model = comp.GetSemanticModel(tree); 8125var model = comp.GetSemanticModel(tree); 10546var model = comp.GetSemanticModel(tree); 10685var model = comp.GetSemanticModel(tree); 11176var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 11199var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 11227var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 11252var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 11297var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1120)
Attributes\AttributeTests.cs (15)
709var semanticModel = comp.GetSemanticModel(tree); 750var semanticModel = comp.GetSemanticModel(tree); 754Assert.True(semanticModel.TryGetSpeculativeSemanticModel(attrSyntax.ArgumentList.Position, newAttrSyntax, out var speculativeModel)); 815var semanticModel = comp.GetSemanticModel(tree); 819Assert.True(semanticModel.TryGetSpeculativeSemanticModel(interpolationSyntax.Position, newAttrSyntax, out var speculativeModel)); 856var semanticModel = comp.GetSemanticModel(tree); 860Assert.True(semanticModel.TryGetSpeculativeSemanticModel(attrSyntax.ArgumentList.Position, newAttrSyntax, out var speculativeModel)); 897var semanticModel = comp.GetSemanticModel(tree); 901Assert.True(semanticModel.TryGetSpeculativeSemanticModel(attrSyntax.ArgumentList.Position, newAttrSyntax, out var speculativeModel)); 936var semanticModel = comp.GetSemanticModel(tree); 940Assert.True(semanticModel.TryGetSpeculativeSemanticModel(attrSyntax.Position, newAttrSyntax, out var speculativeModel)); 5715var model = cm.GetSemanticModel(cm.SyntaxTrees[0]); 7535var semanticModel = compilation.GetSemanticModel(tree); 7576var semanticModel = compilation.GetSemanticModel(tree); 11635var model = comp.GetSemanticModel(tree);
Attributes\AttributeTests_RefReadOnly.cs (6)
1377var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 1419var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 1448var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 1454Assert.True(model.TryGetSpeculativeSemanticModel(position, localfunction, out var newModel)); 1475var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 1481Assert.True(model.TryGetSpeculativeSemanticModel(position, localfunction, out var newModel));
Attributes\AttributeTests_WellKnownAttributes.cs (7)
5766var model = compilation.GetSemanticModel(tree); 9548var model = comp.GetSemanticModel(tree); 9597var model = comp.GetSemanticModel(tree); 9653var model = comp2.GetSemanticModel(tree); 11397var model = comp.GetSemanticModel(tree); 11422var model = comp.GetSemanticModel(tree); 11453var model = comp.GetSemanticModel(tree);
Diagnostics\DiagnosticAnalyzerTests.cs (13)
3346var semanticModel1 = compilation.GetSemanticModel(tree1); 3603var model = compilation.GetSemanticModel(tree); 3683var semanticModel1 = compilation.GetSemanticModel(tree1); 3750var semanticModel = compilation.GetSemanticModel(tree); 3811var semanticModel = compilation.GetSemanticModel(tree); 4044var model = compilation.GetSemanticModel(tree); 4054private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _cache = new ConcurrentDictionary<SyntaxTree, SemanticModel>(); 4056public override SemanticModel GetSemanticModel(SyntaxTree tree, Compilation compilation, SemanticModelOptions options) 4061public void VerifyCachedModel(SyntaxTree tree, SemanticModel model) 4256var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4311var semanticModel = compilation.GetSemanticModel(tree); 4436var model = compilation.GetSemanticModel(tree);
Diagnostics\DiagnosticSuppressorTests.cs (1)
717var semanticModel = compilation.GetSemanticModel(tree);
Diagnostics\GetDiagnosticsTests.cs (12)
44var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 79var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 94var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 172var model = compilation.GetSemanticModel(tree1); 221var model = compilation.GetSemanticModel(tree1); 273var model = compilation.GetSemanticModel(tree1); 323var model = compilation.GetSemanticModel(tree); 671var model = compilation.GetSemanticModel(tree, true); 724var model = compilation.GetSemanticModel(tree, true); 779var semanticModel = compilation.GetSemanticModel(syntaxTree); 1058var semanticModel = compilation.GetSemanticModel(syntaxTree); 1516var model1 = compilation.GetSemanticModel(tree1);
FieldKeywordTests.cs (3)
1274var model = comp.GetSemanticModel(tree); 1332var model = comp.GetSemanticModel(tree); 9473var model = comp.GetSemanticModel(tree);
FirstClassSpanTests.cs (3)
2729var model = comp.GetSemanticModel(tree); 2762var model = comp.GetSemanticModel(tree); 4907var model = comp.GetSemanticModel(tree);
FlowAnalysis\FlowTestBase.cs (11)
117protected T CompileAndGetModelAndConstructorInitializer<T>(string program, Func<SemanticModel, ConstructorInitializerSyntax, T> analysisDelegate, params MetadataReference[] references) 121var model = comp.GetSemanticModel(tree); 138protected T CompileAndGetModelAndPrimaryConstructorInitializer<T>(string program, Func<SemanticModel, PrimaryConstructorBaseTypeSyntax, T> analysisDelegate, params MetadataReference[] references) 142var model = comp.GetSemanticModel(tree); 159protected T CompileAndGetModelAndExpression<T>(string program, Func<SemanticModel, ExpressionSyntax, T> analysisDelegate, params MetadataReference[] references) 164protected T CompileAndGetModelAndExpression<T>(string program, Func<SemanticModel, ExpressionSyntax, T> analysisDelegate, TargetFramework targetFramework, bool assertNoDiagnostics, params MetadataReference[] references) 174var model = comp.GetSemanticModel(tree); 191protected T CompileAndGetModelAndStatements<T>(string program, Func<SemanticModel, StatementSyntax, StatementSyntax, T> analysisDelegate) 195var model = comp.GetSemanticModel(tree); 264protected IEnumerable<T> CompileAndGetModelAndMultipleExpressions<T>(string program, Func<SemanticModel, ExpressionSyntax, T> analysisDelegate, int treeindex = 0, int which = -1) 275protected IEnumerable<T> CompileAndGetModelAndMultipleStatements<T>(string program, Func<SemanticModel, StatementSyntax, T> analysisDelegate, int treeindex = 0, int which = -1)
FlowAnalysis\FlowTests.cs (1)
5840var model = compilation.GetSemanticModel(tree);
FlowAnalysis\IterationJumpYieldStatementTests.cs (1)
913var semanticModel = comp.GetSemanticModel(tree);
FlowAnalysis\RegionAnalysisTests.cs (18)
3101var semanticModel = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 4524var model = compilation.GetSemanticModel(tree); 5485var model = comp.GetSemanticModel(tree); 5533var model = comp.GetSemanticModel(tree); 5577var model = comp.GetSemanticModel(tree); 5620var model = comp.GetSemanticModel(tree); 6215var model = comp.GetSemanticModel(tree); 6313var model = compilation.GetSemanticModel(tree); 6352var model = compilation.GetSemanticModel(tree); 6379var model = compilation.GetSemanticModel(tree); 6417var model = compilation.GetSemanticModel(tree); 6445var model = compilation.GetSemanticModel(tree); 6480var model = compilation.GetSemanticModel(tree); 7906var model = compilation.GetSemanticModel(tree); 8098var model = compilation.GetSemanticModel(tree); 8126var model = compilation.GetSemanticModel(tree); 14120var model = comp.GetSemanticModel(tree); 14143var model = comp.GetSemanticModel(tree);
OverloadResolutionPriorityTests.cs (8)
442var model = comp.GetSemanticModel(tree); 698var model = comp3.GetSemanticModel(tree); 758var model = comp3.GetSemanticModel(tree); 806var model = comp3.GetSemanticModel(tree); 977var model = comp.GetSemanticModel(tree); 2219var model = comp.GetSemanticModel(tree); 2317var model = comp.GetSemanticModel(tree); 2489var model = comp.GetSemanticModel(tree);
RefReadonlyParameterTests.cs (3)
1524var model = comp.GetSemanticModel(tree); 7101var model = comp.GetSemanticModel(tree); 7129var model = comp.GetSemanticModel(tree);
RefStructInterfacesTests.cs (54)
7574var model = comp.GetSemanticModel(tree); 7764var model = comp.GetSemanticModel(tree); 7983var model = comp.GetSemanticModel(tree); 8174var model = comp.GetSemanticModel(tree); 8367var model = comp.GetSemanticModel(tree); 8442var model = comp.GetSemanticModel(tree); 8646var model = comp.GetSemanticModel(tree); 9017var model = comp.GetSemanticModel(tree); 9221var model = comp.GetSemanticModel(tree); 9385var model = comp.GetSemanticModel(tree); 9585var model = comp.GetSemanticModel(tree); 9809var model = comp.GetSemanticModel(tree); 10018var model = comp.GetSemanticModel(tree); 10245var model = comp.GetSemanticModel(tree); 10348var model = comp.GetSemanticModel(tree); 10443var model = comp.GetSemanticModel(tree); 10628var model = comp.GetSemanticModel(tree); 10825var model = comp.GetSemanticModel(tree); 11065var model = comp.GetSemanticModel(tree); 11293var model = comp.GetSemanticModel(tree); 11505var model = comp.GetSemanticModel(tree); 11605var model = comp.GetSemanticModel(tree); 11700var model = comp.GetSemanticModel(tree); 14257var model = comp.GetSemanticModel(tree); 14598var model = comp.GetSemanticModel(tree); 14964var model = comp.GetSemanticModel(tree); 15308var model = comp.GetSemanticModel(tree); 15656var model = comp.GetSemanticModel(tree); 15733var model = comp.GetSemanticModel(tree); 16094var model = comp.GetSemanticModel(tree); 16759var model = comp.GetSemanticModel(tree); 16824var model = comp.GetSemanticModel(tree); 16889var model = comp.GetSemanticModel(tree); 16973var model = comp.GetSemanticModel(tree); 17061var model = comp.GetSemanticModel(tree); 17154var model = comp.GetSemanticModel(tree); 17251var model = comp.GetSemanticModel(tree); 17335var model = comp.GetSemanticModel(tree); 17761var model = comp.GetSemanticModel(tree); 17958var model = comp.GetSemanticModel(tree); 18181var model = comp.GetSemanticModel(tree); 18378var model = comp.GetSemanticModel(tree); 18579var model = comp.GetSemanticModel(tree); 18653var model = comp.GetSemanticModel(tree); 18863var model = comp.GetSemanticModel(tree); 19198var model = comp.GetSemanticModel(tree); 19369var model = comp.GetSemanticModel(tree); 19526var model = comp.GetSemanticModel(tree); 19694var model = comp.GetSemanticModel(tree); 19862var model = comp.GetSemanticModel(tree); 19967var model = comp.GetSemanticModel(tree); 21236var model = comp2.GetSemanticModel(tree); 21304var model = comp.GetSemanticModel(tree); 21706var model = comp.GetSemanticModel(tree);
Semantics\CollectionExpressionTests.cs (43)
200var model = comp.GetSemanticModel(tree); 235var model = comp.GetSemanticModel(tree); 4812var model = comp.GetSemanticModel(tree); 14299var model = comp.GetSemanticModel(tree); 14375var model = comp.GetSemanticModel(tree); 14448var model = comp.GetSemanticModel(tree); 14510var model = comp.GetSemanticModel(tree); 14634var model = comp.GetSemanticModel(tree); 14717var model = comp.GetSemanticModel(tree); 14806var model = comp.GetSemanticModel(tree); 15145var model = comp.GetSemanticModel(tree); 15162private static void VerifyTypes(SemanticModel model, ExpressionSyntax expr, string expectedType, string expectedConvertedType, ConversionKind expectedConversionKind) 27173SemanticModel IOperation.SemanticModel => throw null; 28692var model = comp.GetSemanticModel(tree); 28736var model = comp.GetSemanticModel(tree); 28782var model = comp.GetSemanticModel(tree); 28826var model = comp.GetSemanticModel(tree); 28869var model = comp.GetSemanticModel(tree); 28912var model = comp.GetSemanticModel(tree); 28951var model = comp.GetSemanticModel(tree); 28984var model = comp.GetSemanticModel(tree); 29018var model = comp.GetSemanticModel(tree); 29071var model = comp.GetSemanticModel(tree); 29137var model = comp.GetSemanticModel(tree); 29198var model = comp.GetSemanticModel(tree); 29274var model = comp.GetSemanticModel(tree); 29317var model = comp.GetSemanticModel(tree); 29364var model = comp.GetSemanticModel(tree); 31563var model = comp.GetSemanticModel(tree); 31611var model = comp.GetSemanticModel(tree); 31669var model = comp.GetSemanticModel(tree); 31767var model = comp.GetSemanticModel(tree); 32383var model = comp.GetSemanticModel(tree); 32419var model = comp.GetSemanticModel(tree); 32450var model = comp.GetSemanticModel(tree); 32478var model = comp.GetSemanticModel(tree); 32520var model = comp.GetSemanticModel(tree); 32565var model = comp.GetSemanticModel(tree); 32628var model = comp.GetSemanticModel(tree); 32724var model = comp.GetSemanticModel(tree); 33119var model = comp.GetSemanticModel(tree); 33547var model = compilation.GetSemanticModel(tree); 33588var model = compilation.GetSemanticModel(tree);
Semantics\InlineArrayTests.cs (16)
2357var model = comp.GetSemanticModel(tree); 2392var model = comp.GetSemanticModel(tree); 2426var model = comp.GetSemanticModel(tree); 2506var model = comp.GetSemanticModel(tree); 6031var model = comp.GetSemanticModel(tree); 6197var model = comp.GetSemanticModel(tree); 8116var model = comp.GetSemanticModel(tree); 8833var model = comp.GetSemanticModel(tree); 9201var model = comp.GetSemanticModel(tree); 10545var model = comp.GetSemanticModel(tree); 11289var model = comp.GetSemanticModel(tree); 15206var model = comp.GetSemanticModel(tree); 16493var model = comp.GetSemanticModel(tree); 18581var model = comp.GetSemanticModel(tree); 18907var model = comp.GetSemanticModel(tree); 19244var model = comp.GetSemanticModel(tree);
Semantics\OutVarTests.cs (470)
57var model = compilation.GetSemanticModel(tree); 101var model = compilation.GetSemanticModel(tree); 217var model = compilation.GetSemanticModel(tree); 270var model = compilation.GetSemanticModel(tree); 333var model = compilation.GetSemanticModel(tree); 908var model = compilation.GetSemanticModel(tree); 919private static void VerifyModelForOutVarWithoutDataFlow(SemanticModel model, DeclarationExpressionSyntax decl, params IdentifierNameSyntax[] references) 924private static void VerifyModelForOutVarWithoutDataFlow(SemanticModel model, DeclarationExpressionSyntax decl, bool isShadowed, params IdentifierNameSyntax[] references) 929private static void VerifyModelForDeclarationVarWithoutDataFlow(SemanticModel model, DeclarationExpressionSyntax decl, params IdentifierNameSyntax[] references) 934internal static void VerifyModelForOutVar(SemanticModel model, DeclarationExpressionSyntax decl, params IdentifierNameSyntax[] references) 939private static void VerifyModelForOutVarInNotExecutableCode(SemanticModel model, DeclarationExpressionSyntax decl, params IdentifierNameSyntax[] references) 945SemanticModel model, 955SemanticModel model, 1004SemanticModel model, 1071private static void AssertTypeFromOperation(SemanticModel model, ITypeSymbol expectedType, DeclarationExpressionSyntax decl) 1088private static void VerifyDataFlow(SemanticModel model, DeclarationExpressionSyntax decl, bool isDelegateCreation, bool isExecutableCode, IdentifierNameSyntax[] references, ISymbol symbol) 1137private static void VerifyModelForOutVarDuplicateInSameScope(SemanticModel model, DeclarationExpressionSyntax decl) 1153private static void VerifyNotInScope(SemanticModel model, IdentifierNameSyntax reference) 1160private static void VerifyNotAnOutField(SemanticModel model, IdentifierNameSyntax reference) 1170internal static void VerifyNotAnOutLocal(SemanticModel model, IdentifierNameSyntax reference) 1405var model = compilation.GetSemanticModel(tree); 1463var model = compilation.GetSemanticModel(tree); 1497var model = compilation.GetSemanticModel(tree); 1532var model = compilation.GetSemanticModel(tree); 1566var model = compilation.GetSemanticModel(tree); 1600var model = compilation.GetSemanticModel(tree); 1640var model = compilation.GetSemanticModel(tree); 1678var model = compilation.GetSemanticModel(tree); 1715var model = compilation.GetSemanticModel(tree); 1751var model = compilation.GetSemanticModel(tree); 1884var model = compilation.GetSemanticModel(tree); 2005var model = compilation.GetSemanticModel(tree); 2115var model = compilation.GetSemanticModel(tree); 2226var model = compilation.GetSemanticModel(tree); 2336var model = compilation.GetSemanticModel(tree); 2638var model = compilation.GetSemanticModel(tree); 2855var model = compilation.GetSemanticModel(tree); 2950var model = compilation.GetSemanticModel(tree); 3202var model = compilation.GetSemanticModel(tree); 3304var model = compilation.GetSemanticModel(tree); 3376var model = compilation.GetSemanticModel(tree); 3428var model = compilation.GetSemanticModel(tree); 3462var model = compilation.GetSemanticModel(tree); 3503var model = compilation.GetSemanticModel(tree); 3644var model = compilation.GetSemanticModel(tree); 3865var model = compilation.GetSemanticModel(tree); 3962var model = compilation.GetSemanticModel(tree); 3998var model = compilation.GetSemanticModel(tree); 4053var model = compilation.GetSemanticModel(tree); 4097var model = compilation.GetSemanticModel(tree); 4148var model = compilation.GetSemanticModel(tree); 4208var model = compilation.GetSemanticModel(tree); 4274var model = compilation.GetSemanticModel(tree); 4497var model = compilation.GetSemanticModel(tree); 4676var model = compilation.GetSemanticModel(tree); 4917var model = compilation.GetSemanticModel(tree); 5019var model = compilation.GetSemanticModel(tree); 5066var model = compilation.GetSemanticModel(tree); 5104var model = compilation.GetSemanticModel(tree); 5181var model = compilation.GetSemanticModel(tree); 5284var model = compilation.GetSemanticModel(tree); 5411var model = compilation.GetSemanticModel(tree); 5513var model = compilation.GetSemanticModel(tree); 5577var model = compilation.GetSemanticModel(tree); 5709var model = compilation.GetSemanticModel(tree); 5749var model = compilation.GetSemanticModel(tree); 5910var model = compilation.GetSemanticModel(tree); 6051var model = compilation.GetSemanticModel(tree); 6328var model = compilation.GetSemanticModel(tree); 6563var model = compilation.GetSemanticModel(tree); 6819var model = compilation.GetSemanticModel(tree); 7065var model = compilation.GetSemanticModel(tree); 7303var model = compilation.GetSemanticModel(tree); 7625var model = compilation.GetSemanticModel(tree); 7774var model = compilation.GetSemanticModel(tree); 7834var model = compilation.GetSemanticModel(tree); 7896var model = compilation.GetSemanticModel(tree); 7962var model = compilation.GetSemanticModel(tree); 8026var model = compilation.GetSemanticModel(tree); 8093var model = compilation.GetSemanticModel(tree); 8155var model = compilation.GetSemanticModel(tree); 8210var model = compilation.GetSemanticModel(tree); 8388var model = compilation.GetSemanticModel(tree); 8488var model = compilation.GetSemanticModel(tree); 8660var model = compilation.GetSemanticModel(tree); 8762var model = compilation.GetSemanticModel(tree); 8798var model = compilation.GetSemanticModel(tree); 8870var model = compilation.GetSemanticModel(tree); 8920var model = compilation.GetSemanticModel(tree); 9162var model = compilation.GetSemanticModel(tree); 9264var model = compilation.GetSemanticModel(tree); 9335var model = compilation.GetSemanticModel(tree); 9428var model = compilation.GetSemanticModel(tree); 9508var model = compilation.GetSemanticModel(tree); 9584var model = compilation.GetSemanticModel(tree); 9637var model = compilation.GetSemanticModel(tree); 9694var model = compilation.GetSemanticModel(tree); 9759var model = compilation.GetSemanticModel(tree); 9816var model = compilation.GetSemanticModel(tree); 9891var model = compilation.GetSemanticModel(tree); 9986var model = compilation.GetSemanticModel(tree); 10068var model = compilation.GetSemanticModel(tree); 10149var model = compilation.GetSemanticModel(tree); 10205var model = compilation.GetSemanticModel(tree); 10261var model = compilation.GetSemanticModel(tree); 10328var model = compilation.GetSemanticModel(tree); 10387var model = compilation.GetSemanticModel(tree); 10459var model = compilation.GetSemanticModel(tree); 10543var model = compilation.GetSemanticModel(tree); 10721var model = compilation.GetSemanticModel(tree); 10818var model = compilation.GetSemanticModel(tree); 10854var model = compilation.GetSemanticModel(tree); 10909var model = compilation.GetSemanticModel(tree); 10959var model = compilation.GetSemanticModel(tree); 11047var model = compilation.GetSemanticModel(tree); 11184var model = compilation.GetSemanticModel(tree); 11266var model = compilation.GetSemanticModel(tree); 11428var model = compilation.GetSemanticModel(tree); 11468var model = compilation.GetSemanticModel(tree); 11716var model = compilation.GetSemanticModel(tree); 11973var model = compilation.GetSemanticModel(tree); 12125var model = compilation.GetSemanticModel(tree); 12275var model = compilation.GetSemanticModel(tree); 12352var model = compilation.GetSemanticModel(tree); 12421var model = compilation.GetSemanticModel(tree); 12497var model = compilation.GetSemanticModel(tree); 12659var model = compilation.GetSemanticModel(tree); 12779var model = compilation.GetSemanticModel(tree); 12866var model = compilation.GetSemanticModel(tree); 12921var model = compilation.GetSemanticModel(tree); 12963var model = compilation.GetSemanticModel(tree); 13018var model = compilation.GetSemanticModel(tree); 13202var model = compilation.GetSemanticModel(tree); 13296var model = compilation.GetSemanticModel(tree); 13334var model = compilation.GetSemanticModel(tree); 13386var model = compilation.GetSemanticModel(tree); 13440var model = compilation.GetSemanticModel(tree); 13606var model = compilation.GetSemanticModel(tree); 13697var model = compilation.GetSemanticModel(tree); 13733var model = compilation.GetSemanticModel(tree); 13797var model = compilation.GetSemanticModel(tree); 13847var model = compilation.GetSemanticModel(tree); 14128var model = compilation.GetSemanticModel(tree); 14257var model = compilation.GetSemanticModel(tree); 14304var model = compilation.GetSemanticModel(tree); 14353var model = compilation.GetSemanticModel(tree); 14395var model = compilation.GetSemanticModel(tree); 14437var model = compilation.GetSemanticModel(tree); 14482var model = compilation.GetSemanticModel(tree); 14524var model = compilation.GetSemanticModel(tree); 14569var model = compilation.GetSemanticModel(tree); 14618var model = compilation.GetSemanticModel(tree); 14672var model = compilation.GetSemanticModel(tree); 14731var model = compilation.GetSemanticModel(tree); 14778var model = compilation.GetSemanticModel(tree); 14828var model = compilation.GetSemanticModel(tree); 14943var model = compilation.GetSemanticModel(tree); 15123var model = compilation.GetSemanticModel(tree); 15216var model = compilation.GetSemanticModel(tree); 15254var model = compilation.GetSemanticModel(tree); 15312var model = compilation.GetSemanticModel(tree); 15370var model = compilation.GetSemanticModel(tree); 15531var model = compilation.GetSemanticModel(tree); 15744var model = compilation.GetSemanticModel(tree); 15957var model = compilation.GetSemanticModel(tree); 16072var model = compilation.GetSemanticModel(tree); 16159var model = compilation.GetSemanticModel(tree); 16400var model = compilation.GetSemanticModel(tree); 16496var model = compilation.GetSemanticModel(tree); 16532var model = compilation.GetSemanticModel(tree); 16589var model = compilation.GetSemanticModel(tree); 16643var model = compilation.GetSemanticModel(tree); 16703var model = compilation.GetSemanticModel(tree); 16763var model = compilation.GetSemanticModel(tree); 16826var model = compilation.GetSemanticModel(tree); 16960var model = compilation.GetSemanticModel(tree); 17052var model = compilation.GetSemanticModel(tree); 17091var model = compilation.GetSemanticModel(tree); 17149var model = compilation.GetSemanticModel(tree); 17203var model = compilation.GetSemanticModel(tree); 17387var model = compilation.GetSemanticModel(tree); 17489var model = compilation.GetSemanticModel(tree); 17527var model = compilation.GetSemanticModel(tree); 17590var model = compilation.GetSemanticModel(tree); 17643var model = compilation.GetSemanticModel(tree); 17678var model = compilation.GetSemanticModel(tree); 17711var model = compilation.GetSemanticModel(tree); 17744var model = compilation.GetSemanticModel(tree); 17783var model = compilation.GetSemanticModel(tree); 17830var model = compilation.GetSemanticModel(tree); 17860var model = compilation.GetSemanticModel(tree); 17891var model = compilation.GetSemanticModel(tree); 17920var model = compilation.GetSemanticModel(tree); 17952var model = compilation.GetSemanticModel(tree); 17994var model = compilation.GetSemanticModel(tree); 18031var model = compilation.GetSemanticModel(tree); 18068var model = compilation.GetSemanticModel(tree); 18103var model = compilation.GetSemanticModel(tree); 18142var model = compilation.GetSemanticModel(tree); 18183var model = compilation.GetSemanticModel(tree); 18226var model = compilation.GetSemanticModel(tree); 18269var model = compilation.GetSemanticModel(tree); 18308var model = compilation.GetSemanticModel(tree); 18349var model = compilation.GetSemanticModel(tree); 18384var model = compilation.GetSemanticModel(tree); 18430var model = compilation.GetSemanticModel(tree); 18494var model = compilation.GetSemanticModel(tree); 18543var model = compilation.GetSemanticModel(tree); 18588var model = compilation.GetSemanticModel(tree); 18640var model = compilation.GetSemanticModel(tree); 18684var model = compilation.GetSemanticModel(tree); 18726var model = compilation.GetSemanticModel(tree); 18780var model = compilation.GetSemanticModel(tree); 18813var model = context.SemanticModel; 18873var model = compilation.GetSemanticModel(tree); 18917var model = compilation.GetSemanticModel(tree); 18959var model = compilation.GetSemanticModel(tree); 19012var model = compilation.GetSemanticModel(tree); 19057var model = compilation.GetSemanticModel(tree); 19100var model = compilation.GetSemanticModel(tree); 19154var model = compilation.GetSemanticModel(tree); 19203var model = compilation.GetSemanticModel(tree); 19250var model = compilation.GetSemanticModel(tree); 19288var model = compilation.GetSemanticModel(tree); 19329var model = compilation.GetSemanticModel(tree); 19363var model = compilation.GetSemanticModel(tree); 19424var model = compilation.GetSemanticModel(tree); 19469var model = compilation.GetSemanticModel(tree); 19507var model = compilation.GetSemanticModel(tree); 19546var model = compilation.GetSemanticModel(tree); 19590var model = compilation.GetSemanticModel(tree); 19659var model = compilation.GetSemanticModel(tree); 19691var model = compilation.GetSemanticModel(tree); 19734var model = compilation.GetSemanticModel(tree); 19768var model = compilation.GetSemanticModel(tree); 19841var model = compilation.GetSemanticModel(tree); 19874var model = compilation.GetSemanticModel(tree); 19907var model = compilation.GetSemanticModel(tree); 19942var model = compilation.GetSemanticModel(tree); 19977var model = compilation.GetSemanticModel(tree); 20015var model = compilation.GetSemanticModel(tree); 20047var model = compilation.GetSemanticModel(tree); 20221var model = compilation.GetSemanticModel(tree); 20249var model = compilation.GetSemanticModel(tree); 20357var model = compilation.GetSemanticModel(tree); 20614var model = compilation.GetSemanticModel(tree); 20657var model = compilation.GetSemanticModel(tree); 20774var model = compilation.GetSemanticModel(tree); 20827var model = compilation.GetSemanticModel(tree); 20918var model = compilation.GetSemanticModel(tree); 21034var model = compilation.GetSemanticModel(tree); 21129var model = compilation.GetSemanticModel(tree); 21233var model = compilation.GetSemanticModel(tree); 21290var model = compilation.GetSemanticModel(tree); 21358var model = compilation.GetSemanticModel(tree); 21408var model = compilation.GetSemanticModel(tree); 21609var model = compilation.GetSemanticModel(tree); 21768var model = compilation.GetSemanticModel(tree); 21964var model = compilation.GetSemanticModel(tree); 22091var model = compilation.GetSemanticModel(tree); 22189var model = compilation.GetSemanticModel(tree); 22377var model = compilation.GetSemanticModel(tree); 22532var model = compilation.GetSemanticModel(tree); 22611var model = compilation.GetSemanticModel(tree); 22648SemanticModel model, 22666private static void VerifyModelNotSupported(SemanticModel model, params IdentifierNameSyntax[] references) 22734var model = compilation.GetSemanticModel(tree); 22816var model = compilation.GetSemanticModel(tree); 22900var model = compilation.GetSemanticModel(tree); 22967var model = compilation.GetSemanticModel(tree); 23006var model = compilation.GetSemanticModel(tree); 23162var model = compilation.GetSemanticModel(tree); 23256var model = compilation.GetSemanticModel(tree); 23346var model = compilation.GetSemanticModel(tree); 23394var model = compilation.GetSemanticModel(tree); 23427var model = compilation.GetSemanticModel(tree); 23478var model = compilation.GetSemanticModel(tree); 23622var model = compilation.GetSemanticModel(tree); 23720var model = compilation.GetSemanticModel(tree); 23818var model = compilation.GetSemanticModel(tree); 23960var model = compilation.GetSemanticModel(tree); 24064var model = compilation.GetSemanticModel(tree); 24159var model = compilation.GetSemanticModel(tree); 24247var model = compilation.GetSemanticModel(tree); 24353var model = compilation.GetSemanticModel(tree); 24446var model = compilation.GetSemanticModel(tree); 24477var model = compilation.GetSemanticModel(tree); 24679var model = compilation.GetSemanticModel(tree); 24938var model = compilation.GetSemanticModel(tree); 25129var model = compilation.GetSemanticModel(tree); 25242var model = compilation.GetSemanticModel(tree); 25341var model = compilation.GetSemanticModel(tree); 25520var model = compilation.GetSemanticModel(tree); 25564var model = compilation.GetSemanticModel(tree); 25645var model = compilation.GetSemanticModel(tree); 25689var model = compilation.GetSemanticModel(tree); 25744var model = compilation.GetSemanticModel(tree); 25825var model = compilation.GetSemanticModel(tree); 25885var model = compilation.GetSemanticModel(tree); 25982var model = compilation.GetSemanticModel(tree); 26039var model = compilation.GetSemanticModel(tree); 26106var model = compilation.GetSemanticModel(tree); 26154var model = compilation.GetSemanticModel(tree); 26235var model = compilation.GetSemanticModel(tree); 26282var model = compilation.GetSemanticModel(tree); 26377var model = compilation.GetSemanticModel(tree); 26425var model = compilation.GetSemanticModel(tree); 26509var model = compilation.GetSemanticModel(tree); 26569var model = compilation.GetSemanticModel(tree); 26653var model = compilation.GetSemanticModel(tree); 26713var model = compilation.GetSemanticModel(tree); 26774var model = compilation.GetSemanticModel(tree); 26844var model = compilation.GetSemanticModel(tree); 26888var model = compilation.GetSemanticModel(tree); 26974var model = compilation.GetSemanticModel(tree); 27019var model = compilation.GetSemanticModel(tree); 27111var model = compilation.GetSemanticModel(tree); 27165var model = compilation.GetSemanticModel(tree); 27264var model = compilation.GetSemanticModel(tree); 27318var model = compilation.GetSemanticModel(tree); 27387var model = compilation.GetSemanticModel(tree); 27464var model = compilation.GetSemanticModel(tree); 27537var model = compilation.GetSemanticModel(tree); 27641var model = compilation.GetSemanticModel(tree); 27714var model = compilation.GetSemanticModel(tree); 27777var model = compilation.GetSemanticModel(tree); 27854var model = compilation.GetSemanticModel(tree); 27927var model = compilation.GetSemanticModel(tree); 28032var model = compilation.GetSemanticModel(tree); 28105var model = compilation.GetSemanticModel(tree); 28178var model = compilation.GetSemanticModel(tree); 28253var model = compilation.GetSemanticModel(tree); 28307var model = compilation.GetSemanticModel(tree); 28404var model = compilation.GetSemanticModel(tree); 28458var model = compilation.GetSemanticModel(tree); 28525var model = compilation.GetSemanticModel(tree); 28573var model = compilation.GetSemanticModel(tree); 28657var model = compilation.GetSemanticModel(tree); 28718var model = compilation.GetSemanticModel(tree); 28825var model = compilation.GetSemanticModel(tree); 28881var model = compilation.GetSemanticModel(tree); 28976var model = compilation.GetSemanticModel(tree); 29032var model = compilation.GetSemanticModel(tree); 29097var model = compilation.GetSemanticModel(tree); 29183var model = compilation.GetSemanticModel(tree); 29250var model = compilation.GetSemanticModel(tree); 29359var model = compilation.GetSemanticModel(tree); 29426var model = compilation.GetSemanticModel(tree); 29499var model = compilation.GetSemanticModel(tree); 29548var model = compilation.GetSemanticModel(tree); 29646var model = compilation.GetSemanticModel(tree); 29722var model = compilation.GetSemanticModel(tree); 29847var model = compilation.GetSemanticModel(tree); 29923var model = compilation.GetSemanticModel(tree); 30001var model = compilation.GetSemanticModel(tree); 30087var model = compilation.GetSemanticModel(tree); 30148var model = compilation.GetSemanticModel(tree); 30259var model = compilation.GetSemanticModel(tree); 30320var model = compilation.GetSemanticModel(tree); 30384var model = compilation.GetSemanticModel(tree); 30439var model = compilation.GetSemanticModel(tree); 30483var model = compilation.GetSemanticModel(tree); 30527var model = compilation.GetSemanticModel(tree); 30568var model = compilation.GetSemanticModel(tree); 30648var model = compilation.GetSemanticModel(tree); 30717var model = compilation.GetSemanticModel(tree); 30819var model = compilation.GetSemanticModel(tree); 30888var model = compilation.GetSemanticModel(tree); 30952var model = compilation.GetSemanticModel(tree); 31007var model = compilation.GetSemanticModel(tree); 31051var model = compilation.GetSemanticModel(tree); 31095var model = compilation.GetSemanticModel(tree); 31179var model = compilation.GetSemanticModel(tree); 31238var model = compilation.GetSemanticModel(tree); 31352var model = compilation.GetSemanticModel(tree); 31411var model = compilation.GetSemanticModel(tree); 31480var model = compilation.GetSemanticModel(tree); 31535var model = compilation.GetSemanticModel(tree); 31579var model = compilation.GetSemanticModel(tree); 31623var model = compilation.GetSemanticModel(tree); 31664var model = compilation.GetSemanticModel(tree); 31718var model = compilation.GetSemanticModel(tree); 31752var model = compilation.GetSemanticModel(tree); 31805var model = compilation.GetSemanticModel(tree); 31845var model = compilation.GetSemanticModel(tree); 31895var model = compilation.GetSemanticModel(tree); 31929var model = compilation.GetSemanticModel(tree); 31985var model = compilation.GetSemanticModel(tree); 32025var model = compilation.GetSemanticModel(tree); 32070var model = compilation.GetSemanticModel(tree); 32114var model = compilation.GetSemanticModel(tree); 32148var model = compilation.GetSemanticModel(tree); 32182var model = compilation.GetSemanticModel(tree); 32222var model = compilation.GetSemanticModel(tree); 32262var model = compilation.GetSemanticModel(tree); 32317var model = compilation.GetSemanticModel(tree); 32386var model = compilation.GetSemanticModel(tree); 32433var model = compilation.GetSemanticModel(tree); 32472var model = compilation.GetSemanticModel(tree); 32499var model = compilation.GetSemanticModel(tree); 32527var model = compilation.GetSemanticModel(tree); 32555var model = compilation.GetSemanticModel(tree); 32581var model = compilation.GetSemanticModel(tree); 32619var model = compilation.GetSemanticModel(tree); 32655var model = compilation.GetSemanticModel(tree); 32662SemanticModel model, 32670SemanticModel model, 32678SemanticModel model, 32899var model = compilation.GetSemanticModel(tree); 32928var model = comp.Compilation.GetSemanticModel(tree); 33013var model = comp.GetSemanticModel(tree); 33082var model = comp.GetSemanticModel(tree); 33127var model = comp.GetSemanticModel(tree); 33191var model = comp.GetSemanticModel(tree); 33457var model = comp.GetSemanticModel(tree); 33498var model = comp.GetSemanticModel(tree); 33561var model = compilation.GetSemanticModel(tree); 33644var model = compilation.GetSemanticModel(tree); 33732var model = compilation.GetSemanticModel(tree); 33830var model = compilation.GetSemanticModel(tree); 33929var model = compilation.GetSemanticModel(tree); 34027var model = compilation.GetSemanticModel(tree); 34100var model = compilation.GetSemanticModel(tree); 34156var model = compilation.GetSemanticModel(tree); 34222var model = compilation.GetSemanticModel(tree); 34349var model = compilation.GetSemanticModel(tree); 34440var model = compilation.GetSemanticModel(tree); 34547var model = compilation.GetSemanticModel(tree); 34668var model = compilation.GetSemanticModel(tree); 34708var model = compilation.GetSemanticModel(tree); 34784var model = compilation.GetSemanticModel(tree); 34839var model = compilation.GetSemanticModel(tree); 34893var model = compilation.GetSemanticModel(tree); 34951var model = compilation.GetSemanticModel(tree); 35001var model = compilation.GetSemanticModel(tree); 35055var model = compilation.GetSemanticModel(tree); 35095var model = compilation.GetSemanticModel(tree); 35129var model = compilation.GetSemanticModel(tree); 35168var model = compilation.GetSemanticModel(tree); 35212var model = compilation.GetSemanticModel(tree); 35243var model = compilation.GetSemanticModel(tree); 35282var model = compilation.GetSemanticModel(tree); 35314var model = compilation.GetSemanticModel(tree); 35350var model = compilation.GetSemanticModel(tree); 35389var model = compilation.GetSemanticModel(tree); 35419var model = compilation.GetSemanticModel(tree); 35456var model = compilation.GetSemanticModel(tree); 35508var model = compilation.GetSemanticModel(tree); 35613var model = comp.GetSemanticModel(tree); 35648var model = comp.GetSemanticModel(tree); 35727var model = compilation.GetSemanticModel(tree); 35769var model = compilation.GetSemanticModel(tree); 35798var model = compilation.GetSemanticModel(tree); 35844var model = compilation.GetSemanticModel(tree); 35932var model = compilation.GetSemanticModel(tree); 36072var model = compilation.GetSemanticModel(tree); 36180var model = compilation.GetSemanticModel(tree); 36273var model = compilation.GetSemanticModel(tree); 36312var model = comp.GetSemanticModel(tree); 36316Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36358var model = comp.GetSemanticModel(tree); 36362Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36398var model = comp.GetSemanticModel(tree); 36402Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36440var model = comp.GetSemanticModel(tree); 36444Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36475var model = comp.GetSemanticModel(tree); 36479Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36513var model = comp.GetSemanticModel(tree); 36517Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel));
Semantics\ParamsCollectionTests.cs (14)
172var model = comp.GetSemanticModel(tree); 221var model = comp.GetSemanticModel(tree); 337var model = comp.GetSemanticModel(tree); 520var model = comp.GetSemanticModel(tree); 665var model = comp.GetSemanticModel(tree); 1409var model = comp.GetSemanticModel(tree); 2533var model = comp.GetSemanticModel(tree); 2669var model = comp.GetSemanticModel(tree); 2755var model = comp.GetSemanticModel(tree); 2953var model = comp.GetSemanticModel(tree); 4338var model = comp2.GetSemanticModel(tree); 5892var model = comp.GetSemanticModel(tree); 5974var model = comp.GetSemanticModel(tree); 9071var model = comp.GetSemanticModel(tree);
Semantics\PatternMatchingTestBase.cs (15)
65protected static void VerifyModelForDeclarationOrVarSimplePattern(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 70protected static void VerifyModelForDeclarationOrVarSimplePatternWithoutDataFlow(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 76SemanticModel model, 131private static void AssertTypeInfo(SemanticModel model, TypeSyntax typeSyntax, ITypeSymbol expectedType) 140protected static void VerifyModelForDeclarationOrVarPatternDuplicateInSameScope(SemanticModel model, SingleVariableDesignationSyntax designation) 166protected static void VerifyModelForDuplicateVariableDeclarationInSameScope(SemanticModel model, VariableDeclaratorSyntax declarator) 178SemanticModel model, 191protected static void VerifyNotAPatternField(SemanticModel model, IdentifierNameSyntax reference) 201protected static void VerifyNotAPatternLocal(SemanticModel model, IdentifierNameSyntax reference) 215protected static void VerifyNotInScope(SemanticModel model, IdentifierNameSyntax reference) 223SemanticModel model, 231SemanticModel model, 239SemanticModel model, 362SemanticModel model, 406protected static void VerifyModelNotSupported(SemanticModel model, params IdentifierNameSyntax[] references)
Semantics\PatternMatchingTests.cs (53)
693var model = compilation.GetSemanticModel(tree); 737var model = compilation.GetSemanticModel(tree); 777var model = compilation.GetSemanticModel(tree); 843var model = compilation.GetSemanticModel(tree); 890var model = compilation.GetSemanticModel(tree); 1152var model = compilation.GetSemanticModel(tree); 1221var model = compilation.GetSemanticModel(tree); 1271var model = compilation.GetSemanticModel(tree); 1315var model = compilation.GetSemanticModel(tree); 1430var model = compilation.GetSemanticModel(tree); 1480var model = compilation.GetSemanticModel(tree); 1537var model = compilation.GetSemanticModel(tree); 1589var model = compilation.GetSemanticModel(tree); 1654var model = compilation.GetSemanticModel(tree); 1731var model = compilation.GetSemanticModel(tree); 1784var model = compilation.GetSemanticModel(tree); 1828var model = compilation.GetSemanticModel(tree); 1882var model = compilation.GetSemanticModel(tree); 1936var model = compilation.GetSemanticModel(tree); 1993var model = compilation.GetSemanticModel(tree); 2031var model = compilation.GetSemanticModel(tree); 2077var model = compilation.GetSemanticModel(tree); 2131var model = compilation.GetSemanticModel(tree); 2179var model = compilation.GetSemanticModel(tree); 2235var model = compilation.GetSemanticModel(tree); 2295var model = compilation.GetSemanticModel(tree); 2353var model = compilation.GetSemanticModel(tree); 2414var model = compilation.GetSemanticModel(tree); 2459var model = compilation.GetSemanticModel(tree); 2498var model = compilation.GetSemanticModel(tree); 2542var model = compilation.GetSemanticModel(tree); 2614var model = compilation.GetSemanticModel(tree); 2662var model = compilation.GetSemanticModel(tree); 2700var model = compilation.GetSemanticModel(tree); 2745var model = compilation.GetSemanticModel(tree); 2789var model = compilation.GetSemanticModel(tree); 2841var model = compilation.GetSemanticModel(tree); 2883var model = compilation.GetSemanticModel(tree); 3038var model = compilation.GetSemanticModel(tree); 3085var model = compilation.GetSemanticModel(tree); 3264var model = compilation.GetSemanticModel(tree); 3443var model1 = compilation.GetSemanticModel(tree); 3456var model2 = compilation.GetSemanticModel(tree); 3478var model = compilation.GetSemanticModel(tree); 4248var model = compilation.GetSemanticModel(tree); 4289var model = compilation.GetSemanticModel(tree); 4790var model = compilation.GetSemanticModel(tree); 4828var model = compilation.GetSemanticModel(tree); 6574var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 11364var model = comp.GetSemanticModel(tree); 11388var model = comp.GetSemanticModel(tree); 11409var model = comp.GetSemanticModel(tree); 11466var model = comp.GetSemanticModel(tree);
Semantics\PatternMatchingTests_Global.cs (123)
77var model = compilation.GetSemanticModel(tree); 121var model = compilation.GetSemanticModel(tree); 199var model = compilation.GetSemanticModel(tree); 243var model = compilation.GetSemanticModel(tree); 293var model = compilation.GetSemanticModel(tree); 369var model = compilation.GetSemanticModel(tree); 429var model = compilation.GetSemanticModel(tree); 521var model = compilation.GetSemanticModel(tree); 578var model = compilation.GetSemanticModel(tree); 640var model = compilation.GetSemanticModel(tree); 682var model = compilation.GetSemanticModel(tree); 758var model = compilation.GetSemanticModel(tree); 805var model = compilation.GetSemanticModel(tree); 895var model = compilation.GetSemanticModel(tree); 943var model = compilation.GetSemanticModel(tree); 1022var model = compilation.GetSemanticModel(tree); 1075var model = compilation.GetSemanticModel(tree); 1154var model = compilation.GetSemanticModel(tree); 1207var model = compilation.GetSemanticModel(tree); 1263var model = compilation.GetSemanticModel(tree); 1328var model = compilation.GetSemanticModel(tree); 1372var model = compilation.GetSemanticModel(tree); 1453var model = compilation.GetSemanticModel(tree); 1498var model = compilation.GetSemanticModel(tree); 1585var model = compilation.GetSemanticModel(tree); 1639var model = compilation.GetSemanticModel(tree); 1733var model = compilation.GetSemanticModel(tree); 1787var model = compilation.GetSemanticModel(tree); 1851var model = compilation.GetSemanticModel(tree); 1925var model = compilation.GetSemanticModel(tree); 1995var model = compilation.GetSemanticModel(tree); 2096var model = compilation.GetSemanticModel(tree); 2166var model = compilation.GetSemanticModel(tree); 2225var model = compilation.GetSemanticModel(tree); 2299var model = compilation.GetSemanticModel(tree); 2369var model = compilation.GetSemanticModel(tree); 2471var model = compilation.GetSemanticModel(tree); 2541var model = compilation.GetSemanticModel(tree); 2610var model = compilation.GetSemanticModel(tree); 2680var model = compilation.GetSemanticModel(tree); 2734var model = compilation.GetSemanticModel(tree); 2826var model = compilation.GetSemanticModel(tree); 2880var model = compilation.GetSemanticModel(tree); 2942var model = compilation.GetSemanticModel(tree); 2988var model = compilation.GetSemanticModel(tree); 3069var model = compilation.GetSemanticModel(tree); 3128var model = compilation.GetSemanticModel(tree); 3228var model = compilation.GetSemanticModel(tree); 3284var model = compilation.GetSemanticModel(tree); 3374var model = compilation.GetSemanticModel(tree); 3430var model = compilation.GetSemanticModel(tree); 3490var model = compilation.GetSemanticModel(tree); 3571var model = compilation.GetSemanticModel(tree); 3638var model = compilation.GetSemanticModel(tree); 3742var model = compilation.GetSemanticModel(tree); 3809var model = compilation.GetSemanticModel(tree); 3873var model = compilation.GetSemanticModel(tree); 3967var model = compilation.GetSemanticModel(tree); 4043var model = compilation.GetSemanticModel(tree); 4165var model = compilation.GetSemanticModel(tree); 4241var model = compilation.GetSemanticModel(tree); 4312var model = compilation.GetSemanticModel(tree); 4393var model = compilation.GetSemanticModel(tree); 4454var model = compilation.GetSemanticModel(tree); 4560var model = compilation.GetSemanticModel(tree); 4621var model = compilation.GetSemanticModel(tree); 4676var model = compilation.GetSemanticModel(tree); 4722var model = compilation.GetSemanticModel(tree); 4761var model = compilation.GetSemanticModel(tree); 4800var model = compilation.GetSemanticModel(tree); 4832var model = compilation.GetSemanticModel(tree); 4907var model = compilation.GetSemanticModel(tree); 4976var model = compilation.GetSemanticModel(tree); 5073var model = compilation.GetSemanticModel(tree); 5142var model = compilation.GetSemanticModel(tree); 5197var model = compilation.GetSemanticModel(tree); 5243var model = compilation.GetSemanticModel(tree); 5282var model = compilation.GetSemanticModel(tree); 5321var model = compilation.GetSemanticModel(tree); 5400var model = compilation.GetSemanticModel(tree); 5476var model = compilation.GetSemanticModel(tree); 5585var model = compilation.GetSemanticModel(tree); 5661var model = compilation.GetSemanticModel(tree); 5726var model = compilation.GetSemanticModel(tree); 5777var model = compilation.GetSemanticModel(tree); 5816var model = compilation.GetSemanticModel(tree); 5855var model = compilation.GetSemanticModel(tree); 5892var model = compilation.GetSemanticModel(tree); 5938var model = compilation.GetSemanticModel(tree); 5976var model = compilation.GetSemanticModel(tree); 6026var model = compilation.GetSemanticModel(tree); 6063var model = compilation.GetSemanticModel(tree); 6110var model = compilation.GetSemanticModel(tree); 6142var model = compilation.GetSemanticModel(tree); 6196var model = compilation.GetSemanticModel(tree); 6234var model = compilation.GetSemanticModel(tree); 6269var model = compilation.GetSemanticModel(tree); 6298var model = compilation.GetSemanticModel(tree); 6320var model = compilation.GetSemanticModel(tree); 6349var model = compilation.GetSemanticModel(tree); 6373var model = compilation.GetSemanticModel(tree); 6396var model = compilation.GetSemanticModel(tree); 6513var model = compilation.GetSemanticModel(tree); 6601var model = compilation.GetSemanticModel(tree); 6685var model = compilation.GetSemanticModel(tree); 6728var model = compilation.GetSemanticModel(tree); 6761var model = compilation.GetSemanticModel(tree); 6803var model = compilation.GetSemanticModel(tree); 6941var model = compilation.GetSemanticModel(tree); 7039var model = compilation.GetSemanticModel(tree); 7131var model = compilation.GetSemanticModel(tree); 7258var model = compilation.GetSemanticModel(tree); 7362var model = compilation.GetSemanticModel(tree); 7451var model = compilation.GetSemanticModel(tree); 7527var model = compilation.GetSemanticModel(tree); 7621var model = compilation.GetSemanticModel(tree); 7708var model = compilation.GetSemanticModel(tree); 7733var model = compilation.GetSemanticModel(tree); 7929var model = compilation.GetSemanticModel(tree); 8188var model = compilation.GetSemanticModel(tree); 8373var model = compilation.GetSemanticModel(tree); 8480var model = compilation.GetSemanticModel(tree); 8579var model = compilation.GetSemanticModel(tree);
Semantics\PatternMatchingTests_ListPatterns.cs (11)
3318var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3644var model = compilation.GetSemanticModel(tree); 3689var model = compilation.GetSemanticModel(tree); 3719var model = compilation.GetSemanticModel(tree); 4084var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4171var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4248var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4362var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4404var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4414var model = compilation.GetSemanticModel(tree); 4555var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false);
Semantics\PatternMatchingTests_Scope.cs (115)
203var model = compilation.GetSemanticModel(tree); 284var model = compilation.GetSemanticModel(tree); 330var model = compilation.GetSemanticModel(tree); 371var model = compilation.GetSemanticModel(tree); 401var model = compilation.GetSemanticModel(tree); 588var model = compilation.GetSemanticModel(tree); 676var model = compilation.GetSemanticModel(tree); 706var model = compilation.GetSemanticModel(tree); 858var model = compilation.GetSemanticModel(tree); 945var model = compilation.GetSemanticModel(tree); 975var model = compilation.GetSemanticModel(tree); 1156var model = compilation.GetSemanticModel(tree); 1249var model = compilation.GetSemanticModel(tree); 1279var model = compilation.GetSemanticModel(tree); 1519var model = compilation.GetSemanticModel(tree); 1819var model = compilation.GetSemanticModel(tree); 2070var model = compilation.GetSemanticModel(tree); 2216var model = compilation.GetSemanticModel(tree); 2352var model = compilation.GetSemanticModel(tree); 2417var model = compilation.GetSemanticModel(tree); 2480var model = compilation.GetSemanticModel(tree); 2550var model = compilation.GetSemanticModel(tree); 2706var model = compilation.GetSemanticModel(tree); 2789var model = compilation.GetSemanticModel(tree); 2985var model = compilation.GetSemanticModel(tree); 3154var model = compilation.GetSemanticModel(tree); 3269var model = compilation.GetSemanticModel(tree); 3358var model = compilation.GetSemanticModel(tree); 3446var model = compilation.GetSemanticModel(tree); 3533var model = compilation.GetSemanticModel(tree); 3609var model = compilation.GetSemanticModel(tree); 3706var model = compilation.GetSemanticModel(tree); 3797var model = compilation.GetSemanticModel(tree); 3887var model = compilation.GetSemanticModel(tree); 3979var model = compilation.GetSemanticModel(tree); 4075var model = compilation.GetSemanticModel(tree); 4221var model = compilation.GetSemanticModel(tree); 4503var model = compilation.GetSemanticModel(tree); 4903var model = compilation.GetSemanticModel(tree); 5212var model = compilation.GetSemanticModel(tree); 5305var model = compilation.GetSemanticModel(tree); 5335var model = compilation.GetSemanticModel(tree); 5500var model = compilation.GetSemanticModel(tree); 5707var model = compilation.GetSemanticModel(tree); 5914var model = compilation.GetSemanticModel(tree); 6023var model = compilation.GetSemanticModel(tree); 6104var model = compilation.GetSemanticModel(tree); 6187var model = compilation.GetSemanticModel(tree); 6274var model = compilation.GetSemanticModel(tree); 6348var model = compilation.GetSemanticModel(tree); 6418var model = compilation.GetSemanticModel(tree); 6465var model = compilation.GetSemanticModel(tree); 6518var model = compilation.GetSemanticModel(tree); 6588var model = compilation.GetSemanticModel(tree); 6677var model = compilation.GetSemanticModel(tree); 6753var model = compilation.GetSemanticModel(tree); 6828var model = compilation.GetSemanticModel(tree); 6878var model = compilation.GetSemanticModel(tree); 6928var model = compilation.GetSemanticModel(tree); 7085var model = compilation.GetSemanticModel(tree); 7175var model = compilation.GetSemanticModel(tree); 7205var model = compilation.GetSemanticModel(tree); 7407var model = compilation.GetSemanticModel(tree); 7498var model = compilation.GetSemanticModel(tree); 7528var model = compilation.GetSemanticModel(tree); 7722var model = compilation.GetSemanticModel(tree); 7951var model = compilation.GetSemanticModel(tree); 8201var model = compilation.GetSemanticModel(tree); 8441var model = compilation.GetSemanticModel(tree); 8673var model = compilation.GetSemanticModel(tree); 8989var model = compilation.GetSemanticModel(tree); 9132var model = compilation.GetSemanticModel(tree); 9304var model = compilation.GetSemanticModel(tree); 9513var model = compilation.GetSemanticModel(tree); 9604var model = compilation.GetSemanticModel(tree); 9634var model = compilation.GetSemanticModel(tree); 9799var model = compilation.GetSemanticModel(tree); 9928var model = compilation.GetSemanticModel(tree); 10076var model = compilation.GetSemanticModel(tree); 10164var model = compilation.GetSemanticModel(tree); 10197var model = compilation.GetSemanticModel(tree); 10366var model = compilation.GetSemanticModel(tree); 10587var model = compilation.GetSemanticModel(tree); 10683var model = compilation.GetSemanticModel(tree); 10713var model = compilation.GetSemanticModel(tree); 11000var model = compilation.GetSemanticModel(tree); 11130var model = compilation.GetSemanticModel(tree); 11178var model = compilation.GetSemanticModel(tree); 11228var model = compilation.GetSemanticModel(tree); 11271var model = compilation.GetSemanticModel(tree); 11314var model = compilation.GetSemanticModel(tree); 11360var model = compilation.GetSemanticModel(tree); 11403var model = compilation.GetSemanticModel(tree); 11805var model = compilation.GetSemanticModel(tree); 11902var model = compilation.GetSemanticModel(tree); 11991var model = compilation.GetSemanticModel(tree); 12089var model = compilation.GetSemanticModel(tree); 12140var model = compilation.GetSemanticModel(tree); 12202var model = compilation.GetSemanticModel(tree); 12246var model = compilation.GetSemanticModel(tree); 12441var model = compilation.GetSemanticModel(tree); 12594var model = compilation.GetSemanticModel(tree); 12784var model = compilation.GetSemanticModel(tree); 12905var model = compilation.GetSemanticModel(tree); 12997var model = compilation.GetSemanticModel(tree); 13179var model = compilation.GetSemanticModel(tree); 13322var model = compilation.GetSemanticModel(tree); 13396var model = compilation.GetSemanticModel(tree); 13484var model = compilation.GetSemanticModel(tree); 13561var model = compilation.GetSemanticModel(tree); 13640var model = compilation.GetSemanticModel(tree); 13707var model = compilation.GetSemanticModel(tree); 13737var model = compilation.GetSemanticModel(tree); 13772var model = comp.GetSemanticModel(tree); 13969var model = compilation.GetSemanticModel(tree);
Semantics\PatternMatchingTests2.cs (9)
722var model = compilation.GetSemanticModel(tree); 729var model = compilation.GetSemanticModel(tree); 2024var gotModel = model.TryGetSpeculativeSemanticModel(returnStatement.Location.SourceSpan.Start, modifiedReturnStatement, out var speculativeModel); 2065var gotModel = model.TryGetSpeculativeSemanticModel(returnStatement.Location.SourceSpan.Start, modifiedReturnStatement, out var speculativeModel); 2158var model = compilation.GetSemanticModel(tree); 2250var model = compilation.GetSemanticModel(tree); 2294var model = compilation.GetSemanticModel(tree); 2340var model = compilation.GetSemanticModel(tree); 2870var model = comp.GetSemanticModel(tree);
Semantics\PatternMatchingTests3.cs (11)
47var model = compilation.GetSemanticModel(tree); 107var model = compilation.GetSemanticModel(tree); 158var model = compilation.GetSemanticModel(tree); 203var model = compilation.GetSemanticModel(tree); 254var model = compilation.GetSemanticModel(tree); 297var model = compilation.GetSemanticModel(tree); 344var model = compilation.GetSemanticModel(tree); 1887var model = compilation.GetSemanticModel(tree); 1935var model = compilation.GetSemanticModel(tree); 4105var model = compilation.GetSemanticModel(tree); 4332var model = compilation.GetSemanticModel(tree);
Semantics\PatternMatchingTests4.cs (2)
1009var model = compilation.GetSemanticModel(tree); 4827var model = comp.GetSemanticModel(tree);
Semantics\PatternMatchingTests5.cs (9)
426var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 563var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 794var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 840var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 894var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 1104var model = compilation.GetSemanticModel(tree); 1184var model = compilation.GetSemanticModel(tree); 1235var model = compilation.GetSemanticModel(tree); 1287var model = compilation.GetSemanticModel(tree);
Semantics\PatternSwitchTests.cs (5)
1514var model = compilation.GetSemanticModel(tree); 1897var model = compilation.GetSemanticModel(tree); 1932var model = compilation.GetSemanticModel(tree); 3251var model = compilation.GetSemanticModel(tree); 3282var model = compilation.GetSemanticModel(tree);
Semantics\PrimaryConstructorTests.cs (36)
419var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 960var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 1002var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 1070var model = comp.GetSemanticModel(tree); 1292var model = comp.GetSemanticModel(tree); 1363var model = comp.GetSemanticModel(tree); 1409var model = comp.GetSemanticModel(tree); 1465var model = comp.GetSemanticModel(tree); 1524var model = comp.GetSemanticModel(tree); 1613var model = comp.GetSemanticModel(tree); 1812var model = comp.GetSemanticModel(tree); 1852var model = comp.GetSemanticModel(tree); 1895var model = comp.GetSemanticModel(tree); 1965var model = comp.GetSemanticModel(tree); 2112var model = comp.GetSemanticModel(tree); 2161SemanticModel speculativeModel; 2294var model = comp.GetSemanticModel(tree); 2423var model = comp.GetSemanticModel(tree); 2471var model = comp.GetSemanticModel(tree); 2639var model = comp.GetSemanticModel(tree); 2677var model = comp.GetSemanticModel(tree); 2714var model = comp.GetSemanticModel(tree); 2750var model = comp.GetSemanticModel(tree); 6094var model = comp.GetSemanticModel(tree); 6831var model = comp.GetSemanticModel(tree); 6857var model = comp.GetSemanticModel(tree); 7793var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8755var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9161var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 19774var model = comp.GetSemanticModel(tree); 20597var semanticModel = comp.GetSemanticModel(tree); 20630var semanticModel = comp.GetSemanticModel(tree); 20674var semanticModel = comp.GetSemanticModel(tree); 20721var semanticModel = comp.GetSemanticModel(tree); 20771var semanticModel = comp.GetSemanticModel(tree); 21628var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
Semantics\RecordTests.cs (32)
281var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 447var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 479var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2488var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8089var model = comp.GetSemanticModel(tree); 8602var model = comp.GetSemanticModel(tree); 8862var model = comp.GetSemanticModel(tree); 21142var model = comp.GetSemanticModel(tree); 21366var model = comp.GetSemanticModel(tree); 21437var model = comp.GetSemanticModel(tree); 21483var model = comp.GetSemanticModel(tree); 21539var model = comp.GetSemanticModel(tree); 21598var model = comp.GetSemanticModel(tree); 21687var model = comp.GetSemanticModel(tree); 21886var model = comp.GetSemanticModel(tree); 21923var model = comp.GetSemanticModel(tree); 21963var model = comp.GetSemanticModel(tree); 21998var model = comp.GetSemanticModel(tree); 22077var model = comp.GetSemanticModel(tree); 22224var model = comp.GetSemanticModel(tree); 22273SemanticModel speculativeModel; 22406var model = comp.GetSemanticModel(tree); 22915var model = comp.GetSemanticModel(tree); 23369var model = comp.GetSemanticModel(tree); 24641var model = comp.GetSemanticModel(tree); 24676var model = comp.GetSemanticModel(tree); 24710var model = comp.GetSemanticModel(tree); 24745var model = comp.GetSemanticModel(tree); 28190var model = comp.GetSemanticModel(tree); 28347var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 30370var model = comp.GetSemanticModel(tree); 30394var model = comp.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (3)
EndToEndTests.cs (3)
490var model = comp.GetSemanticModel(tree); 610var model = comp.GetSemanticModel(tree); 866var model = comp.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Features (451)
AddImport\CSharpAddImportFeatureService.cs (12)
228SemanticModel semanticModel, 236SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 242SemanticModel semanticModel, 289SemanticModel semanticModel, 351var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 417SemanticModel semanticModel, 435SemanticModel semanticModel, 490SemanticModel semanticModel, 511SemanticModel semanticModel, 554SemanticModel semanticModel, 601protected override bool IsViableExtensionMethod(IMethodSymbol method, SyntaxNode expression, SemanticModel semanticModel, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken) 624protected override bool IsAddMethodContext(SyntaxNode node, SemanticModel semanticModel)
ChangeSignature\CSharpChangeSignatureService.cs (1)
581private static bool IsParamsArrayExpanded(SemanticModel semanticModel, SyntaxNode node, SymbolInfo symbolInfo, CancellationToken cancellationToken)
CodeLens\CSharpCodeLensDisplayInfoService.cs (2)
83public string GetDisplayName(SemanticModel semanticModel, SyntaxNode node) 181private static string GetEnclosingScopeString(SyntaxNode node, SemanticModel semanticModel, SymbolDisplayFormat symbolDisplayFormat)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (2)
264private static List<string> GetReservedNames(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 297SemanticModel semanticModel,
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
191var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (2)
24protected abstract TypeSyntax FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken); 25protected abstract TypeStyleResult AnalyzeTypeName(TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken);
CodeRefactorings\UseExplicitOrImplicitType\UseExplicitTypeCodeRefactoringProvider.cs (2)
29protected override TypeSyntax FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 32protected override TypeStyleResult AnalyzeTypeName(TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken)
CodeRefactorings\UseExplicitOrImplicitType\UseImplicitTypeCodeRefactoringProvider.cs (2)
29protected override TypeSyntax FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 32protected override TypeStyleResult AnalyzeTypeName(TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (10)
72private static Func<SyntaxNode, SyntaxNode>? GetReplacementFunc(SyntaxNode? node, SemanticModel model) 94private static Func<SyntaxNode, SyntaxNode>? CombineLogicalAndOperands(BinaryExpressionSyntax logicalAnd, SemanticModel model) 162private static Func<SyntaxNode, SyntaxNode>? CombineWhenClauseCondition(PatternSyntax switchPattern, ExpressionSyntax condition, SemanticModel model) 306SemanticModel model) 330SemanticModel model, 369static (ExpressionSyntax Expression, ExpressionSyntax Constant, bool Flipped)? TryDetermineConstant(BinaryExpressionSyntax node, SemanticModel model) 421SemanticModel model) 478static bool TryGetInnermostReceiver(ExpressionSyntax node, ArrayBuilder<IdentifierNameSyntax> builder, [NotNullWhen(true)] out ExpressionSyntax? receiver, SemanticModel model) 515private static ExpressionSyntax? GetInnermostReceiver(ExpressionSyntax node, ArrayBuilder<IdentifierNameSyntax> builder, SemanticModel model) 519static bool CanConvertToSubpattern(IdentifierNameSyntax name, SemanticModel model)
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (4)
154CompletionContext context, SemanticModel semanticModel, 177CompletionContext context, SemanticModel semanticModel, SyntaxToken token, AttributeSyntax attributeSyntax, ISet<string> existingNamedParameters) 219SemanticModel semanticModel, 235SemanticModel semanticModel,
Completion\CompletionProviders\AwaitCompletionProvider.cs (1)
104protected override ITypeSymbol? GetTypeSymbolOfExpression(SemanticModel semanticModel, SyntaxNode potentialAwaitableExpression, CancellationToken cancellationToken)
Completion\CompletionProviders\CrefCompletionProvider.cs (7)
89protected override async Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync( 165SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 180SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 211QualifiedCrefSyntax parent, SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 237SemanticModel semanticModel, ImmutableArray<ISymbol> symbols, SyntaxToken token, int position, ImmutableArray<KeyValuePair<string, string>> options) 259SemanticModel semanticModel, ISymbol symbol, SyntaxToken token, int position, StringBuilder builder, 276SemanticModel semanticModel,
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
110private static bool IsLambdaExpression(SemanticModel semanticModel, SyntaxTree tree, int position, SyntaxToken token, ITypeInferenceService typeInferrer, CancellationToken cancellationToken)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (18)
97SyntaxToken token, SemanticModel semanticModel, 111SyntaxToken token, SemanticModel semanticModel, 135private static bool IsPossibleOutVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 168SyntaxToken token, SemanticModel semanticModel, 190private static bool IsPropertyDeclaration(SyntaxToken token, SemanticModel semanticModel, 204private static bool IsMethodDeclaration(SyntaxToken token, SemanticModel semanticModel, 220SemanticModel semanticModel, 269SemanticModel semanticModel, 280SemanticModel semanticModel, 309private static bool IsFieldDeclaration(SyntaxToken token, SemanticModel semanticModel, 320private static bool IsIncompleteMemberDeclaration(SyntaxToken token, SemanticModel semanticModel, 331private static bool IsLocalFunctionDeclaration(SyntaxToken token, SemanticModel semanticModel, 342private static bool IsLocalVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 387private static bool IsEmbeddedVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 400private static bool IsForEachVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 432private static bool IsPrimaryConstructorParameter(SyntaxToken token, SemanticModel semanticModel, 452private static bool IsParameterDeclaration(SyntaxToken token, SemanticModel semanticModel, 464private static bool IsPatternMatching(SyntaxToken token, SemanticModel semanticModel,
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (2)
66private ImmutableArray<ImmutableArray<string>> GetBaseNames(SemanticModel semanticModel, NameDeclarationInfo nameInfo) 283var semanticModel = context.SemanticModel;
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (2)
108CompletionContext context, SemanticModel semanticModel, SyntaxToken token, ITypeSymbol type, bool isParams, CancellationToken cancellationToken) 273SemanticModel semanticModel, SyntaxToken token,
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
111var semanticModel = context.SemanticModel;
Completion\CompletionProviders\FunctionPointerUnmanagedCallingConventionCompletionProvider.cs (1)
92private static void AddTypes(HashSet<CompletionItem> completionItems, int contextPosition, SemanticModel semanticModel, CancellationToken cancellationToken)
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (6)
151SemanticModel semanticModel, 168SemanticModel semanticModel, 184SemanticModel semanticModel, 207SemanticModel semanticModel, 230SemanticModel semanticModel, 249SemanticModel semanticModel,
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (2)
108Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 145private static ITypeSymbol? GetInitializedType(SyntaxToken token, Document document, SemanticModel semanticModel, CancellationToken cancellationToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (1)
123CompletionContext context, int position, SemanticModel semanticModel, ImmutableArray<ISymbol> unnamedSymbols, CancellationToken cancellationToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (1)
40private static void AddConversion(CompletionContext context, SemanticModel semanticModel, int position, IMethodSymbol conversion)
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
55public override bool TryDetermineReturnType(SyntaxToken startToken, SemanticModel semanticModel, CancellationToken cancellationToken, out ITypeSymbol? returnType, out SyntaxToken nextToken)
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
140protected override string GetDisplayText(IMethodSymbol method, SemanticModel semanticModel, int position)
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (3)
99static ITypeSymbol? GetMemberAccessType(ITypeSymbol? type, ExpressionSyntax? expression, Document document, SemanticModel semanticModel, int position) 118static ITypeSymbol? GetMemberType(ITypeSymbol? type, string name, Document document, SemanticModel semanticModel, int position) 135static ImmutableArray<ISymbol> GetCandidatePropertiesAndFields(Document document, SemanticModel semanticModel, int position, ITypeSymbol? type)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
167CompletionContext context, SolutionServices services, SemanticModel semanticModel, bool isPreProcessorContext)
Completion\CompletionProviders\SpeculativeTCompletionProvider.cs (1)
111private static int WalkOutOfGenericType(SyntaxTree syntaxTree, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
Completion\CompletionProviders\TupleNameCompletionProvider.cs (1)
50var semanticModel = context.SemanticModel;
Completion\Providers\ContextVariableArgumentProvider.cs (1)
28protected override bool IsInstanceContext(SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken)
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
57SemanticModel model, ForEachInfo foreachInfo, SyntaxEditor editor, CancellationToken cancellationToken)
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (1)
34public override bool CanImplicitlyConvert(SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol targetType)
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (4)
39SemanticModel semanticModel, 211SemanticModel semanticModel, 339SemanticModel semanticModel, 353internal static bool TypeSymbolIsList(ITypeSymbol typeSymbol, SemanticModel semanticModel)
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (3)
45SemanticModel semanticModel, 57private sealed class Converter(SemanticModel semanticModel, ISemanticFactsService semanticFacts, QueryExpressionSyntax source, CancellationToken cancellationToken) 59private readonly SemanticModel _semanticModel = semanticModel;
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (3)
72var semanticModels = new ConcurrentSet<SemanticModel>(); 74var semanticModel = await GetSemanticModelAsync(document).ConfigureAwait(false); 125async ValueTask<SemanticModel> GetSemanticModelAsync(Document document)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (4)
98SemanticModel semanticModel, 154SemanticModel semanticModel, 238SemanticModel semanticModel, 248SemanticModel semanticModel,
Debugging\CSharpProximityExpressionsService.cs (1)
63var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Debugging\DataTipInfoGetter.cs (2)
46var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 79var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\Analyzers\CSharpPreferFrameworkTypeDiagnosticAnalyzer.cs (1)
32protected override bool IsIdentifierNameReplaceableWithFrameworkType(SemanticModel semanticModel, IdentifierNameSyntax node)
Diagnostics\Analyzers\CSharpSimplifyTypeNamesDiagnosticAnalyzer.cs (2)
55var semanticModel = context.SemanticModel; 82SemanticModel model, SyntaxNode node, CSharpSimplifierOptions options,
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (2)
42private readonly SemanticModel _semanticModel; 73public TypeSyntaxSimplifierWalker(CSharpSimplifyTypeNamesDiagnosticAnalyzer analyzer, SemanticModel semanticModel, CSharpSimplifierOptions options, AnalyzerOptions analyzerOptions, TextSpanMutableIntervalTree? ignoredSpans, CancellationToken cancellationToken)
Diagnostics\CSharpAnalyzerDriverService.cs (1)
27SemanticModel model,
DocumentHighlighting\CSharpDocumentHighlightsService.cs (2)
53var semanticModel = (SemanticModel?)null;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (15)
189protected override IEnumerable<SyntaxNode> GetVariableUseSites(IEnumerable<SyntaxNode> roots, ISymbol localOrParameter, SemanticModel model, CancellationToken cancellationToken) 1022protected override ISymbol? GetDeclaredSymbol(SemanticModel model, SyntaxNode declaration, CancellationToken cancellationToken) 1039SemanticModel? oldModel, 1040SemanticModel newModel, 1085SemanticModel? oldModel, 1086SemanticModel newModel, 1394SemanticModel model, 1429private ISymbol? GetParameterContainingMemberOrType(SyntaxNode? node, SyntaxNode? otherNode, SemanticModel? model, IReadOnlyDictionary<SyntaxNode, SyntaxNode> fromOtherMap, CancellationToken cancellationToken) 1494internal override IMethodSymbol GetLambdaExpressionSymbol(SemanticModel model, SyntaxNode lambdaExpression, CancellationToken cancellationToken) 1503internal override bool QueryClauseLambdasTypeEquivalent(SemanticModel oldModel, SyntaxNode oldNode, SemanticModel newModel, SyntaxNode newNode, CancellationToken cancellationToken) 2848SemanticModel oldModel, 2851SemanticModel newModel, 2982SemanticModel oldModel, 2985SemanticModel newModel,
EditAndContinue\DeclarationBody\CopyConstructorDeclarationBody.cs (1)
45public override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EditAndContinue\DeclarationBody\CSharpLambdaBody.cs (1)
35public override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EditAndContinue\DeclarationBody\FieldWithInitializerDeclarationBody.cs (1)
33public override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EditAndContinue\DeclarationBody\OrdinaryInstanceConstructorWithExplicitInitializerDeclarationBody.cs (1)
29public override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EditAndContinue\DeclarationBody\OrdinaryInstanceConstructorWithImplicitInitializerDeclarationBody.cs (1)
26public override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EditAndContinue\DeclarationBody\PrimaryConstructorWithExplicitInitializerDeclarationBody.cs (1)
41public override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EditAndContinue\DeclarationBody\PrimaryConstructorWithImplicitInitializerDeclarationBody.cs (1)
41public override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EditAndContinue\DeclarationBody\PropertyOrIndexerAccessorDeclarationBody.cs (1)
76public sealed override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EditAndContinue\DeclarationBody\TopLevelCodeDeclarationBody.cs (1)
29public override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (3)
39var semanticModel = context.SemanticModel; 112Host.SolutionServices solutionServices, SemanticModel semanticModel, VirtualCharSequence virtualCharsWithoutMarkup, CancellationToken cancellationToken) 120var semanticModeWithTestFile = compilationWithTestFile.GetSemanticModel(testFileTree);
EncapsulateField\CSharpEncapsulateFieldService.cs (2)
86var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 125var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ExternalAccess\Pythia\Api\IPythiaDeclarationNameRecommenderImplmentation.cs (1)
28public SemanticModel SemanticModel => _context.SemanticModel;
ExternalAccess\Pythia\Api\IPythiaSignatureHelpProviderImplementation.cs (1)
14Task<(ImmutableArray<PythiaSignatureHelpItemWrapper> items, int? selectedItemIndex)> GetMethodGroupItemsAndSelectionAsync(ImmutableArray<IMethodSymbol> accessibleMethods, Document document, InvocationExpressionSyntax invocationExpression, SemanticModel semanticModel, SymbolInfo currentSymbol, CancellationToken cancellationToken);
ExternalAccess\Pythia\Api\PythiaSignatureHelpItemWrapper.cs (1)
22SemanticModel semanticModel,
ExternalAccess\Pythia\PythiaSignatureHelpProvider.cs (1)
34SemanticModel semanticModel,
ExtractMethod\CSharpMethodExtractor.Analyzer.cs (2)
39protected override ITypeSymbol GetRangeVariableType(SemanticModel model, IRangeVariableSymbol symbol) 61protected override ITypeSymbol GetSymbolType(SemanticModel semanticModel, ISymbol symbol)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (4)
158var semanticModel = SemanticDocument.SemanticModel; 513var semanticModel = SemanticDocument.SemanticModel; 746var semanticModel = originalDocument.SemanticModel; 788var semanticModel = SemanticDocument.SemanticModel;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
38var semanticModel = SemanticDocument.SemanticModel;
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (2)
23private readonly SemanticModel _semanticModel; 26public PostProcessor(SemanticModel semanticModel, int contextPosition)
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (2)
52var model = SemanticDocument.SemanticModel; 80private static (ITypeSymbol? typeSymbol, bool returnsByRef) GetRegularExpressionType(SemanticModel semanticModel, ExpressionSyntax node)
ExtractMethod\CSharpSelectionResult.StatementResult.cs (1)
68var semanticModel = SemanticDocument.SemanticModel;
ExtractMethod\CSharpSelectionValidator.cs (2)
37var model = SemanticDocument.SemanticModel; 148SemanticModel semanticModel,
ExtractMethod\CSharpSelectionValidator.Validator.cs (2)
15public static bool Check(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 42private static bool CheckExpression(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken)
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (2)
72var semanticModel = document.SemanticModel; 198protected override bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot)
GenerateType\CSharpGenerateTypeService.cs (13)
57SemanticModel semanticModel, 196var semanticModel = document.SemanticModel; 446private static IMethodSymbol GetMethodSymbolIfPresent(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 476SemanticModel semanticModel, 485SemanticModel semanticModel, 494SemanticModel semanticModel, 522SemanticModel semanticModel, IList<ArgumentSyntax> arguments, CancellationToken cancellationToken) 533protected override INamedTypeSymbol DetermineTypeToGenerateIn(SemanticModel semanticModel, SimpleNameSyntax simpleName, CancellationToken cancellationToken) 536protected override Accessibility GetAccessibility(State state, SemanticModel semanticModel, bool intoNamespace, CancellationToken cancellationToken) 561protected override ITypeSymbol DetermineArgumentType(SemanticModel semanticModel, ArgumentSyntax argument, CancellationToken cancellationToken) 571var semanticModel = await selectedDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 785SemanticModel semanticModel, 828SemanticModel semanticModel,
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
28protected override int? GetTargetPositionIfControlFlow(SemanticModel semanticModel, SyntaxToken token)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
88SemanticModel semanticModel, INamedTypeSymbol interfaceType,
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
280var semanticModel = compilation.GetSemanticModel(group.Key);
InitializeParameter\InitializeParameterHelpers.cs (1)
213var semanticModel = compilation.GetSemanticModel(group.Key);
InlineHints\CSharpInlineParameterNameHintsService.cs (3)
31SemanticModel semanticModel, 48SemanticModel semanticModel, 66SemanticModel semanticModel,
InlineHints\CSharpInlineTypeHintsService.cs (1)
27SemanticModel semanticModel,
LanguageServices\CSharpStructuralTypeDisplayService.cs (1)
33INamedTypeSymbol anonymousType, SemanticModel semanticModel, int position)
LanguageServices\CSharpSymbolDisplayService.cs (1)
12protected override AbstractSymbolDescriptionBuilder CreateDescriptionBuilder(SemanticModel semanticModel, int position, SymbolDescriptionOptions options, CancellationToken cancellationToken)
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (2)
21SemanticModel semanticModel, 105protected override ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format)
NavigationBar\CSharpNavigationBarItemService.cs (2)
130private static IEnumerable<INamedTypeSymbol> GetTypesInFile(SemanticModel semanticModel, CancellationToken cancellationToken) 171private static ISymbol? GetType(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken)
Organizing\CSharpOrganizingService.Rewriter.cs (2)
17private sealed class Rewriter(CSharpOrganizingService treeOrganizer, IEnumerable<ISyntaxOrganizer> organizers, SemanticModel semanticModel, CancellationToken cancellationToken) : CSharpSyntaxRewriter 20private readonly SemanticModel _semanticModel = semanticModel;
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
85protected override NullableFlowState GetNullabilityAnalysis(SemanticModel semanticModel, ISymbol symbol, SyntaxNode node, CancellationToken cancellationToken)
Rename\CSharpRenameIssuesService.cs (1)
25SemanticModel semanticModel, ISymbol symbol, SyntaxToken triggerToken, [NotNullWhen(true)] out string? langError)
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (8)
43SemanticModel semanticModel, 64SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods, 117SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods, 235SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods, 243SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods) 283private static TNode ReplaceReferencesToParameterWithValue<TNode>(SemanticModel semanticModel, IParameterSymbol parameter, TNode node) 290private sealed class Rewriter(SemanticModel semanticModel, IParameterSymbol parameter) : CSharpSyntaxRewriter 292private readonly SemanticModel _semanticModel = semanticModel;
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
88SemanticModel semanticModel, VariableDeclaratorSyntax variable,
SignatureHelp\AbstractCSharpSignatureHelpProvider.cs (2)
46SemanticModel semanticModel, 63protected IList<TaggedText> GetAwaitableUsage(IMethodSymbol method, SemanticModel semanticModel, int position)
SignatureHelp\AbstractOrdinaryMethodSignatureHelpProvider.cs (3)
20SemanticModel semanticModel) 29SemanticModel semanticModel, 49SemanticModel semanticModel,
SignatureHelp\AttributeSignatureHelpProvider.cs (3)
132SemanticModel semanticModel, 159SemanticModel semanticModel, 218SemanticModel semanticModel,
SignatureHelp\ConstructorInitializerSignatureHelpProvider.cs (2)
135SemanticModel semanticModel, 154SemanticModel semanticModel,
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (4)
182SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken, 200int position, SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken, 228SemanticModel semanticModel, 247SemanticModel semanticModel)
SignatureHelp\GenericNameSignatureHelpProvider.cs (3)
171SemanticModel semanticModel, 213SemanticModel semanticModel, 227SemanticModel semanticModel,
SignatureHelp\GenericNameSignatureHelpProvider_Method.cs (2)
14SemanticModel semanticModel, 74private static IList<SymbolDisplayPart> GetPostambleParts(IMethodSymbol method, SemanticModel semanticModel, int position)
SignatureHelp\GenericNameSignatureHelpProvider_NamedType.cs (1)
13SemanticModel semanticModel,
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (4)
19InvocationExpressionSyntax invocationExpression, SemanticModel semanticModel, ISymbol within, 39private static IList<SignatureHelpItem> GetDelegateOrFunctionPointerInvokeItems(InvocationExpressionSyntax invocationExpression, IMethodSymbol invokeMethod, SemanticModel semanticModel, IStructuralTypeDisplayService structuralTypeDisplayService, IDocumentationCommentFormattingService documentationCommentFormattingService, out int? selectedItem, CancellationToken cancellationToken) 58private static IList<SymbolDisplayPart> GetDelegateOrFunctionPointerInvokePreambleParts(IMethodSymbol invokeMethod, SemanticModel semanticModel, int position) 80IMethodSymbol invokeMethod, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formattingService, CancellationToken cancellationToken)
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs (2)
24SemanticModel semanticModel, 37SemanticModel semanticModel,
SignatureHelp\LightweightOverloadResolution.cs (1)
21SemanticModel semanticModel,
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider_DelegateType.cs (3)
18SemanticModel semanticModel, 36private static IList<SymbolDisplayPart> GetDelegateTypePreambleParts(IMethodSymbol invokeMethod, SemanticModel semanticModel, int position) 46private static IList<SignatureHelpSymbolParameter> GetDelegateTypeParameters(IMethodSymbol invokeMethod, SemanticModel semanticModel, int position)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider_NormalType.cs (2)
21SemanticModel semanticModel, 41SemanticModel semanticModel,
SignatureHelp\PrimaryConstructorBaseTypeSignatureHelpProvider.cs (2)
123SemanticModel semanticModel, 141SemanticModel semanticModel,
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (4)
125private IEnumerable<INamedTypeSymbol>? FindNearestTupleConstructionWithInferrableType(SyntaxNode root, SemanticModel semanticModel, int position, SignatureHelpTriggerInfo triggerInfo, 151SyntaxNode targetExpression, SemanticModel semanticModel, IEnumerable<INamedTypeSymbol> tupleTypes, CancellationToken cancellationToken) 166ImmutableArray<TaggedText> separatorParts, SemanticModel semanticModel, int position) 179private static IEnumerable<SignatureHelpParameter> ConvertTupleMembers(INamedTypeSymbol tupleType, SemanticModel semanticModel, int position)
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
47var semanticModel = syntaxContext.SemanticModel;
Snippets\AbstractCSharpMainMethodSnippetProvider.cs (1)
20var semanticModel = context.SemanticModel;
Snippets\CSharpConsoleSnippetProvider.cs (1)
27var semanticModel = context.SemanticModel;
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
60var semanticModel = syntaxContext.SemanticModel;
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
45SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
59var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (2)
33SemanticModel semanticModel, 82private (VariableDeclaratorSyntax, ISymbol)? TryGetVariableDeclaratorAndSymbol(SemanticModel semanticModel)
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
27SemanticModel semanticModel, CommonForEachStatementSyntax node)
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (3)
131var semanticModel = context.SemanticModel; 283SemanticModel semanticModel, 361SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
295var semanticModel = syntaxContext.SemanticModel;
src\Analyzers\CSharp\Analyzers\MakeFieldReadonly\CSharpMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
21protected override bool IsWrittenTo(SemanticModel semanticModel, ThisExpressionSyntax expression, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
50var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticHelper.cs (3)
17private static bool TryGetDataFlowAnalysis(LocalFunctionStatementSyntax localFunction, SemanticModel semanticModel, [NotNullWhen(returnValue: true)] out DataFlowAnalysis? dataFlow) 38public static bool CanMakeLocalFunctionStaticBecauseNoCaptures(LocalFunctionStatementSyntax localFunction, SemanticModel semanticModel) 43public static bool CanMakeLocalFunctionStaticByRefactoringCaptures(LocalFunctionStatementSyntax localFunction, SemanticModel semanticModel, out ImmutableArray<ISymbol> captures)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
221var semanticModel = blockOperation.SemanticModel; 264SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
48var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryCast\CSharpRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
26protected override bool IsUnnecessaryCast(SemanticModel model, ExpressionSyntax cast, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
50var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (4)
63var semanticModel = context.SemanticModel; 208var rewrittenSemanticModel = analyzer.SpeculativeSemanticModel; 241SemanticModel semanticModel1, 243SemanticModel semanticModel2,
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
324private SyntaxTreeState GetOrCreateSyntaxTreeState(SyntaxTree tree, bool defaultCompleted, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (2)
18SemanticModel semanticModel, 23private readonly SemanticModel _semanticModel = semanticModel;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryParentheses\CSharpRemoveUnnecessaryExpressionParenthesesDiagnosticAnalyzer.cs (2)
29SemanticModel semanticModel, CancellationToken cancellationToken, 38ParenthesizedExpressionSyntax parenthesizedExpression, SemanticModel semanticModel, CancellationToken cancellationToken,
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryParentheses\CSharpRemoveUnnecessaryPatternParenthesesDiagnosticAnalyzer.cs (1)
29SemanticModel semanticModel, CancellationToken cancellationToken,
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
45var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\SimplifyBooleanExpression\CSharpSimplifyConditionalDiagnosticAnalyzer.cs (1)
25protected override CommonConversion GetConversion(SemanticModel semanticModel, ExpressionSyntax node, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (3)
68SemanticModel semanticModel, 223SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken) 257SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCoalesceExpression\CSharpUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
27protected override bool IsTargetTyped(SemanticModel semanticModel, ConditionalExpressionSyntax conditional, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseCoalesceExpression\CSharpUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
25protected override bool IsTargetTyped(SemanticModel semanticModel, ConditionalExpressionSyntax conditional, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseCoalesceExpression\UseCoalesceExpressionHelpers.cs (1)
12public static bool IsTargetTyped(SemanticModel semanticModel, ConditionalExpressionSyntax conditional, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (4)
37var semanticModel = context.SemanticModel; 62SemanticModel semanticModel, 119SemanticModel semanticModel, 140var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (2)
39var semanticModel = context.SemanticModel; 102SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (1)
33var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
29var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
82var semanticModel = context.SemanticModel; 168var semanticModel = state.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (3)
43var semanticModel = context.SemanticModel; 85var semanticModel = context.SemanticModel; 124SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (7)
47SemanticModel semanticModel, 65SemanticModel semanticModel, 357SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 601private static bool IsInTargetTypedLocation(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 819SemanticModel semanticModel, 940SemanticModel semanticModel, 1106SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerDiagnosticAnalyzer.cs (1)
43protected override bool CanUseCollectionExpression(SemanticModel semanticModel, BaseObjectCreationExpressionSyntax objectCreationExpression, INamedTypeSymbol? expressionType, bool allowSemanticsChange, CancellationToken cancellationToken, out bool changesSemantics)
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (3)
57var semanticModel = context.SemanticModel; 123var semanticModel = context.SemanticModel; 178SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (6)
90SemanticModel semanticModel, 120SemanticModel semanticModel, 135SemanticModel semanticModel, 202SemanticModel semanticModel, INamedTypeSymbol tupleType, 247SemanticModel semanticModel, SyntaxNode searchScope, ILocalSymbol local, 288SemanticModel semanticModel, SyntaxNode container, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (1)
56protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, AccessorDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConstructorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConstructorDeclarationSyntax declaration) => false;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConversionOperatorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConversionOperatorDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (2)
64protected override IndexerDeclarationSyntax WithGenerateBody(SemanticModel semanticModel, IndexerDeclarationSyntax declaration) 67protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, IndexerDeclarationSyntax declaration) => true;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
54SemanticModel semanticModel, LocalFunctionStatementSyntax statement)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
54SemanticModel semanticModel, MethodDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForOperatorsHelper.cs (1)
52protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, OperatorDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForPropertiesHelper.cs (2)
64protected override PropertyDeclarationSyntax WithGenerateBody(SemanticModel semanticModel, PropertyDeclarationSyntax declaration) 67protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, PropertyDeclarationSyntax declaration) => true;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper.cs (1)
31public abstract SyntaxNode Update(SemanticModel semanticModel, SyntaxNode declaration, bool useExpressionBody, CancellationToken cancellationToken);
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (5)
78public sealed override SyntaxNode Update(SemanticModel semanticModel, SyntaxNode declaration, bool useExpressionBody, CancellationToken cancellationToken) 229public TDeclaration Update(SemanticModel semanticModel, TDeclaration declaration, bool useExpressionBody, CancellationToken cancellationToken) 260protected abstract bool CreateReturnStatementForExpression(SemanticModel semanticModel, TDeclaration declaration); 268protected virtual TDeclaration WithGenerateBody(SemanticModel semanticModel, TDeclaration declaration) 283protected TDeclaration WithAccessorList(SemanticModel semanticModel, TDeclaration declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
71SemanticModel semanticModel, CodeStyleOption2<ExpressionBodyPreference> option,
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
21SemanticModel semanticModel, ExpressionBodyPreference preference,
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (2)
40var semanticModel = context.SemanticModel; 68SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
44var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
198var semanticModel = instance.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
84var semanticModel = operation.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (2)
53var semanticModel = context.SemanticModel; 70SemanticModel semanticModel, ExpressionSyntax left, ExpressionSyntax right)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
88var semanticModel = operation.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
86var semanticModel = syntaxContext.SemanticModel; 237SemanticModel semanticModel, INamedTypeSymbol? expressionTypeOpt, ISymbol local, BlockSyntax block, 391SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
59var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
62if (operation.SemanticModel.TryGetSpeculativeSemanticModel(typeSyntax.SpanStart, dummyStatement, out var speculativeModel))
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
73var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
63var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (3)
18private readonly SemanticModel _semanticModel; 27SemanticModel semanticModel, 52SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
86var semanticModel = syntaxContext.SemanticModel; 278SemanticModel semanticModel, 326SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
111var semanticModel = syntaxContext.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
72var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (4)
389var semanticModel = compilation.GetSemanticModel(primaryConstructorDeclaration.SyntaxTree); 407SemanticModel semanticModel, 464SemanticModel semanticModel, 546var semanticModel = operation.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (4)
84var semanticModel = context.SemanticModel; 130SemanticModel semanticModel, BlockSyntax parentBlock, 156SemanticModel semanticModel, 206SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
108var semanticModel = syntaxContext.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
86var semanticModel = context.Operation.SemanticModel;
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\ArgumentFixer.cs (1)
29protected override SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, ArgumentListSyntax newArgumentList)
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\AttributeArgumentFixer.cs (1)
29protected override SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, AttributeArgumentListSyntax newArgumentList)
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\CSharpAddExplicitCastCodeFixProvider.cs (2)
52SemanticModel semanticModel, 90SemanticModel semanticModel, ExpressionSyntax targetNode, ITypeSymbol conversionType)
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
46SemanticModel? semanticModel = null;
src\Analyzers\CSharp\CodeFixes\AddParameter\CSharpAddParameterCodeFixProvider.cs (2)
46protected override ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken) 50SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (3)
24private readonly SemanticModel _semanticModel; 30private Rewriter(SemanticModel semanticModel, bool isAllThrowStatements, CancellationToken cancellationToken) 39SemanticModel model,
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (3)
33SemanticModel semanticModel, 45SemanticModel semanticModel, 62SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
38SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\ConvertTypeOfToNameOf\CSharpConvertTypeOfToNameOfCodeFixProvider.cs (1)
26protected override SyntaxNode GetSymbolTypeExpression(SemanticModel model, MemberAccessExpressionSyntax node, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (1)
51SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken,
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
154private static ITypeSymbol? InferTupleType(TupleExpressionSyntax tuple, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\ForEachCast\CSharpForEachCastCodeFixProvider.cs (1)
21SemanticModel semanticModel, CommonForEachStatementSyntax forEachStatement)
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (5)
58var semanticModel = document.SemanticModel; 176protected override string GenerateNameForExpression(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 179protected override ITypeSymbol GetArgumentType(SemanticModel semanticModel, Argument argument, CancellationToken cancellationToken) 185protected override IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 188protected override IMethodSymbol GetDelegatedConstructor(SemanticModel semanticModel, IMethodSymbol constructor, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
64var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (2)
48protected override bool AreSpecialOptionsActive(SemanticModel semanticModel) 51protected override bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (3)
34protected override bool AreSpecialOptionsActive(SemanticModel semanticModel) 37protected override bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel) 40public override ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (4)
41protected override bool AreSpecialOptionsActive(SemanticModel semanticModel) 44protected override bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel) 62var semanticModel = document.SemanticModel; 152SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
42Document document, SemanticModel model, SyntaxNode node, CancellationToken cancellationToken,
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (4)
96CSharpSimplifierOptions options, SemanticModel semanticModel, 337SemanticModel semanticModel, 397SemanticModel semanticModel, 399out SemanticModel speculativeModel)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (5)
88SemanticModel model, ExpressionSyntax? expression, [NotNullWhen(true)] out ITypeSymbol? returnExpressionType) 102SyntaxNode node, SemanticModel model, CancellationToken cancellationToken, 116private static bool IsCorrectTypeForYieldReturn(ITypeSymbol typeArgument, ITypeSymbol returnExpressionType, ITypeSymbol methodReturnType, SemanticModel model) 150private static bool CanConvertTypes(ITypeSymbol typeArgument, ITypeSymbol returnExpressionType, SemanticModel model) 189private static bool IsCorrectTypeForYieldReturn(ITypeSymbol methodReturnType, SemanticModel model)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (1)
112SemanticModel model,
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (2)
100Document document, SemanticModel model, SyntaxEditor editor, SyntaxNode node, HashSet<TypeSyntax> alreadyHandled, CancellationToken cancellationToken) 112Document document, SemanticModel? model, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryParentheses\CSharpRemoveUnnecessaryParenthesesCodeFixProvider.cs (1)
20protected override bool CanRemoveParentheses(SyntaxNode current, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
92protected override SyntaxNode? TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
78SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UseCoalesceExpression\CSharpUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
23SemanticModel semanticModel, SyntaxNode expressionToCoalesce,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
101SemanticModel semanticModel, ExpressionSyntax expression, INamedTypeSymbol? expressionType)
src\Analyzers\CSharp\CodeFixes\UseDeconstruction\CSharpUseDeconstructionCodeFixProvider.cs (1)
60SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (1)
76SemanticModel semanticModel, SyntaxEditor editor, Diagnostic diagnostic,
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (4)
22internal static LambdaExpressionSyntax Update(SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration, CancellationToken cancellationToken) 26SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration, CancellationToken cancellationToken) 56SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration, ExpressionSyntax expressionBody) 79SemanticModel semanticModel, LambdaExpressionSyntax declaration)
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeFixProvider.cs (1)
60SyntaxEditor editor, SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (2)
146SemanticModel semanticModel, 218private static ITypeSymbol GetConvertedType(SemanticModel semanticModel, SyntaxNode typeSyntax, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
63SemanticModel semanticModel, SyntaxNode currentRoot,
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (2)
55var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 124SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
111var semanticModel = p.Target.SemanticModel;
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
84SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpUseNotPatternCodeFixProvider.cs (1)
47SemanticModel semanticModel,
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (2)
63SemanticModel? semanticModel, 78SemanticModel? semanticModel,
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
91private static IArrayCreationOperation GetArrayCreationOperation(SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken)
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (4)
23SemanticModel model, 35SemanticModel model, 57SemanticModel model, 361SemanticModel model,
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
172SemanticModel semanticModel, SyntaxNode root, SyntaxNode declaration,
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
38protected override bool IsImplicitIndexOrRangeIndexer(ImmutableArray<IParameterSymbol> parameters, TSyntax argument, SemanticModel semanticModel)
UsePatternMatching\CSharpIsAndCastCheckWithoutNameCodeFixProvider.cs (2)
56var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62var updatedSemanticModel = CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.ReplaceMatches(
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (6)
68var semanticModel = context.SemanticModel; 109SemanticModel semanticModel, 160var updatedSemanticModel = ReplaceMatches( 175SemanticModel updatedSemanticModel, CancellationToken cancellationToken) 185public static SemanticModel ReplaceMatches( 186SemanticModel semanticModel, BinaryExpressionSyntax isExpression,
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (36)
IOperation\IOperationTests.cs (12)
461var model = compilation.GetSemanticModel(tree); 491var model = compilation.GetSemanticModel(tree); 510var model = compilation.GetSemanticModel(tree); 525var model = compilation.GetSemanticModel(tree); 555var model = comp.GetSemanticModel(tree); 590var model = compilation.GetSemanticModel(tree); 618var model = compilation.GetSemanticModel(tree); 620SemanticModel speculativeModel; 662var semanticModel = compilation.GetSemanticModel(syntaxTree); 677SemanticModel model, 681SemanticModel memberModel = ((Operation)operation).OwningSemanticModel; 718var model = comp.GetSemanticModel(tree);
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (4)
407var semanticModel = compilation.GetSemanticModel(syntaxTree); 487var semanticModel = compilation.GetSemanticModel(syntaxTree); 846var semanticModel = compilation.GetSemanticModel(tree); 901var semanticModel = compilation.GetSemanticModel(tree);
IOperation\IOperationTests_IConstructorBodyOperation.cs (6)
38var model = compilation.GetSemanticModel(tree); 485var model = compilation.GetSemanticModel(tree); 1070var model = compilation.GetSemanticModel(tree); 1090var model = compilation.GetSemanticModel(tree); 1123var model = compilation.GetSemanticModel(tree); 1161var model = compilation.GetSemanticModel(tree);
IOperation\IOperationTests_IConversionExpression.cs (2)
5290var model = compilation.GetSemanticModel(tree); 5380var semanticModel = compilation.GetSemanticModel(finalSyntax.SyntaxTree);
IOperation\IOperationTests_IFieldReferenceExpression.cs (1)
705var model = comp.GetSemanticModel(syntaxTree);
IOperation\IOperationTests_IFixedStatement.cs (1)
692var model = comp.GetSemanticModel(tree);
IOperation\IOperationTests_ILocalFunctionStatement.cs (2)
1792var semanticModel = compilation.GetSemanticModel(tree); 1847var semanticModel = compilation.GetSemanticModel(tree);
IOperation\IOperationTests_IMethodBodyOperation.cs (6)
33var model = compilation.GetSemanticModel(tree); 560var model = compilation.GetSemanticModel(tree); 702var model = compilation.GetSemanticModel(tree); 844var model = compilation.GetSemanticModel(tree); 976var model = compilation.GetSemanticModel(tree); 1122var model = compilation.GetSemanticModel(tree);
IOperation\IOperationTests_ISymbolInitializer.cs (1)
36var semanticModel = compilation.GetSemanticModel(tree);
IOperation\IOperationTests_IVariableDeclaration.cs (1)
924var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionTests.cs (1)
1180var semanticModel = compilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1097)
Semantics\AccessCheckTests.cs (2)
742var model = c.GetSemanticModel(tree); 896var model = c1.GetSemanticModel(tree);
Semantics\AccessibilityTests.cs (1)
19private static readonly SemanticModel s_testModel;
Semantics\AnonymousFunctionTests.cs (2)
980var semanticModel = compilation.GetSemanticModel(syntaxTree); 1014var semanticModel = compilation.GetSemanticModel(syntaxTree);
Semantics\ArglistTests.cs (1)
958var model = comp.GetSemanticModel(tree);
Semantics\AwaitExpressionTests.cs (4)
83var model = csCompilation.GetSemanticModel(tree); 159var treeModel = comp.GetSemanticModel(tree); 272var semanticModel = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 293var model = comp.GetSemanticModel(tree);
Semantics\BetterCandidates.cs (4)
1086var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 1163var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 1211var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 1264var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]);
Semantics\BindingAsyncTests.cs (2)
56var model = compilation.GetSemanticModel(tree); 85var model = compilation.GetSemanticModel(tree);
Semantics\BindingTests.cs (18)
2364var model = comp.GetSemanticModel(tree); 2383var model = comp.GetSemanticModel(tree); 2720var model = compilation.GetSemanticModel(tree); 2776var model = compilation.GetSemanticModel(tree); 2831var model = compilation.GetSemanticModel(tree); 2887var model = compilation.GetSemanticModel(tree); 2924var model = comp.GetSemanticModel(tree); 2966var model = comp.GetSemanticModel(tree); 3035var model = comp.GetSemanticModel(tree); 3115var model = comp.GetSemanticModel(tree); 3188var model = comp.GetSemanticModel(tree); 3273var model = comp.GetSemanticModel(tree); 3378var model = comp.GetSemanticModel(tree); 3730var model = comp.GetSemanticModel(tree); 3911var model = comp.GetSemanticModel(tree); 3937var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 3984var model = comp.GetSemanticModel(tree); 4025var model = comp.GetSemanticModel(tree);
Semantics\ColorColorTests.cs (19)
590var model = comp.GetSemanticModel(tree); 635var model = comp.GetSemanticModel(tree); 726var model = comp.GetSemanticModel(tree); 1064var model = comp.GetSemanticModel(tree); 1110var model = comp.GetSemanticModel(tree); 1156var model = comp.GetSemanticModel(tree); 1201var model = comp.GetSemanticModel(tree); 1242var model = comp.GetSemanticModel(tree); 1279var model = comp.GetSemanticModel(tree); 1815var semanticModel = comp.GetSemanticModel(syntaxTree, false); 1842var model = comp.GetSemanticModel(tree); 1881var model1 = compilation.GetSemanticModel(tree); 1891var model2 = compilation.GetSemanticModel(tree); 1938var model1 = compilation.GetSemanticModel(tree); 1948var model2 = compilation.GetSemanticModel(tree); 1995var model1 = compilation.GetSemanticModel(tree); 2005var model2 = compilation.GetSemanticModel(tree); 2045var model1 = compilation.GetSemanticModel(tree); 2054var model2 = compilation.GetSemanticModel(tree);
Semantics\ConditionalOperatorTests.cs (4)
1295var model = comp.GetSemanticModel(tree); 1352var model = compilation.GetSemanticModel(tree); 1408var model = compilation.GetSemanticModel(tree); 1453var model = compilation.GetSemanticModel(tree);
Semantics\ConstantTests.cs (3)
3520var model = comp.GetSemanticModel(tree); 4080var model = comp.GetSemanticModel(tree); 4101var model = comp.GetSemanticModel(tree);
Semantics\DeconstructionTests.cs (26)
1838var model = comp.Compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3764var model = compilation.GetSemanticModel(tree); 3942var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 4168var model = comp.GetSemanticModel(tree); 4236var model = comp.GetSemanticModel(tree); 4371var model = comp.GetSemanticModel(tree); 4505var model = comp.GetSemanticModel(tree); 4663var model = comp.GetSemanticModel(tree); 4721var model = comp1.GetSemanticModel(tree); 4757var model = comp.GetSemanticModel(tree); 4835var model = comp.GetSemanticModel(tree); 4940var model = comp.GetSemanticModel(tree); 4986var model = comp.GetSemanticModel(tree); 5044var model = comp.GetSemanticModel(tree); 5185var model = comp.GetSemanticModel(tree); 5329var model = comp.GetSemanticModel(tree); 5476var model = comp.GetSemanticModel(tree); 5653var model = comp.GetSemanticModel(tree); 5763var model = comp.GetSemanticModel(tree); 5876var model = comp.GetSemanticModel(tree); 5985var model = comp.GetSemanticModel(tree); 6028var model = comp.GetSemanticModel(tree); 6068var model = comp.GetSemanticModel(tree); 6110var model = comp.GetSemanticModel(tree); 6150var model = comp.GetSemanticModel(tree); 6553var model = comp.GetSemanticModel(tree);
Semantics\DelegateTypeTests.cs (63)
748var model = comp.GetSemanticModel(tree); 794var model = comp.GetSemanticModel(tree); 894var model = comp.GetSemanticModel(tree); 937var model = comp.GetSemanticModel(tree); 995var model = comp.GetSemanticModel(tree); 1035var model = comp.GetSemanticModel(tree); 1210var model = comp.GetSemanticModel(tree); 1246var model = comp.GetSemanticModel(tree); 1331var model = comp.GetSemanticModel(tree); 1371var model = comp.GetSemanticModel(tree); 1414var model = comp.GetSemanticModel(tree); 1458var model = comp.GetSemanticModel(tree); 1553var model = comp.GetSemanticModel(tree); 1633var model = comp.GetSemanticModel(tree); 1683var model = comp.GetSemanticModel(tree); 1733var model = comp.GetSemanticModel(tree); 1783var model = comp.GetSemanticModel(tree); 1833var model = comp.GetSemanticModel(tree); 1883var model = comp.GetSemanticModel(tree); 1933var model = comp.GetSemanticModel(tree); 1979var model = comp.GetSemanticModel(tree); 2027var model = comp.GetSemanticModel(tree); 2081var model = comp.GetSemanticModel(tree); 2146var model = comp.GetSemanticModel(tree); 2208var model = comp.GetSemanticModel(tree); 2267var model = comp.GetSemanticModel(tree); 2316var model = comp.GetSemanticModel(tree); 2355var model = comp.GetSemanticModel(tree); 2398var model = comp.GetSemanticModel(tree); 2450var model = comp.GetSemanticModel(tree); 2491var model = comp.GetSemanticModel(tree); 2539var model = comp.GetSemanticModel(tree); 2591var model = comp.GetSemanticModel(tree); 2637var model = comp.GetSemanticModel(tree); 2685var model = comp.GetSemanticModel(tree); 2732var model = comp.GetSemanticModel(tree); 2778var model = comp.GetSemanticModel(tree); 2829var model = comp.GetSemanticModel(tree); 2857var model = comp.GetSemanticModel(tree); 2888var model = comp.GetSemanticModel(tree); 2916var model = comp.GetSemanticModel(tree); 2947var model = comp.GetSemanticModel(tree); 2980var model = comp.GetSemanticModel(tree); 3011var model = comp.GetSemanticModel(tree); 3042var model = comp.GetSemanticModel(tree); 3077var model = comp.GetSemanticModel(tree); 3560var model = comp.GetSemanticModel(tree); 3602var model = comp.GetSemanticModel(tree); 8027var model = comp.GetSemanticModel(tree); 8050var model = comp.GetSemanticModel(tree); 10385var model = comp.GetSemanticModel(tree); 10395static (string?, string?, string?) getVariableInfo(SemanticModel model, VariableDeclaratorSyntax variable) 11083var model = comp.GetSemanticModel(tree); 11169var model = comp.GetSemanticModel(tree); 12109var model = comp.GetSemanticModel(syntaxTree); 12117static void speculate(SemanticModel? model, int position, string text, string expectedDelegateType) 14347private static void VerifyLocalDelegateType(SemanticModel model, VariableDeclaratorSyntax variable, string expectedInvokeMethod) 14365private static void VerifyExpressionType(SemanticModel model, ExpressionSyntax variable, string expectedSymbol, string expectedInvokeMethod) 14699var model = comp.GetSemanticModel(tree); 14746var model = comp.GetSemanticModel(tree); 14759static void verifyConversions(SemanticModel model, ExpressionSyntax expr, ITypeSymbol destination, ConversionKind expectedImplicitKind, ConversionKind expectedExplicitKind) 19758var model = comp.GetSemanticModel(tree); 19800var model = comp.GetSemanticModel(tree);
Semantics\DynamicTests.cs (85)
3858var model = verifier.Compilation.GetSemanticModel(tree); 3891var model = verifier.Compilation.GetSemanticModel(tree); 3919var model = verifier.Compilation.GetSemanticModel(tree); 3947var model = verifier.Compilation.GetSemanticModel(tree); 3998var model = verifier.Compilation.GetSemanticModel(tree); 4977var model = comp1.GetSemanticModel(tree); 5101var model = comp1.GetSemanticModel(tree); 5224var model = comp1.GetSemanticModel(tree); 5342var model = comp1.GetSemanticModel(tree); 5383var model = comp1.GetSemanticModel(tree); 5427var model = comp1.GetSemanticModel(tree); 5471var model = comp1.GetSemanticModel(tree); 5515var model = comp1.GetSemanticModel(tree); 5579var model = comp.GetSemanticModel(tree); 5617var model = comp.GetSemanticModel(tree); 5656var model = comp.GetSemanticModel(tree); 5692var model = comp.GetSemanticModel(tree); 5733var model = comp1.GetSemanticModel(tree); 5778var model = comp1.GetSemanticModel(tree); 5823var model = comp1.GetSemanticModel(tree); 5868var model = comp1.GetSemanticModel(tree); 5936var model = comp.GetSemanticModel(tree); 5975var model = comp.GetSemanticModel(tree); 6023var model = comp.GetSemanticModel(tree); 6146var model = comp.GetSemanticModel(tree); 6266var model = comp.GetSemanticModel(tree); 6378var model = comp1.GetSemanticModel(tree); 6420var model = comp1.GetSemanticModel(tree); 6467var model = comp1.GetSemanticModel(tree); 6511var model = comp1.GetSemanticModel(tree); 6553var model = comp.GetSemanticModel(tree); 6607var model = comp.GetSemanticModel(tree); 6672var model = comp.GetSemanticModel(tree); 6781var model = comp.GetSemanticModel(tree); 6891var model = comp.GetSemanticModel(tree); 6992var model = comp.GetSemanticModel(tree); 7060var model = comp.GetSemanticModel(tree); 7163var model = comp.GetSemanticModel(tree); 7276var model = comp.GetSemanticModel(tree); 7392var model = comp.GetSemanticModel(tree); 7505var model = comp.GetSemanticModel(tree); 7582var model = comp.GetSemanticModel(tree); 7687var model = comp.GetSemanticModel(tree); 7793var model = comp.GetSemanticModel(tree); 7896var model = comp.GetSemanticModel(tree); 7968var model = comp.GetSemanticModel(tree); 8074var model = comp.GetSemanticModel(tree); 8179var model = comp.GetSemanticModel(tree); 8284var model = comp.GetSemanticModel(tree); 8393var model = comp.GetSemanticModel(tree); 8502var model = comp.GetSemanticModel(tree); 8612var model = comp.GetSemanticModel(tree); 8725var model = comp.GetSemanticModel(tree); 8794var model = comp.GetSemanticModel(tree); 8862var model = comp.GetSemanticModel(tree); 8924var model = comp.GetSemanticModel(tree); 9014var model = comp.GetSemanticModel(tree); 9105var model = comp.GetSemanticModel(tree); 9195var model = comp.GetSemanticModel(tree); 9251var model = comp.GetSemanticModel(tree); 9312var model = comp.GetSemanticModel(tree); 9433var model = comp.GetSemanticModel(tree); 9553var model = comp.GetSemanticModel(tree); 9667var model = comp.GetSemanticModel(tree); 9778var model = comp.GetSemanticModel(tree); 9889var model = comp.GetSemanticModel(tree); 10010var model = comp.GetSemanticModel(tree); 10138var model = comp.GetSemanticModel(tree); 10266var model = comp.GetSemanticModel(tree); 10420var model = comp.GetSemanticModel(tree); 10554var model = comp.GetSemanticModel(tree); 10702var model = comp.GetSemanticModel(tree); 10972var model = comp.GetSemanticModel(tree); 11101var model = comp.GetSemanticModel(tree); 11185var model = comp.GetSemanticModel(tree); 11263var model = comp.GetSemanticModel(tree); 11318var model = comp1.GetSemanticModel(tree); 11371var model = comp1.GetSemanticModel(tree); 11417var model = comp1.GetSemanticModel(tree); 11451var model = comp1.GetSemanticModel(tree); 11495var model = comp.GetSemanticModel(tree); 11536var model = comp1.GetSemanticModel(tree); 11585var model = comp.GetSemanticModel(tree); 11637var model = comp.GetSemanticModel(tree); 11681var model = comp1.GetSemanticModel(tree);
Semantics\ExpressionBodiedMemberTests.cs (16)
39var model = comp.GetSemanticModel(tree); 424var model = comp.GetSemanticModel(tree); 473var model = comp.GetSemanticModel(tree); 504var model = comp.GetSemanticModel(tree); 533var model = comp.GetSemanticModel(tree); 573var model = comp.GetSemanticModel(tree); 647var model = comp.GetSemanticModel(tree); 678var model = comp.GetSemanticModel(tree); 709var model = comp.GetSemanticModel(tree); 740var model = comp.GetSemanticModel(tree); 775var model = comp.GetSemanticModel(tree); 806var model = comp.GetSemanticModel(tree); 837var model = comp.GetSemanticModel(tree); 872var model = comp.GetSemanticModel(tree); 911var model = comp.GetSemanticModel(tree); 1019var model = comp.GetSemanticModel(tree);
Semantics\ForEachTests.cs (6)
2127var model = comp.GetSemanticModel(tree); 2179var model = comp.GetSemanticModel(tree); 2883var model = comp.GetSemanticModel(tree); 3325var model = comp.GetSemanticModel(tree); 3359var model = comp.GetSemanticModel(tree); 3422var model = compilation.GetSemanticModel(tree);
Semantics\FunctionPointerTests.cs (47)
199var model = comp.GetSemanticModel(tree); 208static void assertResult(SemanticModel model, ExpressionSyntax initializer1, Compilation comp) 291var model = comp.GetSemanticModel(tree); 349var model = comp.GetSemanticModel(tree); 400var model = comp.GetSemanticModel(tree); 452var model = comp.GetSemanticModel(tree); 500var model = comp.GetSemanticModel(tree); 598var model = comp.GetSemanticModel(tree); 837var model = comp.GetSemanticModel(tree); 880var model = comp.GetSemanticModel(tree); 899private static void VerifyDeclarationConversion(CSharpCompilation comp, SemanticModel model, VariableDeclaratorSyntax decl, ConversionKind expectedConversionKind, bool expectedImplicit, string expectedOriginalType, string expectedConvertedType, string expectedOperationTree) 940var model = comp.GetSemanticModel(tree); 976var model = comp.GetSemanticModel(tree); 1044var model = comp.GetSemanticModel(tree); 1124var model = comp.GetSemanticModel(tree); 1269var model = comp.GetSemanticModel(tree); 1364var model = comp.GetSemanticModel(tree); 1505var model = comp.GetSemanticModel(tree); 1562var model = comp.GetSemanticModel(tree); 1613var model = comp.GetSemanticModel(tree); 1661var model = comp.GetSemanticModel(tree); 1694var model = comp.GetSemanticModel(tree); 1727var model = comp.GetSemanticModel(tree); 1773var model = comp.GetSemanticModel(tree); 1821var model = comp.GetSemanticModel(tree); 1854var model = comp.GetSemanticModel(tree); 1887var model = comp.GetSemanticModel(tree); 1934var model = comp.GetSemanticModel(tree); 2053var model = comp.GetSemanticModel(tree); 2086var model = comp.GetSemanticModel(tree); 2223var model = comp.GetSemanticModel(tree); 2280var model = comp.GetSemanticModel(tree); 2353var model = comp.GetSemanticModel(tree); 2427var model = comp.GetSemanticModel(tree); 2495var model = comp.GetSemanticModel(tree); 2592var model = comp.GetSemanticModel(tree); 2665var model = comp.GetSemanticModel(tree); 3176var model = comp.GetSemanticModel(tree); 3295var model = comp.GetSemanticModel(tree); 3374var model = comp.GetSemanticModel(syntaxTree); 3431var model = comp.GetSemanticModel(syntaxTree); 3473var model = comp.GetSemanticModel(syntaxTree); 3526var model = comp.GetSemanticModel(syntaxTree); 3580var model = comp.GetSemanticModel(syntaxTree); 3675var model = comp.GetSemanticModel(syntaxTree); 3803var model = comp.GetSemanticModel(syntaxTree); 3948var model = comp.GetSemanticModel(syntaxTree);
Semantics\FuzzTests.cs (1)
52var model = compilation.GetSemanticModel(tree);
Semantics\GenericConstraintsTests.cs (5)
2876var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 3138var model = compilation.GetSemanticModel(tree); 3168var model = compilation.GetSemanticModel(tree); 3194var model = compilation.GetSemanticModel(tree); 3223var model = compilation.GetSemanticModel(tree);
Semantics\GlobalUsingDirectiveTests.cs (3)
3841var model = comp.GetSemanticModel(tree); 4244var model = comp.GetSemanticModel(tree); 4978var model = comp.GetSemanticModel(tree);
Semantics\ImplicitlyTypeArraysTests.cs (2)
65var model = comp.GetSemanticModel(tree); 91var model = comp.GetSemanticModel(tree);
Semantics\ImplicitObjectCreationTests.cs (24)
55var model = comp.GetSemanticModel(tree); 130var model = comp.GetSemanticModel(tree); 177var model = comp.GetSemanticModel(tree); 227var model = comp.GetSemanticModel(tree); 841var model = comp.GetSemanticModel(tree); 882var model = comp.GetSemanticModel(tree); 1705var model = comp.GetSemanticModel(tree); 1865var model = comp.GetSemanticModel(tree); 1895var model = comp.GetSemanticModel(tree); 1925var model = comp.GetSemanticModel(tree); 1977var model = comp.GetSemanticModel(tree); 2035var model = comp.GetSemanticModel(tree); 2070var model = comp.GetSemanticModel(tree); 2124var model = comp.GetSemanticModel(tree); 2216var model = comp.GetSemanticModel(tree); 2513var model = comp.GetSemanticModel(tree); 2564var model = comp.GetSemanticModel(tree); 2921var model = comp.GetSemanticModel(tree); 3214var model = comp.GetSemanticModel(tree); 4156var model = comp.GetSemanticModel(tree); 4183var model = comp.GetSemanticModel(tree); 4190bool success = model.TryGetSpeculativeSemanticModel(nodeLocation, modifiedNode, out var speculativeModel); 4529var semanticModel = compilation.GetSemanticModel(tree); 4572var semanticModel = compilation.GetSemanticModel(tree);
Semantics\IndexAndRangeTests.cs (9)
896var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 916var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 937var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1120var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1249var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1282var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1315var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1339var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1382var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true);
Semantics\InitOnlyMemberTests.cs (5)
2519var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 3138var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 3144SemanticModel speculativeModel; 3190var model = comp.GetSemanticModel(tree); 4141var model = comp.GetSemanticModel(tree);
Semantics\InteractiveSemanticModelTests.cs (2)
42var model = compilation.GetSemanticModel(tree); 359var model = compilation.GetSemanticModel(tree);
Semantics\InteractiveUsingTests.cs (4)
86var model = sub.GetSemanticModel(tree); 116var model = sub4.GetSemanticModel(tree); 583var model = comp.GetSemanticModel(tree); 593var model = comp.GetSemanticModel(tree);
Semantics\InterceptorsTests.cs (1)
163var model = comp.GetSemanticModel(source);
Semantics\InterpolationTests.cs (2)
4598var model = comp.GetSemanticModel(tree); 4824var model = comp.GetSemanticModel(tree);
Semantics\IteratorTests.cs (3)
463var model = comp.GetSemanticModel(tree); 613var model = comp.GetSemanticModel(tree); 651var model = comp.GetSemanticModel(tree);
Semantics\LambdaDiscardParametersTests.cs (8)
69var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 110private static void VerifyDiscardParameterSymbol(ParameterSyntax underscore, string expectedType, CodeAnalysis.NullableAnnotation expectedAnnotation, SemanticModel model) 385var model = comp.GetSemanticModel(tree); 418var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 447var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 481var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 512var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 567var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
Semantics\LambdaTests.cs (61)
839var model = comp.GetSemanticModel(tree); 939var model = compilation.GetSemanticModel(tree); 1031var model = compilation.GetSemanticModel(tree); 1085var model = compilation.GetSemanticModel(tree); 1120var model = compilation.GetSemanticModel(tree); 1176var model = comp.GetSemanticModel(tree); 1204var model = comp.GetSemanticModel(tree); 1236var model = comp.GetSemanticModel(tree); 1517var semanticModel = compilation.GetSemanticModel(tree); 1552var semanticModel = compilation.GetSemanticModel(tree); 1586var semanticModel = compilation.GetSemanticModel(tree); 1618var semanticModel = compilation.GetSemanticModel(tree); 1977var model = compilation.GetSemanticModel(tree); 2119var sm = compilation.GetSemanticModel(tree); 2165var sm = compilation.GetSemanticModel(tree); 2211var sm = compilation.GetSemanticModel(tree); 2257var sm = compilation.GetSemanticModel(tree); 2303var sm = compilation.GetSemanticModel(tree); 2333var sm = compilation.GetSemanticModel(tree); 2360var sm = compilation.GetSemanticModel(tree); 2414var sm = compilation.GetSemanticModel(tree); 2460var sm = compilation.GetSemanticModel(tree); 2506var sm = compilation.GetSemanticModel(tree); 2539var sm = compilation.GetSemanticModel(tree); 2572var sm = compilation.GetSemanticModel(tree); 2609var sm = compilation.GetSemanticModel(tree); 2661var sm = compilation.GetSemanticModel(tree); 2999var model = comp.GetSemanticModel(tree); 3041var model = comp.GetSemanticModel(tree); 3611var model = comp.GetSemanticModel(tree); 3892var model = comp.GetSemanticModel(tree); 3936var model = comp.GetSemanticModel(tree); 3976var model = comp.GetSemanticModel(tree); 4092var model = comp.GetSemanticModel(tree); 4121var model = comp.GetSemanticModel(tree); 4156var model = comp.GetSemanticModel(tree); 4184var model = comp.GetSemanticModel(tree); 4211var model = comp.GetSemanticModel(tree); 4786var model = comp.GetSemanticModel(tree); 4871var model = comp.GetSemanticModel(tree); 4926var model = comp.GetSemanticModel(tree); 4953var model = comp.GetSemanticModel(tree); 4981var model = comp.GetSemanticModel(tree); 5027var model = comp.GetSemanticModel(tree); 5635var model = comp.GetSemanticModel(tree); 6221private static LambdaSymbol GetLambdaSymbol(SemanticModel model, LambdaExpressionSyntax syntax) 6508var model = comp.GetSemanticModel(tree); 6818var model = comp.GetSemanticModel(tree); 6847var model = comp.GetSemanticModel(tree); 6896var model = comp.GetSemanticModel(tree); 7012var model = comp.GetSemanticModel(syntaxTree); 7106var model = comp.GetSemanticModel(syntaxTree); 7635var model = comp.GetSemanticModel(tree); 8009var model = comp.GetSemanticModel(tree); 8057var model = comp.GetSemanticModel(tree); 8081var model = comp.GetSemanticModel(tree); 8086Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(m2Syntax.Body.SpanStart, newMethod, out var speculativeModel)); 8117var model = comp.GetSemanticModel(tree); 8229var model = comp.GetSemanticModel(tree); 8359var model = comp.GetSemanticModel(tree); 8392var model = comp.GetSemanticModel(tree);
Semantics\LocalFunctionTests.cs (54)
345var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 393var model = comp.GetSemanticModel(tree); 440var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 446Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(mMethod.Body.SpanStart, mMethod, out var newModel)); 449static void validate(SemanticModel model, SyntaxTree tree) 491var model = comp.GetSemanticModel(tree); 539var model = comp.GetSemanticModel(tree); 616var model = comp.GetSemanticModel(tree); 669var model = comp.GetSemanticModel(tree); 723var model = comp.GetSemanticModel(tree); 803var model = comp.GetSemanticModel(tree); 850var model = comp.GetSemanticModel(tree); 969var model = comp.GetSemanticModel(tree); 1020var model = comp.GetSemanticModel(tree); 1058var model = comp.GetSemanticModel(tree); 1718var model = comp.GetSemanticModel(tree); 1765var model = comp.GetSemanticModel(tree); 1840var model = comp.GetSemanticModel(tree); 1925var model = comp.GetSemanticModel(tree); 1975var model = comp.GetSemanticModel(tree); 2372var model = comp.GetSemanticModel(tree); 2586var model = comp.GetSemanticModel(tree); 4685var model = compilation.GetSemanticModel(tree); 4723var model = compilation.GetSemanticModel(tree); 4960var model = compilation.GetSemanticModel(tree); 5103var model = comp.GetSemanticModel(tree); 6359var model = comp.GetSemanticModel(tree); 6380var model = comp.GetSemanticModel(tree); 6408var model = comp.GetSemanticModel(tree); 6444var model = comp.GetSemanticModel(tree); 6488var model = comp.GetSemanticModel(tree); 6535var model = comp.GetSemanticModel(tree); 7037var model = comp.GetSemanticModel(tree); 7097var model = comp.GetSemanticModel(tree); 7346var parentModel = comp.GetSemanticModel(tree); 7363static void VerifyTParameterSpeculation(SemanticModel parentModel, int localFuncPosition, AttributeSyntax attr1, bool found = true) 7365SemanticModel speculativeModel; 7431var parentModel = comp.GetSemanticModel(tree); 7496var parentModel = comp.GetSemanticModel(tree); 7570var parentModel = comp.GetSemanticModel(tree); 7638var model = comp.GetSemanticModel(tree); 8683var model = comp.GetSemanticModel(tree); 8736var model = comp.GetSemanticModel(tree); 8740Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 8778var model = comp.GetSemanticModel(tree); 8926var parentModel = comp.GetSemanticModel(tree); 8944static void VerifyParameterSpeculation(SemanticModel parentModel, int localFuncPosition, AttributeSyntax attr1, bool found = true) 8946SemanticModel speculativeModel; 9430var parentModel = comp.GetSemanticModel(tree); 9551var model = comp.GetSemanticModel(tree); 9748var parentModel = comp.GetSemanticModel(tree); 10171var model = comp.GetSemanticModel(tree); 10383var semanticModel = compilation.GetSemanticModel(tree); 10427var model = comp.GetSemanticModel(tree);
Semantics\LockTests.cs (7)
43var model = compilation.GetSemanticModel(tree); 487var model = compilation.GetSemanticModel(tree); 549var model = compilation.GetSemanticModel(tree); 573var model = compilation.GetSemanticModel(tree); 603var model = compilation.GetSemanticModel(tree); 627var model = compilation.GetSemanticModel(tree); 697var model = compilation.GetSemanticModel(tree);
Semantics\LookupPositionTests.cs (6)
2272var model = (Microsoft.CodeAnalysis.SemanticModel)(compilation.GetSemanticModel(tree)); 2300var model = compilation.GetSemanticModel(tree); 3065var model = GetModelAndKeyPositions(text, out keyPositions); 3089private static SemanticModel GetModelAndKeyPositions(string markedText, out int[] keyPositions) 3124private static void CheckSymbols(SemanticModel model, int keyPositionNum, int position, IEnumerable<string> expectedSymbols)
Semantics\LookupTests.cs (24)
29var model = compilation.GetSemanticModel(tree); 38var model = compilation.GetSemanticModel(tree); 426var model = comp.GetSemanticModel(tree); 582var model = comp.GetSemanticModel(tree); 622var model = compilation.GetSemanticModel(tree); 679var model = compilation.GetSemanticModel(tree); 1368var model = comp.GetSemanticModel(tree); 1500var model = compilation.GetSemanticModel(tree); 1561var model = compilation.GetSemanticModel(tree); 1593var model = compilation.GetSemanticModel(tree); 1641var model = compilation.GetSemanticModel(tree); 1642SemanticModel imodel = model; 1668var model = compilation.GetSemanticModel(tree); 1669SemanticModel imodel = model; 1723var model = comp.GetSemanticModel(tree); 1757var model = comp.GetSemanticModel(tree); 1788var model = comp.GetSemanticModel(tree); 1820var model = comp.GetSemanticModel(tree); 1981var model = comp.GetSemanticModel(tree); 2012var model = comp.GetSemanticModel(tree); 2042var model = comp.GetSemanticModel(tree); 2072var model = comp.GetSemanticModel(tree); 2098var model = comp.GetSemanticModel(tree); 2121var model = comp.GetSemanticModel(tree);
Semantics\MethodTypeInferenceTests.cs (10)
700var model = comp.GetSemanticModel(tree); 755var model = comp.GetSemanticModel(tree); 801var model = comp.GetSemanticModel(tree); 839private static void CheckDiscard(SemanticModel model, DiscardDesignationSyntax discard, string type) 849private static void CheckDiscard(SemanticModel model, IdentifierNameSyntax discard, string type) 1045var model = comp.GetSemanticModel(tree); 1075var model = comp.GetSemanticModel(tree); 1117var model = compilation.GetSemanticModel(tree); 1158var model = compilation.GetSemanticModel(tree); 1199var model = compilation.GetSemanticModel(tree);
Semantics\NameOfTests.cs (17)
691var model = compilation.GetSemanticModel(tree); 717var model = compilation.GetSemanticModel(tree); 752var model = compilation.GetSemanticModel(tree); 799var model = compilation.GetSemanticModel(tree); 836var model = compilation.GetSemanticModel(tree); 872var model = compilation.GetSemanticModel(tree); 918var model = compilation.GetSemanticModel(tree); 951var model = compilation.GetSemanticModel(tree); 991var model = comp.GetSemanticModel(tree); 1007Assert.True(model.TryGetSpeculativeSemanticModel(initializer.Position, initializer, out var model2)); 1063var model = comp.GetSemanticModel(tree); 1078Assert.True(model.TryGetSpeculativeSemanticModel(initializer.Position, initializer, out var model2)); 1145var model = comp.GetSemanticModel(tree); 1164Assert.True(model.TryGetSpeculativeSemanticModel(initializer.Position, initializer, out var model2)); 1226var model = comp.GetSemanticModel(tree); 1242Assert.True(model.TryGetSpeculativeSemanticModel(initializer.Position, initializer, out var model2)); 1428var model = compilation.GetSemanticModel(tree);
Semantics\NativeIntegerTests.cs (19)
1788var model = comp.GetSemanticModel(tree); 2345var model = comp.GetSemanticModel(tree); 2465var model = compB.GetSemanticModel(tree); 3635var model = comp.GetSemanticModel(tree); 4074var model = comp.GetSemanticModel(tree); 4117var model = comp.GetSemanticModel(tree); 6060var model = comp.GetSemanticModel(tree); 6108var model = comp.GetSemanticModel(tree); 9494var model = comp.GetSemanticModel(tree); 9729var model = comp.GetSemanticModel(tree); 10103var model = comp.GetSemanticModel(tree); 10330var model = comp.GetSemanticModel(tree); 12380var model = comp.GetSemanticModel(tree); 15320var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15341var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15364var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15392var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15415var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15445var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
Semantics\NonTrailingNamedArgumentsTests.cs (15)
44var model = verifier.Compilation.GetSemanticModel(tree); 366var model = comp.GetSemanticModel(tree); 392var model = verifier.Compilation.GetSemanticModel(tree); 422var model = comp.GetSemanticModel(tree); 454var model = comp.GetSemanticModel(tree); 483var model = comp.GetSemanticModel(tree); 533var model = comp.GetSemanticModel(tree); 568var model = comp.GetSemanticModel(tree); 597var model = comp.GetSemanticModel(tree); 651var model = comp.GetSemanticModel(tree); 678var model = comp.GetSemanticModel(tree); 709var model = comp.GetSemanticModel(tree); 743var model = verifier.Compilation.GetSemanticModel(tree); 775var model = verifier.Compilation.GetSemanticModel(tree); 982var model = comp.GetSemanticModel(tree);
Semantics\NullableContextTests.cs (14)
65var model = comp.GetSemanticModel(syntaxTree); 98var model1 = comp.GetSemanticModel(syntaxTree1); 100var model2 = comp.GetSemanticModel(syntaxTree2); 349var model = comp.GetSemanticModel(syntaxTree); 388var model = comp.GetSemanticModel(syntaxTree); 423var model = comp.GetSemanticModel(syntaxTree); 1770var model = comp.GetSemanticModel(syntaxTree); 1840var model = comp.GetSemanticModel(syntaxTree); 1877var model = comp.GetSemanticModel(syntaxTree); 1926var model = comp.GetSemanticModel(syntaxTree); 1968var model = comp.GetSemanticModel(syntaxTree); 2008var model = comp.GetSemanticModel(syntaxTree); 2047var model = comp.GetSemanticModel(syntaxTree); 2227var model = comp.GetSemanticModel(syntaxTree);
Semantics\NullableReferenceTypesTests.cs (118)
1752var model = comp.GetSemanticModel(tree); 1786var model = comp.GetSemanticModel(tree); 1798private static void VerifyTypeInfo(SemanticModel model, ExpressionSyntax expression, string expectedType, string expectedConvertedType) 1839var model = comp.GetSemanticModel(tree); 1866var model = comp.GetSemanticModel(tree); 1891var model = comp.GetSemanticModel(tree); 1961var model = comp.GetSemanticModel(tree); 2274var model = comp.GetSemanticModel(tree); 2313var model = comp.GetSemanticModel(tree); 2346var model = comp.GetSemanticModel(tree); 2379var model = comp.GetSemanticModel(tree); 2478var model = comp.GetSemanticModel(tree); 3333var sm = compilation.GetSemanticModel(tree); 3692var model = comp.GetSemanticModel(tree); 4525var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 4561var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 4593var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 5170var model = comp.GetSemanticModel(syntaxTree); 10533var model = compilation.GetSemanticModel(tree); 13510var model = compilation.GetSemanticModel(tree); 34982var model = compilation.GetSemanticModel(tree); 34999var model = compilation.GetSemanticModel(tree); 56075var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56105var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56138var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56175var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56210var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56244var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56275var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56303var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56342var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56376var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56407var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56436var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56471var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56507var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56586var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56618var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 59016var model = comp.GetSemanticModel(tree); 59050var model = comp.GetSemanticModel(tree); 59078var model = comp.GetSemanticModel(tree); 59110var model = comp.GetSemanticModel(tree); 59139var model = comp.GetSemanticModel(tree); 59172var model = comp.GetSemanticModel(tree); 59204var model = comp.GetSemanticModel(tree); 59237var model = comp.GetSemanticModel(tree); 59271var model = comp.GetSemanticModel(tree); 59297var model = comp.GetSemanticModel(tree); 59326var model = comp.GetSemanticModel(tree); 59355var model = comp.GetSemanticModel(tree); 62839var model = comp.GetSemanticModel(syntaxTree); 65888var model1 = comp1.GetSemanticModel(tree1); 65897Assert.True(model1.TryGetSpeculativeSemanticModel(function1.SpanStart, function2, out var model2)); 71251var model = comp.GetSemanticModel(tree); 71287var model = comp.GetSemanticModel(tree); 71328var model = comp.GetSemanticModel(tree); 71365var model = comp.GetSemanticModel(tree); 71402var model = comp.GetSemanticModel(tree); 71437var model = comp.GetSemanticModel(tree); 71470var model = comp.GetSemanticModel(tree); 71507var model = comp.GetSemanticModel(tree); 71781var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 71873var model = comp.GetSemanticModel(tree); 71920var model = comp.GetSemanticModel(tree); 71959var model = comp.GetSemanticModel(tree); 73760var model = comp.GetSemanticModel(tree); 81258var model = comp.GetSemanticModel(tree); 94280var model = comp.GetSemanticModel(syntaxTree); 97755var model = comp.GetSemanticModel(tree); 99084var model = comp.GetSemanticModel(tree); 111768var model = comp.GetSemanticModel(tree); 111822var model = comp.GetSemanticModel(tree); 113191var model = comp.GetSemanticModel(tree); 113592var model = comp.GetSemanticModel(tree); 113623var model = comp.GetSemanticModel(tree); 113801var model = comp.GetSemanticModel(tree); 114026var model = comp.GetSemanticModel(tree); 145376var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145417var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145457var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145495var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145533var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145571var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145604var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145637var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145676var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145951var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 145982var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 146015var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 146299var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 146338var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 146378var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 146417var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 146451var model = comp.GetSemanticModel(tree); 146462out var speculativeModel)); 154800var model = comp.GetSemanticModel(tree); 154868var model = comp.GetSemanticModel(tree); 154879private static void VerifyVariableAnnotation(SemanticModel model, VariableDeclaratorSyntax syntax, string expectedDisplay, NullableAnnotation expectedAnnotation) 155996var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 156745var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 157580var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 157628var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158060var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158096var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158191var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158229var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158270var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158310var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158344var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158381var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158476var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158524var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158566var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158603var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 158814var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 160689var model = comp.GetSemanticModel(tree); 161239var model = comp.GetSemanticModel(syntaxTree); 161285var model = comp.GetSemanticModel(syntaxTree);
Semantics\NullCoalesceAssignmentTests.cs (5)
37var semanticModel = comp.GetSemanticModel(syntaxTree); 75var semanticModel = comp.GetSemanticModel(syntaxTree); 118var semanticModel = comp.GetSemanticModel(syntaxTree); 157var semanticModel = comp.GetSemanticModel(syntaxTree); 183var semanticModel = comp.GetSemanticModel(syntaxTree);
Semantics\ObjectAndCollectionInitializerTests.cs (17)
3469var semanticModel = compilation.GetSemanticModel(tree); 3517var semanticModel = compilation.GetSemanticModel(tree); 3574var semanticModel = compilation.GetSemanticModel(tree); 3610var semanticModel = compilation.GetSemanticModel(tree); 3647var semanticModel = compilation.GetSemanticModel(tree); 3688var semanticModel = compilation.GetSemanticModel(tree); 3738var semanticModel = compilation.GetSemanticModel(tree); 3782var semanticModel = compilation.GetSemanticModel(tree); 3813var model = comp.GetSemanticModel(syntax); 3836var model = comp.GetSemanticModel(syntax); 3860var model = comp.GetSemanticModel(syntax); 3933var semanticModel = compilation.GetSemanticModel(tree); 4015var semanticModel = compilation.GetSemanticModel(tree); 4057var semanticModel = compilation.GetSemanticModel(tree); 4135var semanticModel = compilation.GetSemanticModel(tree); 4225var model = comp.GetSemanticModel(tree); 4279var model = comp.GetSemanticModel(tree);
Semantics\OperatorTests.cs (17)
45var semanticModel = compilation.GetSemanticModel(tree); 2983var model = compilation.GetSemanticModel(tree); 6937var model = comp.GetSemanticModel(tree); 7054var model = comp.GetSemanticModel(tree); 7209var model = comp.GetSemanticModel(tree); 7486var semanticModel = compilation.GetSemanticModel(tree); 7532SemanticModel semanticModel, 7702var semanticModel = compilation.GetSemanticModel(tree); 7855var semanticModel = compilation.GetSemanticModel(tree); 8015var semanticModel = compilation.GetSemanticModel(tree); 8071SemanticModel semanticModel, 8552var semanticModel = compilation.GetSemanticModel(tree); 8587var semanticModel = compilation.GetSemanticModel(tree); 8631var semanticModel = compilation.GetSemanticModel(tree); 8681var semanticModel = compilation.GetSemanticModel(tree); 8755var semanticModel = compilation.GetSemanticModel(tree); 11416var model = comp.GetSemanticModel(tree);
Semantics\OverloadResolutionPerfTests.cs (2)
981var model = comp.GetSemanticModel(tree); 1059var model = comp.GetSemanticModel(tree);
Semantics\OverloadResolutionTests.cs (9)
7147var model = comp.GetSemanticModel(tree); 7257var model = comp.GetSemanticModel(tree); 7431var model = comp.GetSemanticModel(tree); 7472var model = comp.GetSemanticModel(tree); 9069var model = compilation.GetSemanticModel(tree); 9417var model = comp.GetSemanticModel(tree); 11762var model = comp.GetSemanticModel(tree); 11811var model = comp.GetSemanticModel(tree); 11861var model = comp.GetSemanticModel(tree);
Semantics\QueryTests.cs (36)
1452var model = compilation.GetSemanticModel(tree); 1661var model = compilation.GetSemanticModel(tree); 1721var model = compilation.GetSemanticModel(tree); 1759var model = compilation.GetSemanticModel(tree); 2175var semanticModel = compilation.GetSemanticModel(tree); 2205var semanticModel = compilation.GetSemanticModel(tree); 2232var semanticModel = compilation.GetSemanticModel(tree); 2270var semanticModel = compilation.GetSemanticModel(tree); 2298var semanticModel = compilation.GetSemanticModel(tree); 2323var semanticModel = compilation.GetSemanticModel(tree); 2355var semanticModel = compilation.GetSemanticModel(tree); 2382var semanticModel = compilation.GetSemanticModel(tree); 2426var model = compilation.GetSemanticModel(tree); 2482var semanticModel = compilation.GetSemanticModel(tree); 2520var semanticModel = compilation.GetSemanticModel(tree); 2546var semanticModel = compilation.GetSemanticModel(tree); 2581var semanticModel = compilation.GetSemanticModel(tree); 2661var semanticModel = compilation.GetSemanticModel(tree); 2689var semanticModel = compilation.GetSemanticModel(tree); 2715var semanticModel = compilation.GetSemanticModel(tree); 2741var semanticModel = compilation.GetSemanticModel(tree); 2896var model = compilation.GetSemanticModel(tree); 2929var model = compilation.GetSemanticModel(tree); 3135var model = compilation.GetSemanticModel(tree); 3163var model = compilation.GetSemanticModel(tree); 3374var model = compilation.GetSemanticModel(tree); 3419var model = compilation.GetSemanticModel(tree); 3423SemanticModel speculativeModel; 3463var model = compilation.GetSemanticModel(tree); 3467SemanticModel speculativeModel; 3510var model = compilation.GetSemanticModel(tree); 3514SemanticModel speculativeModel; 3549var model = compilation.GetSemanticModel(tree); 3553SemanticModel speculativeModel; 3597var model = compilation.GetSemanticModel(tree); 3601SemanticModel speculativeModel;
Semantics\RawInterpolationTests_Handler.cs (2)
2899var model = comp.GetSemanticModel(tree); 3125var model = comp.GetSemanticModel(tree);
Semantics\ReadOnlyStructsTests.cs (1)
1267var semanticModel = comp.GetSemanticModel(testMethodSyntax.SyntaxTree);
Semantics\RecordStructTests.cs (20)
533var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 553var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 573var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 595var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2306var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2330var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2592var model = comp.GetSemanticModel(tree); 2627var model = comp.GetSemanticModel(tree); 2661var model = comp.GetSemanticModel(tree); 2696var model = comp.GetSemanticModel(tree); 3246var model = comp.GetSemanticModel(tree); 3288var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 3336var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 3387var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 5848var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 5890var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 6924var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 7605var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8810var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 10769var model = comp.GetSemanticModel(tree);
Semantics\RefEscapingTests.cs (3)
49var model = comp.GetSemanticModel(tree); 5715var model = compilation.GetSemanticModel(tree); 5815var model = compilation.GetSemanticModel(tree);
Semantics\RefExtensionMethodsTests.cs (4)
2146var model = comp.GetSemanticModel(tree); 2165var model = comp.GetSemanticModel(tree); 2184var model = comp.GetSemanticModel(tree); 2203var model = comp.GetSemanticModel(tree);
Semantics\RefFieldTests.cs (59)
11024var model = comp.GetSemanticModel(tree); 11098var model = comp.GetSemanticModel(tree); 11125static (NamedTypeSymbol, LambdaSymbol) getDelegateTypeAndLambda(SemanticModel model, VariableDeclaratorSyntax decl) 11220var model = comp.GetSemanticModel(tree); 11388var model = comp.GetSemanticModel(tree); 11980var model = comp.GetSemanticModel(tree); 12060var model = comp.GetSemanticModel(tree); 12129var model = comp.GetSemanticModel(tree); 12197var model = comp.GetSemanticModel(tree); 12379var model = comp.GetSemanticModel(tree); 12566var model = comp.GetSemanticModel(tree); 12792var model = comp.GetSemanticModel(tree); 12975var model = comp.GetSemanticModel(tree); 13150var model = comp.GetSemanticModel(tree); 13205var model = comp.GetSemanticModel(tree); 13264var model = comp.GetSemanticModel(tree); 13307var model = comp.GetSemanticModel(tree); 13336var model = comp.GetSemanticModel(tree); 13361var model = comp.GetSemanticModel(tree); 13381var model = comp.GetSemanticModel(tree); 13403var model = comp.GetSemanticModel(tree); 13438var model = comp.GetSemanticModel(tree); 13502var model = comp.GetSemanticModel(tree); 13578var model = comp.GetSemanticModel(tree); 13649var model = comp.GetSemanticModel(tree); 13713var model = comp.GetSemanticModel(tree); 14354var model = comp.GetSemanticModel(tree); 14396var model = comp.GetSemanticModel(tree); 14521var model = comp.GetSemanticModel(tree); 14597var model = comp.GetSemanticModel(tree); 14842var model = comp.GetSemanticModel(tree); 15050var model = comp.GetSemanticModel(tree); 15076var model = comp.GetSemanticModel(tree); 15131var model = comp.GetSemanticModel(tree); 16549var model = comp.GetSemanticModel(tree); 16590var model = comp.GetSemanticModel(tree); 16629var model = comp.GetSemanticModel(tree); 16725var model = comp.GetSemanticModel(tree); 16773var model = comp.GetSemanticModel(syntaxTree); 17945var model = comp.GetSemanticModel(tree); 22830var model = comp.GetSemanticModel(tree); 22898var model = comp.GetSemanticModel(tree); 23900var model = comp.GetSemanticModel(tree); 23936var model = comp.GetSemanticModel(tree); 23973var model = comp.GetSemanticModel(tree); 24740var model = comp.GetSemanticModel(tree); 24758static (NamedTypeSymbol, LambdaSymbol) getDelegateTypeAndLambda(SemanticModel model, VariableDeclaratorSyntax decl) 26785var model = comp.GetSemanticModel(tree); 26837var model = comp.GetSemanticModel(tree); 26889var model = comp.GetSemanticModel(tree); 27046var model = comp.GetSemanticModel(tree); 27136var model = comp.GetSemanticModel(tree); 27256var model = comp.GetSemanticModel(tree); 27357var model = comp.GetSemanticModel(tree); 27402var model = comp.GetSemanticModel(tree); 27462var model = comp.GetSemanticModel(tree); 27692var model = comp.GetSemanticModel(tree); 27740var model = comp.GetSemanticModel(tree); 28830var model = comp.GetSemanticModel(tree);
Semantics\RefLocalsAndReturnsTests.cs (10)
4752var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4780var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4808var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4836var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4864var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4892var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4926var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 5209var model = comp.GetSemanticModel(tree); 5253var model = comp.GetSemanticModel(tree); 5292var model = comp.GetSemanticModel(tree);
Semantics\ScriptSemanticsTests.cs (11)
237var model = compilation.GetSemanticModel(tree); 497var model = compilation.GetSemanticModel(tree); 509var model = submission.GetSemanticModel(submission.SyntaxTrees.Single()); 520var model = CreateCompilationWithMscorlib461(new[] { tree }).GetSemanticModel(tree, ignoreAccessibility: false); 536var model = CreateCompilationWithMscorlib461(new[] { tree }).GetSemanticModel(tree, ignoreAccessibility: false); 554var model = compilation.GetSemanticModel(tree); 590var model = compilation.GetSemanticModel(tree); 1182var semanticModel = compilation.GetSemanticModel(syntaxTree, true); 1276var semanticModel1 = compilation.GetSemanticModel(syntaxTree1, true); 1277var semanticModel2 = compilation.GetSemanticModel(syntaxTree2, true); 1309var semanticModel = compilation.GetSemanticModel(syntaxTree, true);
Semantics\SemanticErrorTests.cs (1)
3324var model = compilation.GetSemanticModel(tree);
Semantics\StackAllocInitializerTests.cs (9)
365var model = comp.GetSemanticModel(tree); 441var model = comp.GetSemanticModel(tree); 1043var model = comp.GetSemanticModel(tree); 1145var model = comp.GetSemanticModel(tree); 2357var model = comp.GetSemanticModel(tree); 2463var model = comp.GetSemanticModel(tree); 2563var model = comp.GetSemanticModel(tree); 2647var model = comp.GetSemanticModel(tree); 2717var model = comp.GetSemanticModel(tree);
Semantics\StackAllocSpanExpressionsTests.cs (2)
51var model = comp.GetSemanticModel(tree); 125var model = comp.GetSemanticModel(tree);
Semantics\StructConstructorTests.cs (3)
1049var model = comp.GetSemanticModel(tree); 1144var model = comp.GetSemanticModel(tree); 1241var model = comp.GetSemanticModel(tree);
Semantics\SuppressAccessibilityChecksTests.cs (9)
18private static SemanticModel GetSemanticModelWithIgnoreAccessibility() 53var semanticModel = GetSemanticModelWithIgnoreAccessibility(); 71var semanticModel = GetSemanticModelWithIgnoreAccessibility(); 86var semanticModel = GetSemanticModelWithIgnoreAccessibility(); 90SemanticModel speculativeSemanticModel; 121var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 167var semanticModel = compilationB.GetSemanticModel(syntaxTree, ignoreAccessibility: true); 213var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 219SemanticModel speculativeModel;
Semantics\SwitchTests.cs (1)
1153var semanticModel = comp.GetSemanticModel(syntaxTree);
Semantics\TargetTypedConditionalOperatorTests.cs (3)
342var model = comp.GetSemanticModel(tree); 667var model = comp.GetSemanticModel(tree); 688var model = comp.GetSemanticModel(tree);
Semantics\TargetTypedDefaultTests.cs (32)
41var model = comp.GetSemanticModel(tree); 141var model = comp.GetSemanticModel(tree); 193var model = comp.GetSemanticModel(tree); 241var model = comp.GetSemanticModel(tree); 278var model = comp.GetSemanticModel(tree); 323var model = comp.GetSemanticModel(tree); 517var model = comp.GetSemanticModel(tree); 563var model = comp.GetSemanticModel(tree); 606var model = comp.GetSemanticModel(tree); 664var model = comp.GetSemanticModel(tree); 745var model = comp.GetSemanticModel(tree); 834var model = comp.GetSemanticModel(tree); 863var model = comp.GetSemanticModel(tree); 1139var model = comp.GetSemanticModel(tree); 1254var model = comp.GetSemanticModel(tree); 1628var model = comp.GetSemanticModel(tree); 1733var model = comp.GetSemanticModel(tree); 1799var model = comp.GetSemanticModel(tree); 1870var model = comp.GetSemanticModel(tree); 1908var model = comp.GetSemanticModel(tree); 2087var model = comp.GetSemanticModel(tree); 2330var model = comp.GetSemanticModel(tree); 2411var model = comp.GetSemanticModel(tree); 2454var model = comp.GetSemanticModel(tree); 2480var model = comp.GetSemanticModel(tree); 3054var model = comp.GetSemanticModel(tree); 3341var model = comp.GetSemanticModel(tree); 3380var model = comp.GetSemanticModel(tree); 3511var model = comp.GetSemanticModel(tree); 3573var model = comp.GetSemanticModel(tree); 3670var model = comp.GetSemanticModel(tree); 3710var model = comp.GetSemanticModel(tree);
Semantics\TopLevelStatementsTests.cs (69)
189var model1 = comp.GetSemanticModel(tree1); 247static void verifyModelForGlobalStatements(SyntaxTree tree1, SemanticModel model1) 314var model1 = comp.GetSemanticModel(tree1); 352var model2 = comp.GetSemanticModel(tree2); 398static void verifyModelForGlobalStatements(SyntaxTree tree1, SemanticModel model1) 480var model1 = comp.GetSemanticModel(tree1); 499var model2 = comp.GetSemanticModel(tree2); 532var model1 = comp.GetSemanticModel(tree1); 572var model1 = comp.GetSemanticModel(tree1); 697var model = comp.GetSemanticModel(tree); 870var model1 = comp.GetSemanticModel(tree1); 876var model2 = comp.GetSemanticModel(tree2); 984var model1 = comp.GetSemanticModel(tree1); 1039var model1 = comp.GetSemanticModel(tree1); 1406var model2 = comp.GetSemanticModel(tree2); 1522var model1 = comp.GetSemanticModel(tree); 1525var model2 = comp.GetSemanticModel(tree); 1590var model1 = comp.GetSemanticModel(tree); 1597var model2 = comp.GetSemanticModel(tree); 1684var model1 = comp.GetSemanticModel(tree1); 1714var model = comp.GetSemanticModel(tree); 1759void verifyModel(ISymbol declSymbol, SemanticModel model, IdentifierNameSyntax nameRef) 1857var model1 = comp.GetSemanticModel(tree1); 1880var model2 = comp.GetSemanticModel(tree2); 1927void verifyModel(ISymbol declSymbol, SemanticModel model2, IdentifierNameSyntax nameRef) 2083var model1 = comp.GetSemanticModel(tree1); 2140void verifyModel(ISymbol declSymbol, SemanticModel model2, IdentifierNameSyntax nameRef) 2247var model1 = comp.GetSemanticModel(tree1); 2265var model2 = comp.GetSemanticModel(tree2); 2306void verifyModel(ISymbol declSymbol, SemanticModel model2, IdentifierNameSyntax nameRef) 2425var model1 = comp.GetSemanticModel(tree1); 2503void verifyModel(SemanticModel model2, IdentifierNameSyntax nameRef) 2917var model1 = comp.GetSemanticModel(tree1); 2940var model2 = comp.GetSemanticModel(tree2); 3940var model = comp.GetSemanticModel(tree); 3999void verifyModel(ISymbol declSymbol, SemanticModel model, IdentifierNameSyntax nameRef) 4089var model = comp.GetSemanticModel(tree); 4129void verifyModel(SemanticModel model, IdentifierNameSyntax nameRef) 4214var model = comp.GetSemanticModel(tree); 4509var model1 = comp.GetSemanticModel(tree1); 4515var model2 = comp.GetSemanticModel(tree2); 4573var model1 = comp.GetSemanticModel(tree1); 4622var model1 = comp.GetSemanticModel(tree1); 4892var model = comp.GetSemanticModel(tree); 4949var model1 = comp.GetSemanticModel(tree1); 4955var model2 = comp.GetSemanticModel(tree2); 4977var model = comp.GetSemanticModel(tree); 6029var model1 = comp.GetSemanticModel(tree1); 6085var semanticModel = comp.GetSemanticModel(syntaxTree); 6157var semanticModel = comp.GetSemanticModel(syntaxTree); 6234var semanticModel = comp.GetSemanticModel(syntaxTree); 6279var semanticModel = comp.GetSemanticModel(syntaxTree, ignoreAccessibility: true); 6324var semanticModel1 = comp.GetSemanticModel(syntaxTree1, ignoreAccessibility); 6375var semanticModel1 = comp.GetSemanticModel(syntaxTree1, ignoreAccessibility); 6381var semanticModel2 = comp.GetSemanticModel(syntaxTree2, ignoreAccessibility); 6437var model = context.SemanticModel; 6467var model = context.SemanticModel; 6932var model = context.SemanticModel; 7000var model = context.SemanticModel; 7065var model = context.SemanticModel; 7099var model = context.SemanticModel; 8577var model = comp.GetSemanticModel(tree); 8650var model = comp.GetSemanticModel(tree); 8672var model = comp.GetSemanticModel(tree); 8694var model = comp.GetSemanticModel(tree); 9678var model = compilation.GetSemanticModel(tree); 9703var model = compilation.GetSemanticModel(tree); 9707model.TryGetSpeculativeSemanticModel(root.DescendantNodes().Single(n => n is ExpressionStatementSyntax { Parent: GlobalStatementSyntax }).Span.End, nodeToSpeculate, out var speculativeModelInTopLevel); 9712model.TryGetSpeculativeSemanticModel(root.DescendantNodes().Single(n => n is ExpressionStatementSyntax { Parent: BlockSyntax }).Span.End, nodeToSpeculate, out var speculativeModelOutsideTopLevel);
Semantics\TryCatchTests.cs (1)
43var model = compilation.GetSemanticModel(tree);
Semantics\TypeOfTests.cs (1)
32var model = compilation.GetSemanticModel(tree);
Semantics\UnsafeTests.cs (31)
5199var model = compilation.GetSemanticModel(tree); 5381var model = compilation.GetSemanticModel(tree); 6301var model = comp.GetSemanticModel(tree); 6378var model = compilation.GetSemanticModel(tree); 7255var model = compilation.GetSemanticModel(tree); 7292var model = compilation.GetSemanticModel(tree); 7321var model = compilation.GetSemanticModel(tree); 7359var model = compilation.GetSemanticModel(tree); 7402var model = compilation.GetSemanticModel(tree); 7533var model = compilation.GetSemanticModel(tree); 7843var model = compilation.GetSemanticModel(tree); 7910var model = compilation.GetSemanticModel(tree); 8156var model = compilation.GetSemanticModel(tree); 8223var model = compilation.GetSemanticModel(tree); 8281var model = compilation.GetSemanticModel(tree); 8341var model = compilation.GetSemanticModel(tree); 8377var model = compilation.GetSemanticModel(tree); 8853var model = compilation.GetSemanticModel(tree); 8907var model = compilation.GetSemanticModel(tree); 9319var model = compilation.GetSemanticModel(tree); 10175var model = compilation.GetSemanticModel(tree); 10216var model = compilation.GetSemanticModel(tree); 10288var model = compilation.GetSemanticModel(tree); 10624var model = compilation.GetSemanticModel(tree); 10686var model = compilation.GetSemanticModel(tree); 10746var model = compilation.GetSemanticModel(tree); 11303var model = compilation.GetSemanticModel(tree); 11804var model = comp.GetSemanticModel(tree); 11835var model = comp.GetSemanticModel(tree); 11875var model = compilation.GetSemanticModel(tree); 11901var model = comp.GetSemanticModel(tree);
Semantics\UsingStatementTests.cs (7)
58var model = compilation.GetSemanticModel(tree); 1339var model = compilation.GetSemanticModel(tree); 1374var model = compilation.GetSemanticModel(tree); 1851var model = compilation.GetSemanticModel(tree); 1863var model = compilation.GetSemanticModel(tree); 1879var model = compilation.GetSemanticModel(tree); 1893var model = compilation.GetSemanticModel(tree);
Semantics\Utf8StringsLiteralsTests.cs (14)
2969var model = comp.GetSemanticModel(tree); 2997var model = comp.GetSemanticModel(tree); 3025var model = comp.GetSemanticModel(tree); 3053var model = comp.GetSemanticModel(tree); 3081var model = comp.GetSemanticModel(tree); 3109var model = comp.GetSemanticModel(tree); 3137var model = comp.GetSemanticModel(tree); 3165var model = comp.GetSemanticModel(tree); 3193var model = comp.GetSemanticModel(tree); 3221var model = comp.GetSemanticModel(tree); 3249var model = comp.GetSemanticModel(tree); 3277var model = comp.GetSemanticModel(tree); 3305var model = comp.GetSemanticModel(tree); 4079var model = comp.GetSemanticModel(tree);
SourceGeneration\GeneratorDriverTests.cs (1)
4204var model = context.SemanticModel;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1019)
Compilation\CompilationAPITests.cs (6)
883var bind = comp.GetSemanticModel(syntaxTree: t1); 1940var model2 = compilation.GetSemanticModel(tree2); 1954var model2 = compilation.GetSemanticModel(tree2); 2840var semanticModel = compilation.GetSemanticModel(syntaxTree); 2875var semanticModel = compilation.GetSemanticModel(syntaxTree); 2907var semanticModel = compilation.GetSemanticModel(syntaxTree);
Compilation\GetImportScopesTests.cs (13)
23var model = comp.GetSemanticModel(tree); 414var model = comp.GetSemanticModel(tree); 433var model = comp.GetSemanticModel(tree); 455var model = comp.GetSemanticModel(tree); 476var model = comp.GetSemanticModel(tree); 496var model = comp.GetSemanticModel(tree); 512var model = comp.GetSemanticModel(tree); 532var model = comp.GetSemanticModel(tree); 563var model = comp.GetSemanticModel(tree); 588var model = comp.GetSemanticModel(tree); 614var model = comp.GetSemanticModel(tree); 643var model = comp.GetSemanticModel(tree); 676var model = comp.GetSemanticModel(tree);
Compilation\GetSemanticInfoBrokenCodeTests.cs (18)
30var model = comp.GetSemanticModel(tree); 49var model = comp.GetSemanticModel(tree); 72var model = comp.GetSemanticModel(tree); 95var model = comp.GetSemanticModel(tree); 108var model = comp.GetSemanticModel(tree); 133var model = comp.GetSemanticModel(tree); 160var model = comp.GetSemanticModel(tree); 177var model = comp.GetSemanticModel(tree); 198var model = comp.GetSemanticModel(tree); 222var model = comp.GetSemanticModel(tree); 243var model = comp.GetSemanticModel(tree); 265var model = comp.GetSemanticModel(tree); 298var model = comp.GetSemanticModel(tree); 316var model = comp.GetSemanticModel(tree); 331var model = comp.GetSemanticModel(tree); 346var model = comp.GetSemanticModel(tree); 361var model = comp.GetSemanticModel(tree); 371private void VisitAllExpressions(SemanticModel model, SyntaxNode node)
Compilation\GetSemanticInfoTests.cs (136)
41var model = comp.GetSemanticModel(tree); 71var model = comp.GetSemanticModel(tree); 100var model = comp.GetSemanticModel(tree); 134var model = comp.GetSemanticModel(tree); 163var model = comp.GetSemanticModel(tree); 189var model = comp.GetSemanticModel(tree); 240var model = comp.GetSemanticModel(tree); 295var model = comp.GetSemanticModel(tree); 372var model = comp.GetSemanticModel(tree); 414var model = comp.GetSemanticModel(tree); 441var model = comp.GetSemanticModel(tree); 475var model = comp.GetSemanticModel(tree); 528var model = comp.GetSemanticModel(tree); 595var model = comp.GetSemanticModel(tree); 628var model = comp.GetSemanticModel(tree); 645private void CheckIsAssignableTo(SemanticModel model, ExpressionSyntax syntax) 842private void ConversionTestHelper(SemanticModel semanticModel, ExpressionSyntax expr, ConversionKind ept1, ConversionKind ept2) 869private void ConversionTestHelper(SemanticModel semanticModel, ExpressionSyntax expr, ITypeSymbol expsym, ConversionKind expkind) 976var model = compilation.GetSemanticModel(tree); 1000var model = compilation.GetSemanticModel(tree); 1023var model = comp.GetSemanticModel(tree); 1045var model = compilation.GetSemanticModel(tree); 1131var model = comp.GetSemanticModel(tree); 1162var model = comp.GetSemanticModel(tree); 1191var model = comp.GetSemanticModel(tree); 1215var model = comp.GetSemanticModel(tree); 1238var model = comp.GetSemanticModel(tree); 1264var model = comp.GetSemanticModel(tree); 1292var model = comp.GetSemanticModel(tree); 1320var model = comp.GetSemanticModel(tree); 1347var model = comp.GetSemanticModel(tree); 1374var model = comp.GetSemanticModel(tree); 1410var model = comp.GetSemanticModel(tree); 1448var model = comp.GetSemanticModel(tree); 1486var model = comp.GetSemanticModel(tree); 1522var model = comp.GetSemanticModel(tree); 1553var model = comp.GetSemanticModel(tree); 1575var model = comp.GetSemanticModel(tree); 1603var model = comp.GetSemanticModel(tree); 1628var model = comp.GetSemanticModel(tree); 1667var model = comp.GetSemanticModel(tree); 1699var model = comp.GetSemanticModel(tree); 1734var model = comp.GetSemanticModel(tree); 1769var model = comp.GetSemanticModel(tree); 1805var model = comp.GetSemanticModel(tree); 1841var model = comp.GetSemanticModel(tree); 1882var model = comp.GetSemanticModel(tree); 1911var model = comp.GetSemanticModel(tree); 1947var model = comp.GetSemanticModel(tree); 1983var model = comp.GetSemanticModel(tree); 2019var model = comp.GetSemanticModel(tree); 2054var model = comp.GetSemanticModel(tree); 2221var model = comp.GetSemanticModel(tree); 2324var model = comp.GetSemanticModel(tree); 2354var model = comp.GetSemanticModel(tree); 2390var model = comp.GetSemanticModel(tree); 2449var model = comp.GetSemanticModel(tree); 2477var model = comp.GetSemanticModel(tree); 2506var model = comp.GetSemanticModel(tree); 2535var model = comp.GetSemanticModel(tree); 2564var model = compilation.GetSemanticModel(tree); 2718var model = comp.GetSemanticModel(tree); 2789var model = comp.GetSemanticModel(tree); 2835var model = comp.GetSemanticModel(tree); 2865var model = comp.GetSemanticModel(tree); 2926var model = comp.GetSemanticModel(tree); 2958var model = comp.GetSemanticModel(tree); 3018var model = comp.GetSemanticModel(tree); 3050var model = comp.GetSemanticModel(tree); 3092var model = comp.GetSemanticModel(tree); 3124var model = comp.GetSemanticModel(tree); 3166var model = comp.GetSemanticModel(tree); 3198var model = comp.GetSemanticModel(tree); 3241var model = comp.GetSemanticModel(tree); 3271var model = comp.GetSemanticModel(tree); 3325var model = comp.GetSemanticModel(tree); 3391var model = comp.GetSemanticModel(tree); 3464var model = compilation.GetSemanticModel(tree); 3518var model = compilation.GetSemanticModel(tree); 3550var model = compilation.GetSemanticModel(tree); 3578var model = compilation.GetSemanticModel(tree); 3605var model = compilation.GetSemanticModel(tree); 3630var model = compilation.GetSemanticModel(tree); 3663var model = compilation.GetSemanticModel(tree); 3699var model = compilation.GetSemanticModel(tree); 3755var model = compilation.GetSemanticModel(tree); 3783var model = compilation.GetSemanticModel(tree); 3816var model = compilation.GetSemanticModel(tree); 3844var model = compilation.GetSemanticModel(tree); 3870var model = compilation.GetSemanticModel(tree); 3910var model = compilation.GetSemanticModel(tree); 3950var model = compilation.GetSemanticModel(tree); 3996var model = compilation.GetSemanticModel(tree); 4036var model = comp.GetSemanticModel(tree); 4113var model = comp.GetSemanticModel(tree); 4168var model = comp.GetSemanticModel(tree); 4209var model = compilation.GetSemanticModel(tree); 4239var model = compilation.GetSemanticModel(tree); 4269var model = compilation.GetSemanticModel(tree); 4290var model = compilation.GetSemanticModel(tree); 4320var model = compilation.GetSemanticModel(tree); 4353var model = compilation.GetSemanticModel(tree); 4374var model = compilation.GetSemanticModel(tree); 4398var model = compilation.GetSemanticModel(tree); 4434var model = compilation.GetSemanticModel(tree); 4488var model = compilation.GetSemanticModel(tree); 4533var model = compilation.GetSemanticModel(tree); 4587var model = compilation.GetSemanticModel(tree); 4639var model = compilation.GetSemanticModel(tree); 4672var model = comp.GetSemanticModel(tree); 4717var model = comp.GetSemanticModel(tree); 4750var model = comp.GetSemanticModel(tree); 4783var model = comp.GetSemanticModel(tree); 4826var model = comp.GetSemanticModel(tree); 4872var model = comp.GetSemanticModel(tree); 4879SemanticModel speculativeModel; 4908var model = comp.GetSemanticModel(tree); 5401var model = compilation.GetSemanticModel(tree); 5476var model = comp.GetSemanticModel(tree); 5519var model = comp.GetSemanticModel(tree); 5533var model = comp.GetSemanticModel(tree); 5580var model = comp.GetSemanticModel(tree); 5618var model = comp.GetSemanticModel(tree); 5665var model = comp.GetSemanticModel(tree); 5718var model = comp.GetSemanticModel(tree); 5781var model = comp.GetSemanticModel(tree2); 5820var model1 = comp.GetSemanticModel(tree1); 5821var model2 = comp.GetSemanticModel(tree2); 5822var model3 = comp.GetSemanticModel(tree3); 5864var model1 = comp.GetSemanticModel(tree1); 5865var model2 = comp.GetSemanticModel(tree2); 5866var model3 = comp.GetSemanticModel(tree3); 5912var model = comp.GetSemanticModel(tree); 5985var model = comp.GetSemanticModel(tree); 6009var model = compilation.GetSemanticModel(tree); 6044var model = comp.GetSemanticModel(tree);
Compilation\GetUnusedImportDirectivesTests.cs (3)
192var model = comp.GetSemanticModel(tree); 425var model = comp.GetSemanticModel(tree); 453var model = comp.GetSemanticModel(tree);
Compilation\IndexedProperties_BindingTests.cs (1)
138var model = comp.GetSemanticModel(tree);
Compilation\SemanticModelAPITests.cs (178)
41var model = comp.GetSemanticModel(tree); 49model.TryGetSpeculativeSemanticModelForMethodBody(indexerAccess.SpanStart, m2, out var speculativeModel); 108var model = comp.GetSemanticModel(tree); 135var model = comp.GetSemanticModel(tree); 176var model = comp.GetSemanticModel(tree); 203var model = comp.GetSemanticModel(tree); 235var model = comp.GetSemanticModel(tree); 252var model1 = comp.GetSemanticModel(tree); 253var model2 = comp.GetSemanticModel(tree); 272var model1 = comp1.GetSemanticModel(tree); 273var model2 = comp2.GetSemanticModel(tree); 291var model1 = comp.GetSemanticModel(tree); 292var model2 = comp.GetSemanticModel(tree); 311var model1 = comp1.GetSemanticModel(tree); 312var model2 = comp2.GetSemanticModel(tree); 330var model1 = comp.GetSemanticModel(tree); 331var model2 = comp.GetSemanticModel(tree); 349var model1 = comp.GetSemanticModel(tree); 350var model2 = comp.GetSemanticModel(tree); 371var model1 = comp1.GetSemanticModel(tree1); 372var model2 = comp2.GetSemanticModel(tree2); 392var model = comp.GetSemanticModel(tree); 419var model = comp.GetSemanticModel(tree); 535var model = comp.GetSemanticModel(tree); 561var model = comp.GetSemanticModel(tree); 587var model = comp.GetSemanticModel(tree); 610var model = comp.GetSemanticModel(tree); 645var model = compilation.GetSemanticModel(tree1); 676var model = compilation.GetSemanticModel(tree1); 705var model = compilation.GetSemanticModel(tree1); 727var model = comp.GetSemanticModel(tree); 753var model = comp.GetSemanticModel(tree); 815var model = comp.GetSemanticModel(tree); 923var model = comp.GetSemanticModel(tree); 962var model1 = comp.GetSemanticModel(tree1); 963var model2 = comp.GetSemanticModel(tree2); 1003var model1 = comp.GetSemanticModel(tree1); 1004var model2 = comp.GetSemanticModel(tree2); 1040var model = comp.GetSemanticModel(tree); 1071var model = comp.GetSemanticModel(tree); 1112var model = comp.GetSemanticModel(tree); 1156var model = comp.GetSemanticModel(tree); 1192var model = comp.GetSemanticModel(tree); 1230var model = comp.GetSemanticModel(tree); 1263var model = comp2.GetSemanticModel(tree); 1304var model = comp.GetSemanticModel(tree); 1336var model = comp.GetSemanticModel(tree); 1359var model = comp.GetSemanticModel(tree); 1388var model = comp.GetSemanticModel(tree); 1413var model = compilation.GetSemanticModel(tree); 1424SemanticModel speculativeModel; 1458var model = compilation.GetSemanticModel(tree); 1464SemanticModel speculativeModel; 1504var model = compilation.GetSemanticModel(tree); 1513SemanticModel speculativeModel; 1554var model = compilation.GetSemanticModel(tree); 1561SemanticModel speculativeModel; 1592var model = compilation.GetSemanticModel(tree); 1601SemanticModel speculativeModel; 1672var model = compilation.GetSemanticModel(tree); 1683SemanticModel speculativeModel; 1726var model = comp.GetSemanticModel(tree); 1778var model = compilation.GetSemanticModel(tree); 1780SemanticModel speculativeModel; 1829var model = compilation.GetSemanticModel(tree); 1834SemanticModel speculativeModel; 1879var model = compilation.GetSemanticModel(tree); 1881SemanticModel statModel; 1918var model = compilation.GetSemanticModel(tree); 1919SemanticModel statModel; 1955var model = compilation.GetSemanticModel(tree); 1957SemanticModel speculativeModel; 1992var model = compilation.GetSemanticModel(tree); 1994SemanticModel speculativeModel; 2019var model = comp.GetSemanticModel(tree); 2033SemanticModel speculativeModel; 2070var parentModel = comp.GetSemanticModel(tree); 2076SemanticModel speculativeModel; 2139var parentModel = comp.GetSemanticModel(tree); 2145SemanticModel speculativeModel; 2174var model = compilation.GetSemanticModel(tree); 2180SemanticModel speculativeModel; 2219var model = compilation.GetSemanticModel(tree); 2226SemanticModel speculativeModel; 2234SemanticModel newModel; 2259var model = compilation.GetSemanticModel(tree); 2263SemanticModel speculativeModel; 2308var model = comp.GetSemanticModel(tree); 2319SemanticModel speculativeModel; 2350var model = compilation.GetSemanticModel(tree); 2355SemanticModel speculativeModel; 2371var semanticModel = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 2384var semanticModel = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 2389private static void VerifySpeculativeSemanticModelForMethodBody(BlockSyntax blockStatement, SemanticModel speculativeModel) 2446var model = compilation.GetSemanticModel(tree); 2451SemanticModel speculativeModel; 2488var model = compilation.GetSemanticModel(tree); 2493SemanticModel speculativeModel; 2533var model = compilation.GetSemanticModel(tree); 2538SemanticModel speculativeModel; 2563var model = compilation.GetSemanticModel(tree); 2570SemanticModel speculativeModel; 2635var model = compilation.GetSemanticModel(tree); 2642SemanticModel speculativeModel; 2672var model = compilation.GetSemanticModel(tree); 2678SemanticModel speculativeModel; 2691SemanticModel model, 2702SemanticModel speculativeModel; 2763var model = compilation.GetSemanticModel(tree); 2778SemanticModel speculativeModel; 2798var model = compilation.GetSemanticModel(tree); 2813var model = compilation.GetSemanticModel(tree); 2833var model = compilation.GetSemanticModel(tree); 2840SemanticModel speculativeModel; 2864var model = compilation.GetSemanticModel(tree); 2893var model = compilation.GetSemanticModel(tree); 2897SemanticModel speculativeModel; 2931SemanticModel speculativeModel; 2971SemanticModel speculativeModel; 3016SemanticModel speculativeModel; 3093SemanticModel speculativeModel; 3125var model = comp.GetSemanticModel(tree); 3155var model = comp.GetSemanticModel(tree); 3160SemanticModel speculativeModel; 3190var model = comp.GetSemanticModel(tree); 3195SemanticModel speculativeModel; 3220var model = comp.GetSemanticModel(tree); 3225SemanticModel speculativeModel; 3257var model = comp.GetSemanticModel(tree); 3266SemanticModel speculativeModel; 3298var model = comp.GetSemanticModel(tree); 3307SemanticModel speculativeModel; 3339var model = comp.GetSemanticModel(tree); 3373var model = comp.GetSemanticModel(tree); 3383SemanticModel speculativeModel; 3415var model = comp.GetSemanticModel(tree); 3424SemanticModel speculativeModel; 3456var model = comp.GetSemanticModel(tree); 3465SemanticModel speculativeModel; 3497var model = comp.GetSemanticModel(tree); 3522var model = compilation.GetSemanticModel(tree); 3543var model = compilation.GetSemanticModel(tree); 3547SemanticModel model2; 3582var model = comp.GetSemanticModel(tree); 3587SemanticModel speculativeModel; 3612var semanticModel = compilation.GetSemanticModel(tree); 3748var model = comp.GetSemanticModel(tree); 3784var model = comp.GetSemanticModel(tree); 3789Assert.True(model.TryGetSpeculativeSemanticModel(localFunctionBody.Block!.Statements[0].SpanStart + 1, @return, out var specModel)); 3817var model = comp.GetSemanticModel(tree); 3844var model = comp.GetSemanticModel(tree); 3872var model = comp.GetSemanticModel(tree); 3903var model = comp.GetSemanticModel(tree); 4028var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4056var model = compilation.GetSemanticModel(tree); 4084var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4105var model = comp.GetSemanticModel(tree); 4142var model = comp.GetSemanticModel(tree); 4185var model = comp.GetSemanticModel(tree); 4209var model = comp.GetSemanticModel(tree); 4237var model = comp.GetSemanticModel(tree); 4275var model = comp.GetSemanticModel(tree); 4327var model = comp.GetSemanticModel(tree); 4370var semanticModel = compilation.GetSemanticModel(tree); 4425var model = comp.GetSemanticModel(syntaxTree); 4430Assert.True(model.TryGetSpeculativeSemanticModel(ifStatement.SpanStart, replacementIfStatement, out var specModel)); 4459var model = comp.GetSemanticModel(tree); 4474var model = comp.GetSemanticModel(tree); 4538var model = comp.GetSemanticModel(tree); 4626var model = compilation.GetSemanticModel(tree); 4645var model = compilation.GetSemanticModel(tree); 4662var model = compilation.GetSemanticModel(tree); 4677var model = compilation.GetSemanticModel(tree); 4693var model = compilation.GetSemanticModel(tree); 4709var model = compilation.GetSemanticModel(tree); 4728var model = compilation.GetSemanticModel(tree); 4744var model = compilation.GetSemanticModel(tree); 4753var model = compilation.GetSemanticModel(tree);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (164)
39var model = comp.GetSemanticModel(tree); 61var model = comp.GetSemanticModel(tree); 80var model = compilation.GetSemanticModel(tree); 105var model = compilation.GetSemanticModel(tree); 126var model = compilation.GetSemanticModel(tree); 148var model = compilation.GetSemanticModel(tree); 173var model = compilation.GetSemanticModel(tree); 191var model = compilation.GetSemanticModel(tree); 214var model = compilation.GetSemanticModel(tree); 237var model = compilation.GetSemanticModel(tree); 258var model = compilation.GetSemanticModel(tree); 279var model = compilation.GetSemanticModel(tree); 302var model = compilation.GetSemanticModel(tree); 382var model = compilation.GetSemanticModel(tree); 408var model = compilation.GetSemanticModel(tree); 430var model = compilation.GetSemanticModel(tree); 449var model = compilation.GetSemanticModel(tree); 471var model = compilation.GetSemanticModel(tree); 496var model = compilation.GetSemanticModel(tree); 518var model = compilation.GetSemanticModel(tree); 540var model = compilation.GetSemanticModel(tree); 569var model = compilation.GetSemanticModel(tree); 591var model = compilation.GetSemanticModel(tree); 644var model = compilation.GetSemanticModel(tree); 669var model = compilation.GetSemanticModel(tree); 688private void TestAnonymousTypePropertySymbol(SemanticModel model, SyntaxNode node, string name) 777var model = compilation.GetSemanticModel(tree); 799var model = compilation.GetSemanticModel(tree); 823var model = compilation.GetSemanticModel(tree); 839var model = compilation.GetSemanticModel(tree); 859var model = compilation.GetSemanticModel(tree); 883var model = compilation.GetSemanticModel(tree); 903var model = compilation.GetSemanticModel(tree); 936var model = compilation.GetSemanticModel(tree); 1006var model = compilation.GetSemanticModel(tree); 1032var model = compilation.GetSemanticModel(tree); 1057var model = compilation.GetSemanticModel(tree); 1086var model = compilation.GetSemanticModel(tree); 1122var model = compilation.GetSemanticModel(tree); 1176var model = compilation.GetSemanticModel(tree); 1208var model = compilation.GetSemanticModel(tree); 1244var model = compilation.GetSemanticModel(tree); 1278var model = compilation.GetSemanticModel(tree); 1328var model = compilation.GetSemanticModel(tree); 1378var model = compilation.GetSemanticModel(tree); 1431var model = compilation.GetSemanticModel(tree); 1480var model = compilation.GetSemanticModel(tree); 1528var model = compilation.GetSemanticModel(tree); 1556private static ITypeParameterSymbol LookupTypeParameterFromConstraintClause(SemanticModel model, TypeParameterConstraintClauseSyntax constraintSyntax, string name) 1591var model = compilation.GetSemanticModel(tree); 1625var model = compilation.GetSemanticModel(tree); 1663var model = compilation.GetSemanticModel(tree); 1707var model = compilation.GetSemanticModel(tree); 1811var model = compilation.GetSemanticModel(tree); 1867var model = compilation.GetSemanticModel(tree); 1933var model = compilation.GetSemanticModel(tree); 2004var model = compilation.GetSemanticModel(tree); 2048var model = compilation.GetSemanticModel(tree); 2078var model = compilation.GetSemanticModel(tree); 2165var model = compilation.GetSemanticModel(tree); 2254var model = compilation.GetSemanticModel(tree); 2290var model = compilation.GetSemanticModel(tree); 2327var model = compilation.GetSemanticModel(tree); 2363var model = compilation.GetSemanticModel(tree); 2400var model = compilation.GetSemanticModel(tree); 2429var model = compilation.GetSemanticModel(tree); 2461var model = compilation.GetSemanticModel(tree); 2499var model = compilation.GetSemanticModel(tree); 2536var model = compilation.GetSemanticModel(tree); 2565var model = compilation.GetSemanticModel(tree); 2595var model = compilation.GetSemanticModel(tree); 2620var model = compilation.GetSemanticModel(tree); 2643var model = compilation.GetSemanticModel(tree); 2676var model = compilation.GetSemanticModel(tree); 2703var model = compilation.GetSemanticModel(tree); 2761var model = compilation.GetSemanticModel(tree); 2784var model = compilation.GetSemanticModel(tree); 2811var model = compilation.GetSemanticModel(tree); 2840var model = compilation.GetSemanticModel(tree); 2905var model = compilation.GetSemanticModel(tree); 2935var model = compilation.GetSemanticModel(tree); 2967var model = compilation.GetSemanticModel(tree); 3016var model = compilation.GetSemanticModel(tree); 3043var model = compilation.GetSemanticModel(tree); 3073var model = compilation.GetSemanticModel(tree); 3109var model = comp.GetSemanticModel(tree); 3139var model = compilation.GetSemanticModel(tree); 3175var model = compilation.GetSemanticModel(tree); 3215var model = compilation.GetSemanticModel(tree); 3237var model = compilation.GetSemanticModel(tree); 3264var model = compilation.GetSemanticModel(tree); 3316var model = compilation.GetSemanticModel(tree); 3343var model = compilation.GetSemanticModel(tree); 3369var model = compilation.GetSemanticModel(tree); 3386var model = compilation.GetSemanticModel(tree); 3410var model = compilation.GetSemanticModel(tree); 3431var model = compilation.GetSemanticModel(tree); 3450var model = compilation.GetSemanticModel(tree); 3480var model = compilation.GetSemanticModel(tree); 3498var model = compilation.GetSemanticModel(tree); 3526var model = compilation.GetSemanticModel(tree); 3563var model = compilation.GetSemanticModel(tree); 3584var model = compilation.GetSemanticModel(tree); 3609var model = compilation.GetSemanticModel(tree); 3631var model = compilation.GetSemanticModel(tree); 3667var model = compilation.GetSemanticModel(tree); 3684var model = compilation.GetSemanticModel(tree); 3711var model = compilation.GetSemanticModel(tree); 3739var model = compilation.GetSemanticModel(tree); 3751var model2 = compilation.GetSemanticModel(tree2); 3788var model = compilation.GetSemanticModel(tree); 3806var model = compilation.GetSemanticModel(tree); 3825var model = compilation.GetSemanticModel(tree); 3846var semanticModel = compilation.GetSemanticModel(tree); 3874var model2 = compilation.GetSemanticModel(tree); 3900var model = comp.GetSemanticModel(tree); 3921var model = comp.GetSemanticModel(tree); 3967var model = c2.GetSemanticModel(tree2); 3997var model = compilation.GetSemanticModel(tree); 4086var model = compilation.GetSemanticModel(tree); 4125var model = comp.GetSemanticModel(tree); 4167var model = compilation.GetSemanticModel(tree); 4245var parentModel = compilation.GetSemanticModel(tree); 4251SemanticModel speculativeModel; 4414var model = compilation.GetSemanticModel(tree); 4438var model = compilation.GetSemanticModel(tree); 4469var model = compilation.GetSemanticModel(tree); 4500var model = compilation.GetSemanticModel(tree); 4534var model = compilation.GetSemanticModel(tree); 4576var model = compilation.GetSemanticModel(tree); 4603var model = compilation.GetSemanticModel(tree); 4652var model = compilation.GetSemanticModel(tree); 4692var model = compilation.GetSemanticModel(tree); 4707var model = compilation.GetSemanticModel(tree); 4722var model = compilation.GetSemanticModel(tree); 4744var model = compilation.GetSemanticModel(tree); 4770var model = compilation.GetSemanticModel(tree); 4798var model = compilation.GetSemanticModel(tree); 4821var model = compilation.GetSemanticModel(tree); 4844var model = compilation.GetSemanticModel(tree); 4867var model = compilation.GetSemanticModel(tree); 4890var model = compilation.GetSemanticModel(tree); 4913var model = compilation.GetSemanticModel(tree); 4936var model = compilation.GetSemanticModel(tree); 4959var model = compilation.GetSemanticModel(tree); 4994var model = compilation.GetSemanticModel(tree); 5040var model = compilation.GetSemanticModel(tree); 5089var model = compilation.GetSemanticModel(tree); 5112var model = compilation.GetSemanticModel(tree); 5129var model = compilation.GetSemanticModel(tree); 5171var model = compilation.GetSemanticModel(tree); 5204var model = comp.GetSemanticModel(tree); 5221var model = comp.GetSemanticModel(tree); 5242var model = comp.GetSemanticModel(tree); 5263var model = comp.GetSemanticModel(tree); 5301var model = comp.GetSemanticModel(tree); 5352var model = comp.GetSemanticModel(tree); 5396var model = comp.GetSemanticModel(tree); 5444var model = comp.GetSemanticModel(tree); 5487var model = comp.GetSemanticModel(tree); 5538var model = comp.GetSemanticModel(tree); 5582var model = comp.GetSemanticModel(tree); 5630var model = comp.GetSemanticModel(tree); 5643SemanticModel model,
Compilation\SemanticModelGetSemanticInfoTests.cs (15)
1114var model = compilation.GetSemanticModel(tree); 1663var model = compilation.GetSemanticModel(tree); 8267var semanticModel = compilation.GetSemanticModel(tree); 8432var semanticModel = compilation.GetSemanticModel(tree); 8456var semanticModel = compilation.GetSemanticModel(tree); 12124var model = comp.GetSemanticModel(tree); 14485var model = compilation.GetSemanticModel(tree); 14654var model = comp.GetSemanticModel(tree); 14737var model = compilation.GetSemanticModel(tree); 14787var model = compilation.GetSemanticModel(tree); 14883var model = compilation.GetSemanticModel(tree); 14994var model = compilation.GetSemanticModel(tree); 15054var model = compilation.GetSemanticModel(tree); 15372var semanticModel = compilation.GetSemanticModel(tree); 15433var model = compilation.GetSemanticModel(tree);
DocumentationComments\CrefTests.cs (92)
304var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 905var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 1001var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 1100var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 1814var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 2014var model = compilation.GetSemanticModel(crefSyntax.SyntaxTree); 2053var model = compilation.GetSemanticModel(crefSyntax.SyntaxTree); 2107var model = compilation.GetSemanticModel(crefSyntax.SyntaxTree); 2942var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 2964var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 2996var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3071var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3096var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3123var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3154var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3177var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3200var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3223var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3247var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3271var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3295var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3319var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3342var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 3369var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4556var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4574var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4592var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4609var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4645var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4697var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4753var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4785var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4819var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4847var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4874var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4908var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4935var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4977var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5009var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5044var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5086var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5138var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5175var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5197var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5240var model = compilation.GetSemanticModel(tree); 5283var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5309var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5335var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5361var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5400var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5423var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5443var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5469var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5491var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5558var model = compilation.GetSemanticModel(tree); 5595var model = compilation.GetSemanticModel(tree); 5625var model = compilation.GetSemanticModel(tree); 5658var model = compilation.GetSemanticModel(tree); 5696var model = compilation.GetSemanticModel(tree); 5715var model = compilation.GetSemanticModel(tree); 5748var model = compilation.GetSemanticModel(tree); 5791var model = compilation.GetSemanticModel(tree); 5853var model = compilation.GetSemanticModel(cref.SyntaxTree); 5902var model = compilation.GetSemanticModel(cref.SyntaxTree); 5926var model = compilation.GetSemanticModel(cref.SyntaxTree); 5950var model = compilation.GetSemanticModel(cref.SyntaxTree); 5975var model = compilation.GetSemanticModel(cref.SyntaxTree); 5999var model = compilation.GetSemanticModel(cref.SyntaxTree); 6027var model = compilation.GetSemanticModel(cref.SyntaxTree); 6049var model = compilation.GetSemanticModel(typeParameterSyntax.SyntaxTree); 6073var model = compilation.GetSemanticModel(methodNameSyntax.SyntaxTree); 6105var model = compilation.GetSemanticModel(tree); 6140var model = compilation.GetSemanticModel(tree); 6183var model = compilation.GetSemanticModel(tree); 6211var model = compilation.GetSemanticModel(tree); 6241var model = compilation.GetSemanticModel(tree); 6279var model = compilation.GetSemanticModel(tree); 6291SemanticModel speculativeModel; 6338var model = compilation.GetSemanticModel(tree); 6425var model = comp.GetSemanticModel(tree); 6463var model = comp.GetSemanticModel(tree); 6496var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6531var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6558var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6580var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6603var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6645private static ISymbol[] GetCrefOriginalDefinitions(SemanticModel model, IEnumerable<CrefSyntax> crefs) 6671var model = compilation.GetSemanticModel(tree); 6701var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6744var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6894var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 7063var model = comp.GetSemanticModel(comp.SyntaxTrees.Single());
DocumentationComments\DocumentationCommentIDTests.cs (4)
30var model = comp.GetSemanticModel(tree); 143var model = comp.GetSemanticModel(tree); 164var model = comp.GetSemanticModel(tree); 308var model = comp.GetSemanticModel(tree);
DocumentationComments\ParameterTests.cs (27)
34var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 57var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 81var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 105var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 134var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 159var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 184var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 205var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 226var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 247var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 272var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 298var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 326var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 349var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 373var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 404var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 431var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 458var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 485var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 512var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 539var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 566var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 594var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 643var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 690var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 742var model = compilation.GetSemanticModel(tree); 789var model = compilation.GetSemanticModel(tree);
SymbolDisplay\SymbolDisplayTests.cs (30)
2861var model = comp.GetSemanticModel(tree); 3418var model = comp.GetSemanticModel(tree); 5423var model = comp.GetSemanticModel(comp.SyntaxTrees.First()); 5449var model = comp.GetSemanticModel(tree); 5889var model = comp.GetSemanticModel(tree); 6436var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6479var semanticModel = comp.GetSemanticModel(srcTree); 6513var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6575var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6608var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6669var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6702var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6747var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6865var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6903var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6941var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7001var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7073var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7333var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7486var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7514var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7738var model = compilation.GetSemanticModel(tree); 7830var model = compilation.GetSemanticModel(tree); 7890var model = compilation.GetSemanticModel(tree); 7922var model = compilation.GetSemanticModel(tree); 8225var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 8276var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 8311var model = comp.GetSemanticModel(tree); 8702var model = comp.GetSemanticModel(tree); 8758var model = comp.GetSemanticModel(tree);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
1023var semanticModel = compilation.GetSemanticModel(syntaxTree);
Symbols\AnonymousTypesSemanticsTests.cs (1)
2036public SemanticModel Model;
Symbols\AnonymousTypesSymbolTests.cs (3)
1476var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 1639var model = comp.GetSemanticModel(tree); 1680var model = comp.GetSemanticModel(tree);
Symbols\AssemblyAndNamespaceTests.cs (1)
332var model = compilation.GetSemanticModel(tree);
Symbols\CheckedUserDefinedOperatorsTests.cs (5)
7208var model = compilation1.GetSemanticModel(tree); 7280var model = compilation1.GetSemanticModel(tree); 7351var model = compilation1.GetSemanticModel(tree); 7424var model = compilation1.GetSemanticModel(tree); 7488var model = compilation1.GetSemanticModel(tree);
Symbols\ConversionTests.cs (4)
389var model = compilation.GetSemanticModel(tree); 1726var model = comp.GetSemanticModel(tree); 1796var model = comp.GetSemanticModel(tree); 1830var model = comp.GetSemanticModel(tree);
Symbols\CorLibrary\CorTypes.cs (2)
295var model = comp.GetSemanticModel(tree); 360var model = comp1.GetSemanticModel(tree);
Symbols\CovariantReturnTests.cs (2)
378var model = comp.GetSemanticModel(tree); 2620var model = vbComp.GetSemanticModel(vbTree);
Symbols\DestructorTests.cs (1)
405var model = compilation.GetSemanticModel(tree);
Symbols\EnumTests.cs (1)
352var model = comp.GetSemanticModel(tree);
Symbols\ExtensionMethodTests.cs (10)
2432var model = compilation.GetSemanticModel(tree); 2725var model = compilation.GetSemanticModel(tree); 2951var model = compilation.GetSemanticModel(tree); 3009var model = compilation.GetSemanticModel(tree); 3137var model = comp.GetSemanticModel(tree); 3776var model = compilation.GetSemanticModel(syntaxTree); 3864var model = compilation.GetSemanticModel(tree); 3911var model = compilation.GetSemanticModel(tree); 3956var model = compilation.GetSemanticModel(tree); 4006var model = compilation.GetSemanticModel(tree);
Symbols\FunctionPointerTypeSymbolTests.cs (16)
50var model = comp.GetSemanticModel(syntaxTree); 123var model = comp.GetSemanticModel(syntaxTree); 203var model = comp.GetSemanticModel(syntaxTree); 270var model = comp.GetSemanticModel(syntaxTree); 338var model = comp.GetSemanticModel(syntaxTree); 404var model = comp.GetSemanticModel(syntaxTree); 484var model = comp.GetSemanticModel(syntaxTree); 601var model = comp.GetSemanticModel(syntaxTree); 683var model = comp.GetSemanticModel(syntaxTree); 1146var model = comp.GetSemanticModel(syntaxTree); 1257var model = comp.GetSemanticModel(syntaxTree); 1314var model = compilation.GetSemanticModel(syntaxTree); 1425var model = comp.GetSemanticModel(syntaxTree); 1683var model = comp.GetSemanticModel(syntaxTree); 1794var model = comp.GetSemanticModel(syntaxTree); 1924var model = comp.GetSemanticModel(syntaxTree);
Symbols\GenericConstraintTests.cs (2)
7392var model = comp.GetSemanticModel(tree); 7417var model = comp.GetSemanticModel(tree);
Symbols\ImplicitClassTests.cs (2)
71var model = c.GetSemanticModel(tree); 114var model = comp.GetSemanticModel(tree);
Symbols\IndexerTests.cs (9)
1295var model = comp.GetSemanticModel(tree); 2234var model = comp.GetSemanticModel(tree); 2275var model = comp.GetSemanticModel(tree); 2317var model = comp.GetSemanticModel(tree); 2355var model = comp.GetSemanticModel(tree); 2529private static void CheckOverloadResolutionResults(SyntaxTree tree, SemanticModel model, params string[] expected) 2613var model = comp.GetSemanticModel(tree); 2700var model = comp.GetSemanticModel(tree); 2843var model = comp2.GetSemanticModel(tree);
Symbols\LocalFunctionTests.cs (4)
33var semanticModel = compilation.GetSemanticModel(tree); 54var semanticModel = compilation.GetSemanticModel(tree); 75var semanticModel = compilation.GetSemanticModel(tree); 98var semanticModel = compilation.GetSemanticModel(tree);
Symbols\LookupSymbolsInfoTests.cs (1)
94var model = compilation.GetSemanticModel(tree);
Symbols\Metadata\MetadataTypeTests.cs (1)
371var model = currComp.GetSemanticModel(newTree);
Symbols\MethodEqualityTests.cs (1)
206var model = comp.GetSemanticModel(tree);
Symbols\RelaxedShiftOperatorTests.cs (6)
101var model = compilation1.GetSemanticModel(tree); 145var model = compilation1.GetSemanticModel(tree); 189var model = compilation1.GetSemanticModel(tree); 233var model = compilation1.GetSemanticModel(tree); 277var model = compilation1.GetSemanticModel(tree); 321var model = compilation1.GetSemanticModel(tree);
Symbols\RequiredMembersTests.cs (1)
6952var model = comp.GetSemanticModel(tree);
Symbols\Source\BaseClassTests.cs (3)
270var model = comp.GetSemanticModel(tree); 307var model = comp.GetSemanticModel(tree); 2030var model = comp.GetSemanticModel(tree);
Symbols\Source\DeclaringSyntaxNodeTests.cs (6)
44SemanticModel model = compilation.GetSemanticModel(tree); 137var model = comp.GetSemanticModel(tree); 152var model = comp.GetSemanticModel(tree); 259var model = comp.GetSemanticModel(tree); 302var model = comp.GetSemanticModel(tree); 327private void CheckAnonymousType(SemanticModel model, ILocalSymbol local, AnonymousObjectCreationExpressionSyntax anonObjectCreation)
Symbols\Source\DelegateTests.cs (3)
736var model = comp.GetSemanticModel(syntaxTree); 763var model = comp.GetSemanticModel(syntaxTree); 825var model = compilation.GetSemanticModel(tree);
Symbols\Source\EnumTests.cs (1)
956var model = compilation.GetSemanticModel(tree);
Symbols\Source\EventTests.cs (3)
303var semanticModel = compVerifier.Compilation.GetSemanticModel(compVerifier.Compilation.SyntaxTrees.Single()); 433var model = compilation.GetSemanticModel(tree); 479var model = compilation.GetSemanticModel(tree);
Symbols\Source\ExternAliasTests.cs (4)
354var model = comp.GetSemanticModel(tree); 406var model = comp3.GetSemanticModel(tree); 432var model = comp3.GetSemanticModel(tree); 476var model = comp.GetSemanticModel(tree);
Symbols\Source\FileModifierTests.cs (22)
1232var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1366var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1432var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1490var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1804var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1879var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 2595var model = comp.GetSemanticModel(tree); 2635var model = comp.GetSemanticModel(tree); 3504var model = comp.GetSemanticModel(tree); 3555var model = comp.GetSemanticModel(tree); 3611var model = compilation.GetSemanticModel(tree); 3643var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3713var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3775var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3778Assert.True(model.TryGetSpeculativeSemanticModel(position: body.OpenBraceToken.EndPosition, newBody, out var speculativeModel)); 3816var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3819Assert.True(model.TryGetSpeculativeSemanticModel(position: body.OpenBraceToken.EndPosition, newBody, out var speculativeModel)); 3978var model = comp.GetSemanticModel(tree); 4122var model = comp.GetSemanticModel(tree); 4409var model = comp.GetSemanticModel(tree); 4453var model = comp.GetSemanticModel(tree); 4476var model = comp.GetSemanticModel(tree);
Symbols\Source\LocalTests.cs (1)
62var model = compilation.GetSemanticModel(tree);
Symbols\Source\MethodTests.cs (2)
2538var model = comp.GetSemanticModel(syntax); 2569var model = comp.GetSemanticModel(syntax);
Symbols\Source\NullablePublicAPITests.cs (128)
53var model = comp.GetSemanticModel(syntaxTree); 87var model = comp.GetSemanticModel(syntaxTree); 569var semanticModel = comp.GetSemanticModel(syntaxTree); 944var model = comp.GetSemanticModel(syntaxTree); 1001var model = comp.GetSemanticModel(syntaxTree); 1094var model = comp.GetSemanticModel(syntaxTree); 1121var model = comp.GetSemanticModel(syntaxTree); 1169Assert.True(syntaxContext.SemanticModel.TryGetSpeculativeSemanticModel(syntaxContext.Node.SpanStart, newSource, out var specModel)); 1209var model = comp.GetSemanticModel(syntaxTree); 1261var model = comp.GetSemanticModel(syntaxTree); 1359var model = comp.GetSemanticModel(syntaxTree); 1395Assert.True(model.TryGetSpeculativeSemanticModel(spanStart, newSource, out var speculativeModel)); 1439var model = comp.GetSemanticModel(syntaxTree); 1444Assert.True(model.TryGetSpeculativeSemanticModel(returnStatement.SpanStart, newSource, out var specModel)); 1511var model = comp.GetSemanticModel(syntaxTree); 1567var model = comp.GetSemanticModel(syntaxTree); 1624var model = comp.GetSemanticModel(syntaxTree); 1667var model = comp.GetSemanticModel(syntaxTree); 1710var model = comp.GetSemanticModel(syntaxTree); 1792var model = context.SemanticModel; 1849var model = comp.GetSemanticModel(syntaxTree); 1892var model = comp.GetSemanticModel(syntaxTree); 1937var model = comp.GetSemanticModel(syntaxTree); 1984var model = comp.GetSemanticModel(syntaxTree); 2045var model = comp.GetSemanticModel(syntaxTree); 2088var model = comp.GetSemanticModel(syntaxTree); 2131var model = comp.GetSemanticModel(syntaxTree); 2138Assert.True(model.TryGetSpeculativeSemanticModel(s2Assignment.SpanStart, newDeclaration, out var specModel)); 2174var model = comp.GetSemanticModel(syntaxTree); 2216var model = comp.GetSemanticModel(syntaxTree); 2246var model = comp.GetSemanticModel(syntaxTree); 2281var model = comp.GetSemanticModel(syntaxTree); 2325var model = comp.GetSemanticModel(syntaxTree); 2366var model = comp.GetSemanticModel(syntaxTree); 2411var model = comp.GetSemanticModel(syntaxTree); 2451var model = comp.GetSemanticModel(syntaxTree); 2499var model = comp.GetSemanticModel(syntaxTree); 2544var model = comp.GetSemanticModel(syntaxTree); 2593var model = comp.GetSemanticModel(syntaxTree); 2627var model = comp.GetSemanticModel(syntaxTree); 2661var model = comp.GetSemanticModel(syntaxTree); 2699var model = comp.GetSemanticModel(syntaxTree); 2735var model = comp.GetSemanticModel(syntaxTree); 2781var model = comp.GetSemanticModel(syntaxTree); 2824var model = comp.GetSemanticModel(syntaxTree); 2873var model = comp.GetSemanticModel(syntaxTree); 2914var model = comp.GetSemanticModel(syntaxTree); 2955var model = comp.GetSemanticModel(syntaxTree); 2997var model = comp.GetSemanticModel(syntaxTree); 3039var model = comp.GetSemanticModel(syntaxTree); 3099var model = comp.GetSemanticModel(syntaxTree); 3146var model = comp.GetSemanticModel(syntaxTree); 3191var model = comp.GetSemanticModel(syntaxTree); 3256var model = comp.GetSemanticModel(syntaxTree); 3308var model = comp.GetSemanticModel(syntaxTree); 3357var model = comp.GetSemanticModel(syntaxTree); 3404var model = comp.GetSemanticModel(syntaxTree); 3449var model = comp.GetSemanticModel(syntaxTree); 3486var model = comp.GetSemanticModel(syntaxTree); 3535var model = comp.GetSemanticModel(syntaxTree); 3596var model = comp.GetSemanticModel(syntaxTree); 3659var model = comp.GetSemanticModel(syntaxTree); 3696var model = comp.GetSemanticModel(tree); 3701Assert.True(model.TryGetSpeculativeSemanticModel(localFunctionBody.Body!.OpenBraceToken.SpanStart + 1, @return, out var specModel)); 3731var model = comp.GetSemanticModel(tree); 3736Assert.True(model.TryGetSpeculativeSemanticModel(localFunctionBody.Block!.OpenBraceToken.SpanStart + 1, @return, out var specModel)); 3767var model = comp.GetSemanticModel(syntaxTree); 3781Assert.True(model.TryGetSpeculativeSemanticModel(lambda.Body.SpanStart, newStatement, out var speculativeModel)); 3806var model = comp.GetSemanticModel(syntaxTree); 3852var model = comp.GetSemanticModel(syntaxTree); 3911var model = comp.GetSemanticModel(syntaxTree); 3976var model = comp.GetSemanticModel(syntaxTree); 4045var model = comp.GetSemanticModel(syntaxTree); 4066Assert.True(model.TryGetSpeculativeSemanticModel(localFunction.SpanStart, speculativeAttribute, out var speculativeModel)); 4112var model = comp.GetSemanticModel(syntaxTree); 4175var model = comp.GetSemanticModel(syntaxTree); 4209var model = comp.GetSemanticModel(syntaxTree); 4214Assert.True(model.TryGetSpeculativeSemanticModel(attributeUsage.SpanStart, newAttributeUsage, out var specModel)); 4241var model = comp.GetSemanticModel(syntaxTree); 4270var model = comp.GetSemanticModel(syntaxTree); 4304var model = comp.GetSemanticModel(syntaxTree); 4334var model = comp.GetSemanticModel(tree); 4364var model = comp.GetSemanticModel(tree); 4368Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4392var model = comp.GetSemanticModel(tree); 4396Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4420var model = comp.GetSemanticModel(tree); 4426Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4450var model = comp.GetSemanticModel(tree); 4456Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4480var model = comp.GetSemanticModel(tree); 4486Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4510var model = comp.GetSemanticModel(tree); 4518Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(type.SpanStart, methodDeclaration, out var speculativeModel)); 4542var model = comp.GetSemanticModel(tree); 4551Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(type.SpanStart, methodDeclaration, out var speculativeModel)); 4575var model = comp.GetSemanticModel(tree); 4579Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, arrow, out var speculativeModel)); 4603var model = comp.GetSemanticModel(tree); 4609Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, arrow, out var speculativeModel)); 4636var model = comp.GetSemanticModel(tree); 4640Assert.True(model.TryGetSpeculativeSemanticModel(initializer.SpanStart, newInitializer, out var speculativeModel)); 4667var model = comp.GetSemanticModel(tree); 4673Assert.True(model.TryGetSpeculativeSemanticModel(initializer.SpanStart, newInitializer, out var speculativeModel)); 4698var model = comp.GetSemanticModel(tree); 4728var model = comp.GetSemanticModel(tree); 4779var model = comp.GetSemanticModel(syntaxTree); 4814var model = comp.GetSemanticModel(tree); 4848var model = context.SemanticModel; 4900var model = comp.GetSemanticModel(tree); 4912Assert.True(model.TryGetSpeculativeSemanticModel(spanStart, newBody, out var speculativeModel)); 4934var model = comp.GetSemanticModel(tree); 4965var model = comp.GetSemanticModel(tree); 5008var model = comp.GetSemanticModel(tree); 5047var model = comp.GetSemanticModel(tree); 5067var model = comp.GetSemanticModel(tree); 5101var model = comp.GetSemanticModel(tree); 5133var model = comp.GetSemanticModel(tree); 5161var model = comp.GetSemanticModel(tree); 5196var model = comp.GetSemanticModel(tree, options); 5231var model = comp.GetSemanticModel(tree, options); 5252var model = comp.GetSemanticModel(tree); 5275var model = comp.GetSemanticModel(tree); 5307var model = comp.GetSemanticModel(tree); 5330var model = comp.GetSemanticModel(tree); 5352var model = comp.GetSemanticModel(tree); 5397var model = comp.GetSemanticModel(tree); 5454var model = comp.GetSemanticModel(tree);
Symbols\Source\UpdatedContainingSymbolAndNullableAnntotationTests.cs (1)
35var model = comp.GetSemanticModel(syntaxTree);
Symbols\Source\UsingAliasTests.cs (22)
46var model = comp.GetSemanticModel(tree); 103var model = comp.GetSemanticModel(tree); 163var model = comp.GetSemanticModel(tree); 218var model = comp.GetSemanticModel(tree); 273var model = comp.GetSemanticModel(tree); 310var model = comp.GetSemanticModel(tree); 356var model = comp.GetSemanticModel(tree); 387var model = comp.GetSemanticModel(tree); 408var model = comp.GetSemanticModel(tree); 427var model = comp.GetSemanticModel(tree); 446var model = comp.GetSemanticModel(tree); 465var model = comp.GetSemanticModel(tree); 484var model = comp.GetSemanticModel(tree); 505var model = comp.GetSemanticModel(tree); 544var model = comp.GetSemanticModel(syntaxTree); 564var model = comp.GetSemanticModel(syntaxTree); 583var model = comp.GetSemanticModel(syntaxTree); 603var model = comp.GetSemanticModel(syntaxTree); 627var model = comp.GetSemanticModel(syntaxTree); 650var model = comp.GetSemanticModel(syntaxTree); 701var model = compilation.GetSemanticModel(tree); 744var model = compilation.GetSemanticModel(tree);
Symbols\StaticAbstractMembersInInterfacesTests.cs (26)
8452var model = compilation1.GetSemanticModel(tree); 9040var model = compilation1.GetSemanticModel(tree); 9355var model = compilation1.GetSemanticModel(tree); 9754var model = compilation1.GetSemanticModel(tree); 10751var model = compilation1.GetSemanticModel(tree); 10944var model = compilation1.GetSemanticModel(tree); 11134var model = compilation1.GetSemanticModel(tree); 11328var model = compilation1.GetSemanticModel(tree); 11582var model = compilation1.GetSemanticModel(tree); 11959var model = compilation1.GetSemanticModel(tree); 12138var model = compilation1.GetSemanticModel(tree); 13179var model = compilation1.GetSemanticModel(tree); 13265var model = compilation1.GetSemanticModel(tree); 13387var model = compilation1.GetSemanticModel(tree); 14088var model = compilation1.GetSemanticModel(tree); 14713var model = compilation1.GetSemanticModel(tree); 15119var model = compilation1.GetSemanticModel(tree); 15387var model = compilation1.GetSemanticModel(tree); 19559var model = compilation1.GetSemanticModel(tree); 19642var model = compilation1.GetSemanticModel(tree); 19734var model = compilation1.GetSemanticModel(tree); 19823var model = compilation1.GetSemanticModel(tree); 28772var model = compilation1.GetSemanticModel(tree); 30279var model = compilation1.GetSemanticModel(tree); 30470var model = compilation1.GetSemanticModel(tree); 30936var model = compilation1.GetSemanticModel(tree);
Symbols\SymbolEqualityTests.cs (19)
39var model = comp.GetSemanticModel(tree); 82var model = comp.GetSemanticModel(tree); 122var model = comp.GetSemanticModel(tree); 163var model = comp.GetSemanticModel(tree); 414var model = comp.GetSemanticModel(syntaxTree); 452var model = comp.GetSemanticModel(syntaxTree); 483var model = comp.GetSemanticModel(syntaxTree); 526var model = comp.GetSemanticModel(syntaxTree); 557var model = comp.GetSemanticModel(syntaxTree); 593var model = comp.GetSemanticModel(syntaxTree); 628var model = comp.GetSemanticModel(syntaxTree); 677var model = comp.GetSemanticModel(syntaxTree); 729var model = comp.GetSemanticModel(syntaxTree); 779var model = comp.GetSemanticModel(syntaxTree); 830var model = comp.GetSemanticModel(syntaxTree); 891var model = comp.GetSemanticModel(syntaxTree); 936var semanticModel1 = comp.GetSemanticModel(syntaxTree); 937var semanticModel2 = comp.GetSemanticModel(syntaxTree); 960var model = comp.GetSemanticModel(syntaxTree);
Symbols\SymbolExtensionTests.cs (5)
102var model = compilation.GetSemanticModel(tree); 120var model = compilation.GetSemanticModel(tree); 138var model = compilation.GetSemanticModel(tree); 157var model = compilation.GetSemanticModel(tree); 251var model = compilation.GetSemanticModel(tree);
Symbols\TypeTests.cs (3)
1677var model = comp.GetSemanticModel(tree); 1761var model = comp.GetSemanticModel(tree); 1852var model = compilation.GetSemanticModel(tree);
Symbols\UnsignedRightShiftTests.cs (9)
122var model = compilation1.GetSemanticModel(tree); 625var model = compilation1.GetSemanticModel(tree); 1175var model = compilation1.GetSemanticModel(tree); 1583var model = compilation1.GetSemanticModel(tree); 1982var model = compilation1.GetSemanticModel(tree); 2234var model = compilation1.GetSemanticModel(tree); 2376var model = compilation1.GetSemanticModel(tree); 2510var model = compilation1.GetSemanticModel(tree); 2607var model = compilation1.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Syntax\FieldAndValueKeywordTests.cs (1)
1276var model = comp.GetSemanticModel(syntaxTree);
Syntax\LambdaUtilitiesTests.cs (1)
45var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (21)
CompilationTestUtils.cs (6)
226public static SemanticInfoSummary GetSemanticInfoSummary(this SemanticModel semanticModel, SyntaxNode node) 299public static SemanticInfoSummary GetSpeculativeSemanticInfoSummary(this SemanticModel semanticModel, int position, SyntaxNode node, SpeculativeBindingOption bindingOption) 341public static List<string> LookupNames(this SemanticModel model, int position, INamespaceOrTypeSymbol container = null, bool namespacesAndTypesOnly = false, bool useBaseReferenceAccessibility = false) 353internal static TypeInfo GetTypeInfoAndVerifyIOperation(this SemanticModel model, SyntaxNode expression) 392static IOperation getOperation(SemanticModel model, SyntaxNode expression) 463var model = compilation.GetSemanticModel(tree);
CSharpTestBase.cs (8)
1648public Tuple<TNode, SemanticModel> GetBindingNodeAndModel<TNode>(CSharpCompilation compilation, int treeIndex = 0) where TNode : SyntaxNode 1651return new Tuple<TNode, SemanticModel>(node, compilation.GetSemanticModel(compilation.SyntaxTrees[treeIndex])); 1654public Tuple<TNode, SemanticModel> GetBindingNodeAndModel<TNode>(Compilation compilation, int treeIndex = 0) where TNode : SyntaxNode 1659public Tuple<IList<TNode>, SemanticModel> GetBindingNodesAndModel<TNode>(CSharpCompilation compilation, int treeIndex = 0, int which = -1) where TNode : SyntaxNode 1662return new Tuple<IList<TNode>, SemanticModel>(nodes, compilation.GetSemanticModel(compilation.SyntaxTrees[treeIndex])); 2027var model = compilation.GetSemanticModel(tree); 2077protected static void VerifyOperationTreeForNode(CSharpCompilation compilation, SemanticModel model, SyntaxNode syntaxNode, string expectedOperationTree) 2100var model = compilation.GetSemanticModel(syntaxNode.SyntaxTree);
FunctionPointerUtilities.cs (3)
136SemanticModel model, 236static void verifyNestedFunctionPointerSyntaxSemanticInfo(SemanticModel model, IFunctionPointerTypeSymbol ptrType, SeparatedSyntaxList<FunctionPointerParameterSyntax> paramSyntaxes) 252static void assertEqualSemanticInformation(SemanticModel model, TypeSyntax typeSyntax, ITypeSymbol signatureType)
SemanticModelTestBase.cs (4)
98var model = compilation.GetSemanticModel(tree); 129var model = compilation.GetSemanticModel(tree); 139var model = compilation.GetSemanticModel(tree); 155var model = compilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
CodeGen\WinMdEventTests.cs (1)
670var model = comp.GetSemanticModel(tree);
CodeGen\WinRTCollectionTests.cs (1)
7422var model = comp.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Workspaces (308)
CaseCorrection\CSharpCaseCorrectionService.cs (1)
27SemanticModel? semanticModel,
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (1)
23SemanticModel semanticModel,
Classification\SyntaxClassification\FunctionPointerUnmanagedCallingConventionClassifier.cs (1)
24SemanticModel semanticModel,
Classification\SyntaxClassification\NameSyntaxClassifier.cs (2)
27SemanticModel semanticModel, 47SemanticModel semanticModel,
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.cs (1)
29SemanticModel semanticModel,
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (1)
29SemanticModel semanticModel,
Classification\SyntaxClassification\UsingDirectiveSyntaxClassifier.cs (2)
21SemanticModel semanticModel, 36SemanticModel semanticModel,
ExternalAccess\Pythia\Api\PythiaSymbolExtensions.cs (1)
35public static bool IsAwaitableNonDynamic(this ISymbol? symbol, SemanticModel semanticModel, int position)
Recommendations\CSharpRecommendationServiceRunner.cs (1)
863private ITypeSymbol? GetContainerForUnnamedSymbols(SemanticModel semanticModel, ExpressionSyntax originalExpression)
Rename\CSharpRenameRewriterLanguageService.cs (5)
58private readonly SemanticModel _semanticModel; 106private SemanticModel? _speculativeModel; 1030SemanticModel semanticModel, 1246public static SemanticModel? GetSemanticModelForNode(SyntaxNode node, SemanticModel originalSemanticModel)
SemanticModelReuse\CSharpSemanticModelReuseLanguageService.cs (3)
55protected override SemanticModel? TryGetSpeculativeSemanticModelWorker(SemanticModel previousSemanticModel, SyntaxNode previousBodyNode, SyntaxNode currentBodyNode) 60previousSemanticModel.TryGetSpeculativeSemanticModelForMethodBody(previousBaseMethod.Body.SpanStart, currentBaseMethod, out var speculativeModel))
Simplification\CSharpSimplificationService.cs (5)
52public override SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken) 77public override SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken) 169protected override SemanticModel GetSpeculativeSemanticModel(ref SyntaxNode nodeToSpeculate, SemanticModel originalSemanticModel, SyntaxNode originalNode) 185protected override void GetUnusedNamespaceImports(SemanticModel model, HashSet<SyntaxNode> namespaceImports, CancellationToken cancellationToken)
Simplification\CSharpSimplificationService.Expander.cs (4)
46private readonly SemanticModel _semanticModel; 53SemanticModel semanticModel, 787private static bool IsInvocationWithDynamicArguments(SimpleNameSyntax originalSimpleName, SemanticModel semanticModel) 1021private bool IsTypeOfUnboundGenericType(SemanticModel semanticModel, TypeOfExpressionSyntax typeOfExpression)
Simplification\Reducers\AbstractCSharpReducer.AbstractReductionRewriter.cs (4)
27protected SemanticModel? SemanticModel { get; private set; } 126Func<TNode, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> simplifier) 159protected SyntaxToken SimplifyToken(SyntaxToken token, Func<SyntaxToken, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxToken> simplifier) 188public SyntaxNodeOrToken VisitNodeOrToken(SyntaxNodeOrToken nodeOrToken, SemanticModel semanticModel, bool simplifyAllDescendants)
Simplification\Reducers\CSharpCastReducer.cs (2)
29private static readonly Func<CastExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, ExpressionSyntax> s_simplifyCast = SimplifyCast; 31private static ExpressionSyntax SimplifyCast(CastExpressionSyntax node, SemanticModel semanticModel, SimplifierOptions options, CancellationToken cancellationToken)
Simplification\Reducers\CSharpDefaultExpressionReducer.Rewriter.cs (2)
25private readonly Func<DefaultExpressionSyntax, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> _simplifyDefaultExpression; 29SemanticModel semanticModel,
Simplification\Reducers\CSharpEscapingReducer.cs (2)
23private static readonly Func<SyntaxToken, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxToken> s_simplifyIdentifierToken = SimplifyIdentifierToken; 34SemanticModel semanticModel,
Simplification\Reducers\CSharpExtensionMethodReducer.cs (3)
23private static readonly Func<InvocationExpressionSyntax, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> s_simplifyExtensionMethod = SimplifyExtensionMethod; 34SemanticModel semanticModel, 53private static InvocationExpressionSyntax TryReduceExtensionMethod(InvocationExpressionSyntax node, SemanticModel semanticModel, InvocationExpressionSyntax rewrittenNode, SimpleNameSyntax expressionName)
Simplification\Reducers\CSharpInferredMemberNameReducer.Rewriter.cs (4)
27private readonly Func<ArgumentSyntax, SemanticModel, SimplifierOptions, CancellationToken, ArgumentSyntax> s_simplifyTupleName; 29private ArgumentSyntax SimplifyTupleName(ArgumentSyntax node, SemanticModel semanticModel, SimplifierOptions options, CancellationToken cancellationToken) 39private static readonly Func<AnonymousObjectMemberDeclaratorSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyAnonymousTypeMemberName = SimplifyAnonymousTypeMemberName; 41private static SyntaxNode SimplifyAnonymousTypeMemberName(AnonymousObjectMemberDeclaratorSyntax node, SemanticModel semanticModel, SimplifierOptions options, CancellationToken canellationToken)
Simplification\Reducers\CSharpMiscellaneousReducer.cs (7)
25private static readonly Func<ParameterSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyParameter = SimplifyParameter; 36SemanticModel semanticModel, 69SemanticModel semanticModel, 83private static readonly Func<ParenthesizedLambdaExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyParenthesizedLambdaExpression = SimplifyParenthesizedLambdaExpression; 87SemanticModel semanticModel, 111private static readonly Func<BlockSyntax, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> s_simplifyBlock = SimplifyBlock; 115SemanticModel semanticModel,
Simplification\Reducers\CSharpNameReducer.cs (2)
22private static readonly Func<SyntaxNode, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> s_simplifyName = SimplifyName; 33SemanticModel semanticModel,
Simplification\Reducers\CSharpNullableAnnotationReducer.cs (2)
21private static readonly Func<NullableTypeSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyNullableType = SimplifyNullableType; 32SemanticModel semanticModel,
Simplification\Reducers\CSharpParenthesizedExpressionReducer.cs (2)
21private static readonly Func<ParenthesizedExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyParentheses = SimplifyParentheses; 32SemanticModel semanticModel,
Simplification\Reducers\CSharpParenthesizedPatternReducer.cs (2)
23private static readonly Func<ParenthesizedPatternSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyParentheses = SimplifyParentheses; 34SemanticModel semanticModel,
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (12)
30private static readonly ConditionalWeakTable<SemanticModel, StrongBox<bool>> s_modelToHasUsingAliasesMap = new(); 37protected static SyntaxToken? TryGetPredefinedKeywordToken(SemanticModel semanticModel, SpecialType specialType) 77ExpressionSyntax node, SemanticModel semanticModel, 200private static bool HasUsingAliases(SemanticModel semanticModel, CancellationToken cancellationToken) 215private static bool ComputeHasUsingAliases(SemanticModel model, CancellationToken cancellationToken) 261private static bool ValidateAliasForTarget(IAliasSymbol aliasReplacement, SemanticModel semanticModel, ExpressionSyntax node, ISymbol symbol) 314private static IAliasSymbol GetAliasForSymbol(INamespaceOrTypeSymbol symbol, SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 337private static int? GetNamespaceIdForAliasSearch(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 364private static SyntaxNode GetStartNodeForNamespaceId(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 383protected static bool InsideNameOfExpression(ExpressionSyntax expression, SemanticModel semanticModel) 397protected static bool PreferPredefinedTypeKeywordInMemberAccess(ExpressionSyntax expression, CSharpSimplifierOptions options, SemanticModel semanticModel) 407ExpressionSyntax expression, ExpressionSyntax simplifiedNode, SemanticModel semanticModel)
Simplification\Simplifiers\ExpressionSimplifier.cs (10)
32SemanticModel semanticModel, 65SemanticModel semanticModel, 88SemanticModel semanticModel, 222SemanticModel semanticModel, 259SemanticModel semanticModel, 273SemanticModel semanticModel, 316SemanticModel semanticModel, 367SemanticModel semanticModel, MemberAccessExpressionSyntax memberAccess, CancellationToken cancellationToken) 391private static bool AccessMethodWithDynamicArgumentInsideStructConstructor(MemberAccessExpressionSyntax memberAccess, SemanticModel semanticModel) 407SemanticModel semanticModel,
Simplification\Simplifiers\MemberAccessExpressionSimplifier.cs (1)
31SemanticModel semanticModel, MemberAccessExpressionSyntax memberAccessExpression, CancellationToken cancellationToken)
Simplification\Simplifiers\NameSimplifier.cs (10)
35SemanticModel semanticModel, 371SemanticModel semanticModel, CancellationToken cancellationToken) 401private static bool CanSimplifyNullable(INamedTypeSymbol type, NameSyntax name, SemanticModel semanticModel) 460SemanticModel semanticModel, 580NameSyntax name, TypeSyntax reducedName, SemanticModel semanticModel) 615private static bool CanReplaceWithReducedName(NameSyntax name, TypeSyntax reducedName, SemanticModel semanticModel, CancellationToken cancellationToken) 678private static bool IsNonReducableQualifiedNameInUsingDirective(SemanticModel model, NameSyntax name) 686private static bool IsQualifiedNameInUsingDirective(SemanticModel model, NameSyntax name) 715private static bool IsInScriptClass(SemanticModel model, NameSyntax name) 731private static bool PreferPredefinedTypeKeywordInDeclarations(NameSyntax name, CSharpSimplifierOptions options, SemanticModel semanticModel)
Simplification\Simplifiers\QualifiedCrefSimplifier.cs (3)
26SemanticModel semanticModel, 71QualifiedCrefSyntax crefSyntax, SemanticModel semanticModel, 78QualifiedCrefSyntax crefSyntax, SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (2)
32SemanticModel semanticModel, 118SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
41SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
24SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DefaultExpressionSyntaxExtensions.cs (3)
22SemanticModel semanticModel, 38DefaultExpressionSyntax defaultExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 83DefaultExpressionSyntax defaultExpression, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (4)
321SemanticModel semanticModel, 424[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 454[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 465this ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (3)
21this ParenthesizedExpressionSyntax node, SemanticModel semanticModel, CancellationToken cancellationToken) 301SemanticModel semanticModel, CancellationToken cancellationToken) 368ParenthesizedExpressionSyntax node, ExpressionSyntax parentExpression, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (16)
23this SemanticModel semanticModel, 40this SemanticModel semanticModel, 103this SemanticModel semanticModel, 128public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token) 161public static ISet<INamespaceSymbol> GetUsingNamespacesInScope(this SemanticModel semanticModel, SyntaxNode location) 184this SemanticModel semanticModel, 319this SemanticModel semanticModel, 353this SemanticModel semanticModel, ExpressionSyntax expression, 426SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 456public static INamedTypeSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, BaseTypeDeclarationSyntax syntax, CancellationToken cancellationToken) 462public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ConstructorDeclarationSyntax syntax, CancellationToken cancellationToken) 468public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, LocalFunctionStatementSyntax syntax, CancellationToken cancellationToken) 474public static IParameterSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ParameterSyntax syntax, CancellationToken cancellationToken) 480public static IPropertySymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, PropertyDeclarationSyntax syntax, CancellationToken cancellationToken) 486public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, VariableDeclaratorSyntax syntax, CancellationToken cancellationToken) 492public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SingleVariableDesignationSyntax syntax, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
786SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
26public static bool IsTypeInferred(this TypeSyntax typeSyntax, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\VariableDeclaratorExtensions.cs (1)
23public static bool IsTypeInferred(this VariableDeclaratorSyntax variable, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Helpers\RemoveUnnecessaryImports\CSharpUnnecessaryImportsProvider.cs (1)
24SemanticModel model,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (29)
40public bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 43public bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 46public bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 49public bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 52public bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 55public bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken) 58public ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 111SemanticModel oldSemanticModel, 114[NotNullWhen(true)] out SemanticModel? speculativeModel) 118var model = oldSemanticModel; 128public ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken) 169public ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement) 187public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 190public IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 201public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 213public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 251SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 268public IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 271public IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 275public ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 278public ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 283public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken) 296static ImmutableArray<ISymbol> GetCallingConventionSymbols(SemanticModel model, FunctionPointerUnmanagedCallingConventionSyntax syntax) 305/// cref="ModelExtensions.GetSymbolInfo(SemanticModel, SyntaxNode, CancellationToken)"/>, but sometimes employs 309private static ImmutableArray<ISymbol> GetSymbolInfo(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 378public bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 386var semanticModel = compilation.GetSemanticModel(syntaxReference.SyntaxTree); 402public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken) 405public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (34)
45public static bool IsUnnecessaryCast(ExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 53public static bool IsUnnecessaryAsCast(BinaryExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 60public static bool IsUnnecessaryCast(CastExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 114SemanticModel semanticModel, 146SemanticModel semanticModel, 171SemanticModel originalSemanticModel, CancellationToken cancellationToken) 242SemanticModel originalSemanticModel, IDelegateCreationOperation originalDelegateCreationOperation, 282SemanticModel originalSemanticModel, IConversionOperation originalConversionOperation, 569SemanticModel originalSemanticModel, 633ExpressionSyntax castNode, ExpressionSyntax castedExpressionNode, SemanticModel semanticModel, CancellationToken cancellationToken) 720ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, 787ExpressionSyntax castNode, SemanticModel originalSemanticModel, 788ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, CancellationToken cancellationToken) 868SemanticModel semanticModel, 944SemanticModel semanticModel, 1003SemanticModel semanticModel, CancellationToken cancellationToken) 1070private static bool IsFieldOrArrayElement(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 1077ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 1091SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1144SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1178SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel) 1209SemanticModel originalSemanticModel, 1210SemanticModel rewrittenSemanticModel, 1318SemanticModel originalSemanticModel, 1319SemanticModel rewrittenSemanticModel, 1358SemanticModel semanticModel, 1396MemberAccessExpressionSyntax memberAccessExpression, SemanticModel semanticModel, 1452SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1474private static (SemanticModel? rewrittenSemanticModel, ExpressionSyntax? rewrittenExpression) GetSemanticModelWithCastRemoved( 1477SemanticModel originalSemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (17)
58SemanticModel semanticModel, 104protected override void ValidateSpeculativeSemanticModel(SemanticModel speculativeSemanticModel, SyntaxNode nodeToSpeculate) 113protected override SemanticModel CreateSpeculativeSemanticModel(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel) 116public static SemanticModel CreateSpeculativeSemanticModelForNode(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel) 123public static SemanticModel CreateSpeculativeSemanticModelForNode(SyntaxNode nodeToSpeculate, SemanticModel semanticModel, int position, bool isInNamespaceOrTypeContext) 134SemanticModel speculativeModel; 654protected override bool IsForEachTypeInferred(CommonForEachStatementSyntax forEachStatement, SemanticModel semanticModel) 813protected override bool ConversionsAreCompatible(SemanticModel originalModel, ExpressionSyntax originalExpression, SemanticModel newModel, ExpressionSyntax newExpression) 877protected override bool ForEachConversionsAreCompatible(SemanticModel originalModel, CommonForEachStatementSyntax originalForEach, SemanticModel newModel, CommonForEachStatementSyntax newForEach) 886SemanticModel model, 934protected override Conversion ClassifyConversion(SemanticModel model, ExpressionSyntax expression, ITypeSymbol targetType) 937protected override Conversion ClassifyConversion(SemanticModel model, ITypeSymbol originalType, ITypeSymbol targetType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (8)
19private readonly SemanticModel _semanticModel; 38public TypeStyleResult(CSharpTypeStyleHelper helper, TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, bool isStylePreferred, NotificationOption2 notificationOption, CancellationToken cancellationToken) : this() 59TypeSyntax typeName, SemanticModel semanticModel, 77TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken); 80SyntaxToken identifier, TypeSyntax typeName, ExpressionSyntax initializer, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken); 82internal TypeSyntax? FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 115protected virtual bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 118protected virtual bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.State.cs (4)
31SyntaxNode declaration, SemanticModel semanticModel, 65private static bool IsTypeApparentInDeclaration(VariableDeclarationSyntax variableDeclaration, SemanticModel semanticModel, UseVarPreference stylePreferences, CancellationToken cancellationToken) 92private static bool IsPredefinedTypeInDeclaration(SyntaxNode declarationStatement, SemanticModel semanticModel) 131private static bool IsInferredPredefinedType(SyntaxNode declarationStatement, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (4)
54protected override bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 67TypeSyntax typeName, SemanticModel semanticModel, 118protected override bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken) 141SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (8)
30TypeSyntax typeName, SemanticModel semanticModel, 60protected override bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 92TypeSyntax typeName, SemanticModel semanticModel, 172SemanticModel semanticModel, 202var newSemanticModel = semanticModel.Compilation.ReplaceSyntaxTree(tree, newTree).GetSemanticModel(newTree); 211private static bool IsSafeToSwitchToVarWithoutNeedingSpeculation(DeclarationExpressionSyntax declarationExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 274SemanticModel semanticModel, 346protected override bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (5)
28protected override INamespaceSymbol? GetExplicitNamespaceSymbol(SyntaxNode node, SemanticModel model) 42SemanticModel model, 52private static INamespaceSymbol? GetExplicitNamespaceSymbol(ExpressionSyntax fullName, ExpressionSyntax namespacePart, SemanticModel model) 79private readonly SemanticModel _model; 100SemanticModel model,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (3)
52SemanticModel semanticModel, 179public static CSharpSyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 183Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContextService.cs (1)
18public SyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
686public static bool IsNumericTypeContext(this SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (9)
617SemanticModel? semanticModel = null) 718this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, SemanticModel? semanticModel = null) 963SemanticModel? semanticModelOpt = null) 1713SemanticModel? semanticModelOpt = null) 1999public static bool IsInstanceContext(this SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken) 2168SemanticModel? semanticModel = null) 2741public static bool IsNameOfContext(this SyntaxTree syntaxTree, int position, SemanticModel? semanticModelOpt = null, CancellationToken cancellationToken = default) 2809SemanticModel semanticModel, 3000public static bool IsEnumTypeMemberAccessContext(this SyntaxTree syntaxTree, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
105SemanticModel semanticModel, 168SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (2)
18SemanticModel semanticModel, 24public static ITypeSymbol DetermineParameterType(ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
113public static async Task<ISymbol?> FindApplicableAliasAsync(this ITypeSymbol type, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (7)
21public static INamespaceSymbol GetDeclaredSymbol(this SemanticModel semanticModel, BaseNamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default) 35this SemanticModel semanticModel, 44this SemanticModel semanticModel, 53this SemanticModel semanticModel, 76this SemanticModel semanticModel, 98this SemanticModel semanticModel, ArgumentSyntax argument, CancellationToken cancellationToken) 111this SemanticModel semanticModel, AttributeArgumentSyntax argument, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
71public static IEnumerable<BaseTypeSyntax> GetAllBaseListTypes(this TypeDeclarationSyntax typeNode, SemanticModel model, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
16public static bool IsPotentialTypeName([NotNullWhen(true)] this TypeSyntax? typeSyntax, SemanticModel? semanticModelOpt, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (13)
40protected override IEnumerable<ISymbol> GetCollidableSymbols(SemanticModel semanticModel, SyntaxNode location, SyntaxNode container, CancellationToken cancellationToken) 73public bool IsExpressionContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 81public bool IsStatementContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 87public bool IsTypeContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 90public bool IsNamespaceContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 93public bool IsNamespaceDeclarationNameContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 96public bool IsTypeDeclarationContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 102public bool IsMemberDeclarationContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 108public bool IsGlobalStatementContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 111public bool IsLabelContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 114public bool IsAttributeNameContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken) 117public CommonConversion ClassifyConversion(SemanticModel semanticModel, SyntaxNode expression, ITypeSymbol destination) 122public IMethodSymbol? TryGetDisposeMethod(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.cs (1)
27protected override AbstractTypeInferrer CreateTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (23)
30SemanticModel semanticModel, 101var typeInfo = SemanticModel.GetTypeInfo(node, CancellationToken); 102var symbolInfo = SemanticModel.GetSymbolInfo(node, CancellationToken); 192var syntaxTree = SemanticModel.SyntaxTree; 387var info = SemanticModel.GetSymbolInfo(initializer, CancellationToken); 434var info = SemanticModel.GetTypeInfo(creation, CancellationToken); 459var info = SemanticModel.GetSymbolInfo(invocation, CancellationToken); 471SemanticModel.GetMemberGroup(invocation.Expression, CancellationToken) 483var typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken); 542var info = SemanticModel.GetSymbolInfo(attribute, CancellationToken); 550var info = SemanticModel.GetTypeInfo(elementAccess.Expression, CancellationToken); 1205SemanticModel.GetDeclaredSymbol(equalsValue.Parent, CancellationToken) is IParameterSymbol parameter) 1217var typeInfo = SemanticModel.GetTypeInfo(propertyDeclaration.Type); 1295var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(initializerExpression).GetAllSymbols(); 1313var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expressionOpt).GetAllSymbols(); 1404var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expressionOpt).GetAllSymbols(); 1520_ when SemanticModel.GetOperation(pattern, CancellationToken) is IPatternOperation patternOperation => 1537var typeInfo = SemanticModel.GetTypeInfo(recursivePattern); 1810SemanticModel.GetSymbolInfo(identifierName.Identifier).Symbol?.Kind == SymbolKind.Parameter) 2037var currentSemanticModel = SemanticModel; 2162var symbol = SemanticModel.GetDeclaredSymbol(variableDeclarator); 2208var descendantSymbol = SemanticModel.GetSymbolInfo(descendant, CancellationToken).GetAnySymbol(); 2237var symbol = SemanticModel.GetRequiredDeclaredSymbol(designation, CancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (3)
18/// <see cref="IsSymbolAssignedPossiblyNullValue(SemanticModel, IOperation, ISymbol)"/>. Note 22public static bool IsDeclaredSymbolAssignedPossiblyNullValue(SemanticModel semanticModel, SyntaxNode declarationSyntax, CancellationToken cancellationToken) 45public static bool? IsSymbolAssignedPossiblyNullValue(SemanticModel semanticModel, IOperation operation, ISymbol symbol)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\AddImportsTests.cs (1)
45var model = await doc.GetSemanticModelAsync();
CodeGeneration\SyntaxGeneratorTests.cs (1)
4991var semanticModel = compilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.EditorFeatures (1)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (1)
212var semanticModel = await documentWithOriginalName.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
Completion\AbstractArgumentProviderTests`1.cs (1)
75private IParameterSymbol GetParameterSymbolInfo(Workspace workspace, SemanticModel semanticModel, SyntaxNode root, int position, CancellationToken cancellationToken)
Semantics\SpeculationAnalyzerTestsBase.cs (2)
42var initialModel = initialCompilation.GetSemanticModel(initialTree); 67protected abstract bool ReplacementChangesSemantics(SyntaxNode initialNode, SyntaxNode replacementNode, SemanticModel initialModel);
TypeInferrer\TypeInferrerTestBase.cs (2)
40/// Specifies the test is going to call into <see cref="ITypeInferenceService.InferTypes(SemanticModel, SyntaxNode, string, System.Threading.CancellationToken)"/>. 45/// Specifies the test is going to call into <see cref="ITypeInferenceService.InferTypes(SemanticModel, int, string, System.Threading.CancellationToken)"/>.
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (38)
CodeGeneration\CodeGenerationTests.cs (35)
59Func<SemanticModel, ITypeSymbol> type = null, 105ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 139Func<SemanticModel, ImmutableArray<IMethodSymbol>> getExplicitInterfaces = null, 141ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 184ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 224ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 266Func<SemanticModel, IParameterSymbol> fromType, 322ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters, 343ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 374ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 376Func<SemanticModel, ImmutableArray<IEventSymbol>> getExplicitInterfaceImplementations = null, 418ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 511ImmutableArray<Func<SemanticModel, ISymbol>> members = default, 570Func<SemanticModel, ITypeSymbol> getType = null, 571ImmutableArray<Func<SemanticModel, ISymbol>> getNewMembers = default, 632var semanticModel = await testContext.Solution 655internal static Func<SemanticModel, IParameterSymbol> Parameter(Type type, string name, bool hasDefaultValue = false, object defaultValue = null, bool isParams = false) 662internal static Func<SemanticModel, IParameterSymbol> Parameter(string typeFullName, string parameterName, bool hasDefaultValue = false, object defaultValue = null, bool isParams = false, int typeArrayRank = 0) 678internal static ImmutableArray<Func<SemanticModel, IParameterSymbol>> Parameters(params Func<SemanticModel, IParameterSymbol>[] p) 681internal static ImmutableArray<Func<SemanticModel, ISymbol>> Members(params Func<SemanticModel, ISymbol>[] m) 684internal static Func<SemanticModel, ITypeSymbol> CreateArrayType(Type type, int rank = 1) 687private static ImmutableArray<IParameterSymbol> GetParameterSymbols(ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters, TestContext context) 693Func<SemanticModel, ImmutableArray<IMethodSymbol>> explicitInterface, TestContext context) 698private static ImmutableArray<ISymbol> GetSymbols(ImmutableArray<Func<SemanticModel, ISymbol>> members, TestContext context) 705private static Func<SemanticModel, ISymbol> CreateEnumField(string name, object value) 712internal static Func<SemanticModel, ISymbol> CreateField(Accessibility accessibility, Editing.DeclarationModifiers modifiers, Type type, string name) 719private static Func<SemanticModel, INamedTypeSymbol> GetTypeSymbol(Type type) 722private static Func<SemanticModel, INamedTypeSymbol> GetTypeSymbol(string typeMetadataName) 843public SemanticModel SemanticModel; 858SemanticModel semanticModel) 876var semanticModel = await workspace.CurrentSolution.Projects.Single().Documents.Single().GetSemanticModelAsync(); 895public IEnumerable<ISymbol> GetAnnotatedDeclaredSymbols(string key, SemanticModel semanticModel) 904public static T GetSelectedSymbol<T>(TextSpan selection, SemanticModel semanticModel)
CodeGeneration\CodeGenerationTests.VisualBasic.cs (1)
409static ImmutableArray<IEventSymbol> GetExplicitInterfaceEvent(SemanticModel semanticModel)
SymbolFinder\DependentTypeFinderTests.cs (1)
644var semanticModel = await csDoc.GetSemanticModelAsync();
Utilities\SymbolEquivalenceComparerTests.cs (1)
1895var model = compilation.GetSemanticModel(invocation.SyntaxTree);
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (6)
EmbeddedLanguages\AspNetCoreCSharpRouteSyntaxDetector.cs (1)
36SemanticModel semanticModel,
EmbeddedLanguages\BraceMatching\IAspNetCoreEmbeddedLanguageBraceMatcher.cs (1)
14AspNetCoreBraceMatchingResult? FindBraces(SemanticModel semanticModel, SyntaxToken token, int position, CancellationToken cancellationToken);
EmbeddedLanguages\Classification\AspNetCoreEmbeddedLanguageClassificationContext.cs (1)
25public SemanticModel SemanticModel => _context.SemanticModel;
EmbeddedLanguages\DocumentHighlighting\IEmbeddedLanguageDocumentHighlighter.cs (1)
18SemanticModel semanticModel,
Internal\EmbeddedLanguages\AspNetCoreEmbeddedLanguageBraceMatcher.cs (1)
32SemanticModel semanticModel,
Internal\EmbeddedLanguages\AspNetCoreEmbeddedLanguageDocumentHighlighter.cs (1)
31SemanticModel semanticModel,
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Internal\DescriptionService.cs (1)
60var semanticModel = await codeDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (456)
AddImport\AbstractAddImportFeatureService.cs (9)
50protected abstract ISet<INamespaceSymbol> GetImportNamespacesInScope(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 51protected abstract ITypeSymbol GetDeconstructInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 52protected abstract ITypeSymbol GetQueryClauseInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 53protected abstract bool IsViableExtensionMethod(IMethodSymbol method, SyntaxNode expression, SemanticModel semanticModel, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken); 58protected abstract bool IsAddMethodContext(SyntaxNode node, SemanticModel semanticModel); 61protected abstract (string description, bool hasExistingImport) GetDescription(Document document, AddImportPlacementOptions options, INamespaceOrTypeSymbol symbol, SemanticModel semanticModel, SyntaxNode root, CancellationToken cancellationToken); 129Document document, SemanticModel semanticModel, string diagnosticId, SyntaxNode node, int maxResults, ISymbolSearchService symbolSearchService, 623private static ITypeSymbol? GetAwaitInfo(SemanticModel semanticModel, ISyntaxFacts syntaxFactsService, SyntaxNode node) 635private static ITypeSymbol? GetCollectionExpressionType(SemanticModel semanticModel, ISyntaxFacts syntaxFactsService, SyntaxNode node)
AddImport\References\MetadataSymbolReference.cs (1)
38SemanticModel semanticModel, CancellationToken cancellationToken)
AddImport\References\ProjectSymbolReference.cs (1)
84SemanticModel semanticModel, CancellationToken cancellationToken)
AddImport\References\SymbolReference.cs (2)
78var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 125SemanticModel semanticModel, CancellationToken cancellationToken)
AddImport\SymbolReferenceFinder.cs (2)
33private readonly SemanticModel _semanticModel; 47SemanticModel semanticModel,
BraceMatching\IEmbeddedLanguageBraceMatcher.cs (1)
14SemanticModel semanticModel,
ChangeSignature\AbstractChangeSignatureService.cs (2)
1043protected static bool IsParamsArrayExpandedHelper(ISymbol symbol, int argumentCount, bool lastArgumentIsNamed, SemanticModel semanticModel, SyntaxNode lastArgumentExpression, CancellationToken cancellationToken) 1071protected static int GetParameterIndexFromInvocationArgument(SyntaxNode argument, Document document, SemanticModel semanticModel, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
290var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
203var model = await _document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeLens\CodeLensReferencesService.cs (4)
110var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 217private static ISymbol GetEnclosingMethod(SemanticModel semanticModel, Location location, CancellationToken cancellationToken) 253var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 280var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeLens\ICodeLensDisplayInfoService.cs (1)
21string GetDisplayName(SemanticModel semanticModel, SyntaxNode node);
CodeRefactorings\AddAwait\AbstractAddAwaitCodeRefactoringProvider.cs (1)
71SemanticModel model, ISyntaxFactsService syntaxFacts, SyntaxNode node, CancellationToken cancellationToken)
CodeRefactorings\MoveType\AbstractMoveTypeService.cs (4)
190var semanticModel = state.SemanticDocument.SemanticModel; 213SemanticModel semanticModel, 236SemanticModel semanticModel, 258TTypeDeclarationSyntax typeNode, SemanticModel semanticModel, CancellationToken cancellationToken)
Completion\ArgumentContext.cs (3)
15SemanticModel semanticModel, 26public SemanticModel SemanticModel { get; } = semanticModel ?? throw new ArgumentNullException(nameof(semanticModel)); 29/// Gets the position within <see cref="SemanticModel"/> where argument completion is requested.
Completion\CommonCompletionUtilities.cs (6)
87SemanticModel semanticModel, 96SolutionServices workspaceServices, SemanticModel semanticModel, int position, SymbolDescriptionOptions options, IReadOnlyList<ISymbol> symbols) 102SolutionServices workspaceServices, SemanticModel semanticModel, int position, IReadOnlyList<ISymbol> symbols, SymbolDescriptionOptions options, SupportedPlatformData supportedPlatforms) 108SolutionServices workspaceServices, SemanticModel semanticModel, int position, ISymbol symbol, int overloadCount, SymbolDescriptionOptions options, SupportedPlatformData? supportedPlatforms, CancellationToken cancellationToken) 173SolutionServices workspaceServices, SemanticModel semanticModel, int position, IReadOnlyList<ISymbol> symbols, SymbolDescriptionOptions options, SupportedPlatformData? supportedPlatforms, CancellationToken cancellationToken) 196List<TaggedText> textContentBuilder, ISymbol symbol, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formatter, CancellationToken cancellationToken)
Completion\CompletionService.cs (2)
219var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 251var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\CompletionService_GetCompletions.cs (1)
73var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractAwaitCompletionProvider.cs (2)
65protected abstract ITypeSymbol? GetTypeSymbolOfExpression(SemanticModel semanticModel, SyntaxNode potentialAwaitableExpression, CancellationToken cancellationToken); 254var semanticModel = syntaxContext.SemanticModel;
Completion\Providers\AbstractContextVariableArgumentProvider.cs (1)
20protected abstract bool IsInstanceContext(SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken);
Completion\Providers\AbstractCrefCompletionProvider.cs (1)
47protected abstract Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync(
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
20protected abstract Tuple<ITypeSymbol, Location>? GetInitializedType(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken);
Completion\Providers\AbstractOverrideCompletionProvider.cs (1)
62SemanticModel semanticModel,
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (2)
89ISymbol symbol, SemanticModel semanticModel, 108SemanticModel semanticModel,
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (2)
37protected abstract string GetDisplayText(IMethodSymbol method, SemanticModel semanticModel, int position); 104private CompletionItem CreateItem(IMethodSymbol method, int line, TextSpan span, SemanticModel semanticModel, DeclarationModifiers modifiers, SyntaxToken token)
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
55SemanticModel semanticModel,
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (1)
71var semanticModel = syntaxContext.SemanticModel;
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
103SemanticModel? semanticModel,
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (2)
31private readonly SemanticModel _originatingSemanticModel; 44SemanticModel semanticModel,
Completion\Providers\SymbolCompletionItem.cs (1)
360CompletionItem item, IReadOnlyList<ISymbol> symbols, Document document, SemanticModel semanticModel, SymbolDescriptionOptions options, CancellationToken cancellationToken)
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
377SemanticModel semanticModel, string className,
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
77SemanticModel semanticModel,
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (6)
45SemanticModel model, ForEachInfo info, SyntaxEditor editor, CancellationToken cancellationToken); 86ISemanticFactsService semanticFacts, SemanticModel model, SyntaxNode location, string baseName, CancellationToken cancellationToken) 90SemanticModel model, SyntaxGenerator generator, 150ISemanticFactsService semanticFact, SemanticModel model, 193SemanticModel model, ILocalSymbol foreachVariable, IOperation foreachCollection, 393private bool CheckIfForEachVariableIsWrittenInside(SemanticModel semanticModel, ISymbol foreachVariable, TForEachStatement foreachStatement)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (1)
51public abstract bool CanImplicitlyConvert(SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol targetType);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (1)
71SemanticModel semanticModel,
ConvertLinq\AbstractConvertLinqQueryToForEachProvider.cs (1)
24SemanticModel semanticModel,
ConvertLinq\ConvertForEachToLinqQuery\AbstractConvertForEachToLinqQueryProvider.cs (4)
31TForEachStatement forEachStatement, SemanticModel semanticModel, bool convertLocalDeclarations); 38SemanticModel semanticModel, 63IConverter<TForEachStatement, TStatement> converter, SemanticModel semanticModel, SyntaxNode root); 163SemanticModel semanticModel,
ConvertLinq\ConvertForEachToLinqQuery\ForEachInfo.cs (2)
13SemanticModel semanticModel, 22public SemanticModel SemanticModel { get; } = semanticModel;
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (2)
257SemanticModel semanticModel, 274SemanticModel semanticModel, CancellationToken cancellationToken)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (2)
854SemanticModel model, SyntaxGenerator generator, 922SemanticModel semanticModel, bool isRecord, string className,
Diagnostics\IAnalyzerDriverService.cs (1)
25void ComputeDeclarationsInSpan(SemanticModel model, TextSpan span, bool getSymbol, ArrayBuilder<DeclarationInfo> builder, CancellationToken cancellationToken);
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (5)
82internal SemanticModel SemanticModel { get; set; } 289public ImmutableArray<TaggedText> Format(string rawXmlText, ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format, CancellationToken cancellationToken) 448private static (string target, string hint)? GetNavigationTarget(XElement element, SemanticModel semanticModel, int position, SymbolDisplayFormat format) 497string crefValue, int position, SemanticModel semanticModel, SymbolDisplayFormat format = null, SymbolDisplayPartKind kind = SymbolDisplayPartKind.Text) 520string crefValue, ISymbol typeResolutionSymbol, int position, SemanticModel semanticModel, SymbolDisplayFormat format)
DocumentationComments\IDocumentationCommentFormattingService.cs (1)
14ImmutableArray<TaggedText> Format(string? rawXmlText, ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format, CancellationToken cancellationToken);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
95Document document, SemanticModel semanticModel, int position, HighlightingOptions options, CancellationToken cancellationToken)
DocumentHighlighting\IEmbeddedLanguageDocumentHighlighter.cs (1)
17SemanticModel semanticModel,
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (18)
197SemanticModel? oldModel, 198SemanticModel newModel, 211SemanticModel? oldModel, 212SemanticModel newModel, 219SemanticModel? oldModel, 220SemanticModel newModel, 264protected abstract IEnumerable<SyntaxNode> GetVariableUseSites(IEnumerable<SyntaxNode> roots, ISymbol localOrParameter, SemanticModel model, CancellationToken cancellationToken); 429SemanticModel oldModel, 432SemanticModel newModel, 454internal abstract IMethodSymbol GetLambdaExpressionSymbol(SemanticModel model, SyntaxNode lambdaExpression, CancellationToken cancellationToken); 456internal abstract bool QueryClauseLambdasTypeEquivalent(SemanticModel oldModel, SyntaxNode oldNode, SemanticModel newModel, SyntaxNode newNode, CancellationToken cancellationToken); 933SemanticModel? oldModel, 934SemanticModel newModel, 1826SemanticModel oldModel, 1829SemanticModel newModel, 1894SemanticModel oldModel, 1896SemanticModel newModel,
EditAndContinue\AbstractSimpleMemberBody.cs (1)
32public override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model)
EditAndContinue\DeclarationBody.cs (1)
63public abstract ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model);
EmbeddedLanguages\AbstractEmbeddedLanguageFeatureService.cs (1)
109SemanticModel semanticModel,
EmbeddedLanguages\AbstractLanguageDetector.cs (6)
30protected abstract bool IsArgumentToWellKnownAPI(SyntaxToken token, SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken, out TOptions options); 37protected abstract bool TryGetOptions(SemanticModel semanticModel, ITypeSymbol exprType, SyntaxNode expr, CancellationToken cancellationToken, out TOptions options); 40protected virtual bool IsEmbeddedLanguageInterpolatedStringTextToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 52SemanticModel semanticModel, 97private bool IsEmbeddedLanguageStringLiteralToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken, out TOptions options) 109SemanticModel semanticModel,
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (4)
42SemanticModel semanticModel; 52SolutionServices services, Project? project, SemanticModel semanticModel, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 69SemanticModel semanticModel, 78private readonly SemanticModel _semanticModel = semanticModel;
EmbeddedLanguages\Classification\EmbeddedLanguageClassifierContext.cs (2)
34public SemanticModel SemanticModel { get; } 44SemanticModel semanticModel,
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (3)
44protected override bool TryGetOptions(SemanticModel semanticModel, ITypeSymbol exprType, SyntaxNode expr, CancellationToken cancellationToken, out DateAndTimeOptions options) 58protected override bool IsEmbeddedLanguageInterpolatedStringTextToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 74SemanticModel semanticModel,
EmbeddedLanguages\EmbeddedLanguageDetector.cs (8)
33SemanticModel semanticModel, 47SemanticModel semanticModel, 60SemanticModel semanticModel, 155SemanticModel semanticModel, 203SemanticModel semanticModel, 292SemanticModel semanticModel, 308SemanticModel semanticModel, 322SemanticModel semanticModel,
EmbeddedLanguages\Json\LanguageServices\JsonBraceMatcher.cs (1)
37SemanticModel semanticModel,
EmbeddedLanguages\Json\LanguageServices\JsonClassifier.cs (1)
49var semanticModel = context.SemanticModel;
EmbeddedLanguages\Json\LanguageServices\JsonLanguageDetector.cs (5)
62/// <inheritdoc cref="TryParseString(SyntaxToken, SemanticModel, bool, CancellationToken)"/> 69public JsonTree? TryParseString(SyntaxToken token, SemanticModel semanticModel, bool includeProbableStrings, CancellationToken cancellationToken) 128SemanticModel semanticModel, 160SemanticModel semanticModel, ITypeSymbol exprType, SyntaxNode expr, CancellationToken cancellationToken, out JsonOptions options) 205SemanticModel semanticModel, SyntaxNode argumentNode, CancellationToken cancellationToken)
EmbeddedLanguages\RegularExpressions\LanguageServices\AbstractRegexDiagnosticAnalyzer.cs (1)
42var semanticModel = context.SemanticModel;
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexBraceMatcher.cs (1)
40SemanticModel semanticModel,
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexClassifier.cs (1)
51var semanticModel = context.SemanticModel;
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexDocumentHighlighter.cs (1)
35Document document, SemanticModel semanticModel, SyntaxToken token, int position, HighlightingOptions options, CancellationToken cancellationToken)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexLanguageDetector.cs (4)
75SemanticModel semanticModel, 145SemanticModel semanticModel, 167SemanticModel semanticModel, 184SemanticModel semanticModel, ITypeSymbol exprType, SyntaxNode expr, CancellationToken cancellationToken, out RegexOptions options)
ExternalAccess\Pythia\Api\PythiaDocumentationCommentFormatting.cs (1)
13public static IEnumerable<TaggedText> GetDocumentationParts(ISymbol symbol, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formatter, CancellationToken cancellationToken)
ExternalAccess\Pythia\Api\PythiaSymbolSorting.cs (1)
16SemanticModel semanticModel,
ExtractInterface\AbstractExtractInterfaceService.cs (1)
94var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\Extensions.cs (2)
13public static ITypeSymbol? GetLambdaOrAnonymousMethodReturnType(this SemanticModel binding, SyntaxNode node) 39public static T ResolveType<T>(this SemanticModel semanticModel, T symbol) where T : class, ITypeSymbol
ExtractMethod\MethodExtractor.Analyzer.cs (19)
124protected abstract ITypeSymbol GetRangeVariableType(SemanticModel model, IRangeVariableSymbol symbol); 135var model = _semanticDocument.SemanticModel; 210private (ITypeSymbol typeSymbol, bool hasAnonymousType, bool awaitTaskReturn) AdjustReturnType(SemanticModel model, ITypeSymbol returnType) 231private void UnwrapTaskIfNeeded(SemanticModel model, ref ITypeSymbol returnType) 261private void WrapReturnTypeInTask(SemanticModel model, ref ITypeSymbol returnType, out bool awaitTaskReturn) 297var model = _semanticDocument.SemanticModel; 323private bool IsInExpressionOrHasReturnStatement(SemanticModel model) 336SemanticModel model, Dictionary<ISymbol, List<SyntaxToken>> symbolMap, 394private Dictionary<ISymbol, List<SyntaxToken>> GetSymbolMap(SemanticModel model) 409private DataFlowAnalysis GetDataFlowAnalysisData(SemanticModel model) 418private bool IsEndOfSelectionReachable(SemanticModel model) 452SemanticModel model, 561SemanticModel model, 616Dictionary<ISymbol, List<SyntaxToken>> symbolMap, SemanticModel model, ISymbol symbol, bool writtenInside) 650protected virtual ITypeSymbol GetSymbolType(SemanticModel model, ISymbol symbol) 708private bool ContainsReturnStatementInSelectedCode(SemanticModel model) 739SemanticModel model, 809SemanticModel model, 912private OperationStatus CheckReadOnlyFields(SemanticModel semanticModel, Dictionary<ISymbol, List<SyntaxToken>> symbolMap)
ExtractMethod\MethodExtractor.Analyzer.SymbolMapBuilder.cs (3)
22private readonly SemanticModel _semanticModel; 30SemanticModel semanticModel, 47SemanticModel semanticModel,
ExtractMethod\MethodExtractor.cs (2)
243SemanticModel semanticModel, 263SemanticModel semanticModel, SyntaxNode contextNode, ITypeSymbol type)
ExtractMethod\SelectionValidator.cs (1)
39SemanticModel semanticModel, TextSpan textSpan, (SyntaxNode, SyntaxNode) range, CancellationToken cancellationToken)
ExtractMethod\UniqueNameGenerator.cs (2)
14private readonly SemanticModel _semanticModel; 16public UniqueNameGenerator(SemanticModel semanticModel)
FullyQualify\AbstractFullyQualifyService.cs (5)
121SemanticModel semanticModel, 154SemanticModel semanticModel, 186SemanticModel semanticModel, 231SemanticModel semanticModel, int arity, bool inAttributeContext, 290private static bool HasAccessibleTypes(INamespaceSymbol @namespace, SemanticModel model, CancellationToken cancellationToken)
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (1)
54var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
134SemanticModel semanticModel, INamedTypeSymbol containingType,
GenerateType\AbstractGenerateTypeService.cs (10)
45protected abstract ImmutableArray<ITypeParameterSymbol> GetTypeParameters(State state, SemanticModel semanticModel, CancellationToken cancellationToken); 46protected abstract Accessibility GetAccessibility(State state, SemanticModel semanticModel, bool intoNamespace, CancellationToken cancellationToken); 47protected abstract IList<ParameterName> GenerateParameterNames(SemanticModel semanticModel, IList<TArgumentSyntax> arguments, CancellationToken cancellationToken); 49protected abstract INamedTypeSymbol DetermineTypeToGenerateIn(SemanticModel semanticModel, TSimpleNameSyntax simpleName, CancellationToken cancellationToken); 50protected abstract ITypeSymbol DetermineArgumentType(SemanticModel semanticModel, TArgumentSyntax argument, CancellationToken cancellationToken); 55protected abstract bool IsInValueTypeConstraintContext(SemanticModel semanticModel, TExpressionSyntax expression, CancellationToken cancellationToken); 187SemanticModel semanticModel, 239SemanticModel semanticModel, 265SemanticModel semanticModel, 279var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
280var newSemanticModel = await newDocument.GetSemanticModelAsync(_cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
331internal abstract bool TryGenerateProperty(TSimpleNameSyntax propertyName, SemanticModel semanticModel, ITypeInferenceService typeInference, CancellationToken cancellationToken, out IPropertySymbol property);
GenerateType\AbstractGenerateTypeService.State.cs (4)
125var semanticModel = semanticDocument.SemanticModel; 266private bool GenerateStruct(TService service, SemanticModel semanticModel, CancellationToken cancellationToken) 341SemanticModel semanticModel, 380SemanticModel semanticModel,
GoToDefinition\AbstractGoToDefinitionSymbolService.cs (1)
20protected abstract int? GetTargetPositionIfControlFlow(SemanticModel semanticModel, SyntaxToken token);
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (7)
174private static (TParameterSyntax?, IParameterSymbol?) GetParameterAtOrdinal(int index, IReadOnlyList<TParameterSyntax> parameterNodes, SemanticModel semanticModel, CancellationToken cancellationToken) 187ISyntaxFactsService syntaxFacts, SemanticModel semanticModel, 244protected bool ParameterValidForNullCheck(Document document, IParameterSymbol parameter, SemanticModel semanticModel, 356Func<SemanticModel, SyntaxGenerator, TStatementSyntax> generateNullCheck, 383private TStatementSyntax CreateNullCheckStatement(SemanticModel semanticModel, SyntaxGenerator generator, IParameterSymbol parameter, TSimplifierOptions options) 406SemanticModel semanticModel, 452SemanticModel semanticModel,
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (3)
134SemanticModel semanticModel, 145SyntaxNode functionDeclaration, SemanticModel semanticModel, ISyntaxFactsService syntaxFacts, 185SemanticModel semanticModel,
InlineHints\AbstractInlineParameterNameHintsService.cs (1)
27SemanticModel semanticModel,
InlineHints\AbstractInlineTypeHintsService.cs (2)
23SemanticModel semanticModel, SyntaxNode node, 96SemanticModel semanticModel,
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (2)
425SemanticModel semanticModel, 571SemanticModel semanticModel,
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (3)
353SemanticModel callerSemanticModel, 354SemanticModel calleeSemanticModel, 390SemanticModel semanticModel,
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (4)
304SyntaxNode GenerateNewArgumentListSyntaxForTrampoline(Compilation compilation, SemanticModel invocationSemanticModel, 581private bool ShouldArgumentBeNamed(Compilation compilation, SemanticModel semanticModel, 609SemanticModel invocationSemanticModel, CancellationToken cancellationToken) 679private bool NodeMatchesExpression(SemanticModel originalSemanticModel, TExpressionSyntax currentNode, CancellationToken cancellationToken)
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (3)
232SemanticModel semanticModel, 261SemanticModel semanticModel, 348SemanticModel semanticModel,
IntroduceVariable\AbstractIntroduceVariableService.AbstractIntroduceVariableCodeAction.cs (1)
111var semanticModel = _semanticDocument.SemanticModel;
IntroduceVariable\AbstractIntroduceVariableService.cs (8)
265var semanticModel = semanticDocument.SemanticModel; 283var semanticModel = semanticDocument.SemanticModel; 302var originalSemanticModel = originalDocument.SemanticModel; 303var currentSemanticModel = currentDocument.SemanticModel; 315SemanticModel originalSemanticModel, 316SemanticModel currentSemanticModel, 409var semanticModel = document.SemanticModel; 439var semanticModel = document.SemanticModel;
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (3)
106SemanticModel semanticModel, 316SemanticModel semanticModel, 340SemanticModel semanticModel,
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (4)
23protected abstract ImmutableArray<SymbolDisplayPart> GetNormalAnonymousTypeParts(INamedTypeSymbol anonymousType, SemanticModel semanticModel, int position); 25public ImmutableArray<SymbolDisplayPart> GetAnonymousTypeParts(INamedTypeSymbol anonymousType, SemanticModel semanticModel, int position) 32SemanticModel semanticModel, 64SemanticModel semanticModel,
LanguageServices\AnonymousTypeDisplayService\IStructuralTypeDisplayService.cs (2)
15SemanticModel semanticModel, 20SemanticModel semanticModel,
LanguageServices\AnonymousTypeDisplayService\StructuralTypeDisplayInfo.cs (3)
23public IList<SymbolDisplayPart> ReplaceStructuralTypes(IList<SymbolDisplayPart> parts, SemanticModel semanticModel, int position) 29SemanticModel semanticModel, 42SemanticModel semanticModel,
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (5)
79private readonly SemanticModel _semanticModel; 90SemanticModel semanticModel, 110protected abstract ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format); 117protected SemanticModel GetSemanticModel(SyntaxTree tree) 236var semanticModel = GetSemanticModel(syntax.SyntaxTree);
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.cs (5)
23protected abstract AbstractSymbolDescriptionBuilder CreateDescriptionBuilder(SemanticModel semanticModel, int position, SymbolDescriptionOptions options, CancellationToken cancellationToken); 25public Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ISymbol symbol, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 28public async Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 34public async Task<ImmutableArray<SymbolDisplayPart>> ToDescriptionPartsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 46SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken)
LanguageServices\SymbolDisplayService\ISymbolDisplayService.cs (4)
17Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ISymbol symbol, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 18Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 19Task<ImmutableArray<SymbolDisplayPart>> ToDescriptionPartsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 20Task<IDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>> ToDescriptionGroupsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken = default);
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (2)
101public string ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null) 104public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (2)
126public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 129public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
187var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Organizing\Organizers\AbstractSyntaxNodeOrganizer.cs (1)
18public SyntaxNode OrganizeNode(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken)
Organizing\Organizers\ISyntaxOrganizer.cs (1)
23SyntaxNode OrganizeNode(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken = default);
PreferFrameworkType\PreferFrameworkTypeDiagnosticAnalyzerBase.cs (2)
44protected abstract bool IsIdentifierNameReplaceableWithFrameworkType(SemanticModel semanticModel, TIdentifierNameSyntax node); 52var semanticModel = context.SemanticModel;
QuickInfo\AbstractEmbeddedLanguageQuickInfoProvider.cs (1)
70SemanticModel semanticModel,
QuickInfo\CommonQuickInfoContext.cs (2)
13SemanticModel semanticModel, 19public readonly SemanticModel SemanticModel = semanticModel;
QuickInfo\CommonSemanticQuickInfoProvider.cs (5)
139SemanticModel linkedModel, 155SemanticModel semanticModel, 188protected virtual NullableFlowState GetNullabilityAnalysis(SemanticModel semanticModel, ISymbol symbol, SyntaxNode node, CancellationToken cancellationToken) => NullableFlowState.None; 191SolutionServices services, SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 237private ImmutableArray<ISymbol> GetSymbolsFromToken(SyntaxToken token, SolutionServices services, SemanticModel semanticModel, CancellationToken cancellationToken)
QuickInfo\IEmbeddedLanguageQuickInfoProvider.cs (1)
17SemanticModel semanticModel,
QuickInfo\QuickInfoServiceWithProviders.cs (1)
72internal async Task<QuickInfoItem?> GetQuickInfoAsync(SemanticModel semanticModel, int position, SymbolDescriptionOptions options, CancellationToken cancellationToken)
QuickInfo\QuickInfoUtilities.cs (2)
21public static Task<QuickInfoItem> CreateQuickInfoItemAsync(SolutionServices services, SemanticModel semanticModel, TextSpan span, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken) 26SemanticModel semanticModel,
Rename\IRenameIssuesService.cs (1)
13SemanticModel semantic, ISymbol symbol, SyntaxToken triggerToken, [NotNullWhen(true)] out string? langError);
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
265SemanticModel semanticModel,
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (2)
110CodeRefactoringContext context, SemanticModel semanticModel, SyntaxToken token, TextSpan replacementSpan, CancellationToken cancellationToken) 126private static ISymbol? GetEnclosingSymbol(SemanticModel semanticModel, int position, CancellationToken cancellationToken)
ReplaceMethodWithProperty\IReplaceMethodWithPropertyService.cs (1)
25SyntaxEditor editor, SemanticModel semanticModel,
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
159var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (2)
77private readonly SemanticModel _semanticModel; 93SemanticModel semanticModel,
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
86var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Shared\Extensions\ISymbolExtensions_2.cs (2)
180public static ImmutableArray<TaggedText> GetDocumentationParts(this ISymbol symbol, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formatter, CancellationToken cancellationToken) 230this ISymbol symbol, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formatter)
Shared\Extensions\ISymbolExtensions_Sorting.cs (3)
23SemanticModel semanticModel, 32SemanticModel semanticModel, 132SemanticModel semanticModel,
SignatureHelp\AbstractSignatureHelpProvider.cs (4)
134SemanticModel semanticModel, 152SemanticModel semanticModel, 169SemanticModel semanticModel, 231SemanticModel semanticModel,
SimplifyThisOrMe\AbstractSimplifyThisOrMeDiagnosticAnalyzer.cs (1)
55var semanticModel = context.SemanticModel;
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (4)
45SyntaxNode root, SemanticModel model, TextSpan span, 82var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 106var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 124private bool CanSimplifyTypeNameExpression(SemanticModel model, SyntaxNode node, TSimplifierOptions options, TextSpan span, out string diagnosticId, CancellationToken cancellationToken)
Snippets\SnippetContext.cs (1)
34public SemanticModel SemanticModel => SyntaxContext.SemanticModel;
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (2)
47var semanticModel = context.SemanticModel; 95SemanticModel semanticModel,
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
65SemanticModel semanticModel = null;
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
219var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
151var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\Nested\AbstractMergeNestedIfStatementsCodeRefactoringProvider.cs (1)
221var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (2)
41protected abstract (CommonConversion conversion, ITypeSymbol? collectionElementType) GetForEachInfo(SemanticModel semanticModel, TForEachStatementSyntax node); 53var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
34protected abstract bool IsWrittenTo(SemanticModel semanticModel, TThisExpression expression, CancellationToken cancellationToken);
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
93private bool IsFixSupported(SemanticModel semanticModel, TNamespaceSyntax namespaceDeclaration, CancellationToken cancellationToken) 170protected bool ContainsPartialTypeWithMultipleDeclarations(TNamespaceSyntax namespaceDeclaration, SemanticModel semanticModel)
src\Analyzers\Core\Analyzers\RemoveUnnecessaryCast\AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (2)
32protected abstract bool IsUnnecessaryCast(SemanticModel model, TCastExpression node, CancellationToken cancellationToken); 56private Diagnostic? TryRemoveCastExpression(SemanticModel model, TCastExpression node, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
44TParenthesizedExpressionSyntax parenthesizedExpression, SemanticModel semanticModel, CancellationToken cancellationToken,
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
74public void AnalyzeAssemblyOrModuleAttribute(SyntaxNode attributeSyntax, SemanticModel model, Action<Diagnostic> reportDiagnostic, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (3)
85SemanticModel semanticModel, 392SemanticModel semanticModel, 734SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
47SemanticModel model,
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
601SemanticModel? lazyModel = null;
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
52protected abstract CommonConversion GetConversion(SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken); 73var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
171private static bool IsType<T>(INamedTypeSymbol type, SemanticModel semanticModel) 174private static INamedTypeSymbol? FindType<T>(SemanticModel semanticModel)
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (3)
80SemanticModel model, SyntaxNode node, TSimplifierOptions options, 114public bool TrySimplify(SemanticModel model, SyntaxNode node, [NotNullWhen(true)] out Diagnostic? diagnostic, TSimplifierOptions options, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken) 135internal static Diagnostic CreateDiagnostic(SemanticModel model, TSimplifierOptions options, AnalyzerOptions analyzerOptions, TextSpan issueSpan, string diagnosticId, bool inDeclaration)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (9)
97protected abstract TExpression? GetSetterExpression(SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken); 100SemanticModel semanticModel, IMethodSymbol accessor, HashSet<string> fieldNames, HashSet<IFieldSymbol> result, CancellationToken cancellationToken); 103HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 231SemanticModel semanticModel, 263SemanticModel semanticModel, 282SemanticModel semanticModel, IMethodSymbol setMethod, HashSet<string> fieldNames, CancellationToken cancellationToken) 298SemanticModel semanticModel, 340var semanticModel = context.SemanticModel; 500SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
62var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (2)
43protected abstract bool IsTargetTyped(SemanticModel semanticModel, TConditionalExpressionSyntax conditional, System.Threading.CancellationToken cancellationToken); 102var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (2)
38protected abstract bool IsTargetTyped(SemanticModel semanticModel, TConditionalExpressionSyntax conditional, System.Threading.CancellationToken cancellationToken); 100var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (4)
48protected SemanticModel SemanticModel => this.State.SemanticModel; 97SemanticModel semanticModel, 125SemanticModel semanticModel, 154SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerAnalyzer.cs (1)
58SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
83SemanticModel semanticModel, TObjectCreationExpressionSyntax objectCreationExpression, INamedTypeSymbol? expressionType, bool allowSemanticsChange, CancellationToken cancellationToken, out bool changesSemantics); 124var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (2)
34public readonly SemanticModel SemanticModel; 59SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
138var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (3)
41ISyntaxFacts syntaxFacts, SyntaxNode expr, SemanticModel semanticModel, CancellationToken cancellationToken) 47ISyntaxFacts syntaxFacts, SyntaxNode expr, SemanticModel semanticModel, 100SyntaxNode expr, SemanticModel semanticModel, bool isTopLevel, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
60var semanticModel = context.SemanticModel; 148private static ITypeParameterSymbol? GetGenericParameterSymbol(ISyntaxFacts syntaxFacts, SemanticModel semanticModel, SyntaxNode node1, SyntaxNode node2, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (4)
141var semanticModel = context.SemanticModel; 302var semanticModel = context.SemanticModel; 330SemanticModel semanticModel, 354ISyntaxFacts syntaxFacts, SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
56var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
95var semanticModel = context.SemanticModel;
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
50SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (3)
80var semanticModel = context.Operation.SemanticModel; 139private static bool ValueIsAccessed(SemanticModel semanticModel, IConditionalOperation ifOperation, IBlockOperation containingBlock, ISymbol localOrParameter, IExpressionStatementOperation expressionStatement, IAssignmentOperation assignmentExpression) 270SemanticModel semanticModel, IThrowOperation throwOperation,
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
181SemanticModel semanticModel, 191SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
101Document document, SemanticModel semanticModel, Diagnostic diagnostic,
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (6)
49Document document, SemanticModel semanticModel, SyntaxNode root, 61Document document, SemanticModel semanticModel, SyntaxNode root, 118SemanticModel semanticModel, 161protected virtual (SyntaxNode finalTarget, SyntaxNode finalReplacement) Cast(SemanticModel semanticModel, TExpressionSyntax targetNode, ITypeSymbol conversionType) 164private static string GetSubItemName(SemanticModel semanticModel, int position, ITypeSymbol conversionType) 173SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (4)
27protected abstract SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, TArgumentListSyntax newArgumentList); 40SemanticModel semanticModel, 110SemanticModel semanticModel, 204private bool IsInvocationExpressionWithNewArgumentsApplicable(SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (2)
33internal sealed class InheritanceDistanceComparer<TExpressionSyntax>(SemanticModel semanticModel) 37private readonly SemanticModel _semanticModel = semanticModel;
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (6)
38protected abstract ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken); 47SemanticModel semanticModel, 116SemanticModel semanticModel, 137SemanticModel semanticModel, 185SemanticModel semanticModel, 431SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (3)
20protected abstract Task<string> GetDescriptionAsync(Diagnostic diagnostic, SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken); 21protected abstract Task<Tuple<SyntaxTree, SyntaxNode>> GetRootInOtherSyntaxTreeAsync(SyntaxNode node, SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken); 64var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ConvertTypeOfToNameOf\AbstractConvertTypeOfToNameOfCodeFixProvider.cs (2)
22protected abstract SyntaxNode GetSymbolTypeExpression(SemanticModel model, TMemberAccessExpressionSyntax node, CancellationToken cancellationToken); 51public void ConvertTypeOfToNameOf(SemanticModel semanticModel, SyntaxEditor editor, TMemberAccessExpressionSyntax nodeToReplace, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (2)
25protected abstract ITypeSymbol GetForEachElementType(SemanticModel semanticModel, TForEachStatementSyntax forEachStatement); 59SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (5)
38protected abstract ITypeSymbol GetArgumentType(SemanticModel semanticModel, Argument argument, CancellationToken cancellationToken); 39protected abstract string GenerateNameForExpression(SemanticModel semanticModel, TExpressionSyntax expression, CancellationToken cancellationToken); 43protected abstract IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken); 44protected abstract IMethodSymbol GetDelegatedConstructor(SemanticModel semanticModel, IMethodSymbol constructor, CancellationToken cancellationToken); 157protected string GenerateNameForArgument(SemanticModel semanticModel, Argument argument, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (2)
283var semanticModel = _document.SemanticModel; 289private static ITypeSymbol FixType(ITypeSymbol typeSymbol, SemanticModel semanticModel, IEnumerable<ITypeParameterSymbol> allTypeParameters)
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (2)
32var semanticModel = document.SemanticModel; 73SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
94var semanticModel = semanticDocument.SemanticModel;
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (2)
86var semanticModel = semanticDocument.SemanticModel; 179SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
22public abstract ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (1)
58var semanticModel = document.SemanticModel;
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (1)
28protected abstract ITypeSymbol DetermineReturnTypeForSimpleNameOrMemberAccessExpression(ITypeInferenceService typeInferenceService, SemanticModel semanticModel, TExpressionSyntax expression, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
103var semanticModel = document.SemanticModel; 152var semanticModel = semanticDocument.SemanticModel;
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (2)
30protected abstract bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel); 31protected abstract bool AreSpecialOptionsActive(SemanticModel semanticModel);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
37protected abstract bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (3)
212var semanticModel = _document.SemanticModel; 268var semanticModel = _document.SemanticModel; 397private static IMethodSymbol FindContainingMethodSymbol(int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
30protected abstract bool TryInitializeState(Document document, SemanticModel model, SyntaxNode interfaceNode, CancellationToken cancellationToken, out SyntaxNode classOrStructDecl, out INamedTypeSymbol classOrStructType, out ImmutableArray<INamedTypeSymbol> interfaceTypes);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.State.cs (3)
20SemanticModel model) : IImplementInterfaceInfo 26public SemanticModel Model { get; } = model; 40SemanticModel model,
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
87private static IMethodSymbol? GetMethodSymbol(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (2)
50Document document, SyntaxEditor editor, SemanticModel semanticModel, 159SyntaxEditor editor, SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
30Document document, SyntaxEditor editor, SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
31Document document, SyntaxEditor editor, SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (2)
104private static IMethodSymbol? GetMethodSymbol(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 166private static ControlFlowAnalysis? GetControlFlowAnalysis(SyntaxGenerator generator, SemanticModel semanticModel, SyntaxNode node)
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesCodeFixProvider.cs (1)
26TParenthesizedExpressionSyntax current, SemanticModel semanticModel, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (6)
122protected virtual SyntaxNode? TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel) => null; 349SemanticModel semanticModel, 386SemanticModel semanticModel, 445SemanticModel semanticModel, 928SemanticModel semanticModel, 933private readonly SemanticModel _semanticModel = semanticModel;
src\Analyzers\Core\CodeFixes\SimplifyBooleanExpression\SimplifyConditionalCodeFixProvider.cs (1)
61SyntaxNode SimplifyConditional(SemanticModel semanticModel, Diagnostic diagnostic, SyntaxNode expr)
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
30SemanticModel semanticModel, SyntaxNode expressionToCoalesce,
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
58SyntaxEditor editor, SemanticModel semanticModel, INamedTypeSymbol? expressionTypeOpt,
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (1)
92SemanticModel semanticModel,
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (5)
15internal static DeclarationInfo GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, IEnumerable<SyntaxNode>? executableCodeBlocks, CancellationToken cancellationToken) 27internal static DeclarationInfo GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, CancellationToken cancellationToken) 32internal static DeclarationInfo GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, SyntaxNode executableCodeBlock, CancellationToken cancellationToken) 37internal static DeclarationInfo GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, CancellationToken cancellationToken, params SyntaxNode[] executableCodeBlocks) 42private static ISymbol? GetDeclaredSymbol(SemanticModel model, SyntaxNode node, bool getSymbol, CancellationToken cancellationToken)
Testing\AbstractTestMethodFinder.cs (1)
50public bool IsMatch(SemanticModel semanticModel, SyntaxNode node, string fullyQualifiedTestName, CancellationToken cancellationToken)
Testing\ITestMethodFinder.cs (1)
30bool IsMatch(SemanticModel model, SyntaxNode node, string fullyQualifiedTestName, CancellationToken cancellationToken);
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (1)
184protected abstract bool IsImplicitIndexOrRangeIndexer(ImmutableArray<IParameterSymbol> parameters, TBaseArgumentSyntax argument, SemanticModel semanticModel);
ValueTracking\ValueTracker.OperationCollector.cs (1)
73var semanticModel = operation.SemanticModel;
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueTestVerifier.cs (2)
156var oldModel = oldDocument.GetSemanticModelAsync().Result; 157var newModel = newDocument.GetSemanticModelAsync().Result;
Microsoft.CodeAnalysis.Features.UnitTests (3)
FindUsages\DefinitionItemFactoryTests.cs (3)
1450var model = compilation.GetSemanticModel(tree); 1516var model = compilation.GetSemanticModel(tree); 1587var model = compilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.Test.Utilities (18)
CommonTestBase.cs (6)
577internal static void VerifyParentOperations(SemanticModel model) 595private static Dictionary<IOperation, IOperation> GetParentOperationsMap(SemanticModel model) 627private static void CollectTopOperations(SemanticModel model, SyntaxNode node, HashSet<IOperation> topOperations) 646internal static void VerifyClone(SemanticModel model) 680var semanticModel = ((Operation)root).OwningSemanticModel; 695SemanticModel semanticModel, HashSet<IOperation> set, SyntaxNode node)
Compilation\CompilationExtensions.cs (3)
190SemanticModel model = compilation.GetSemanticModel(node.SyntaxTree); 203SemanticModel model = compilation.GetSemanticModel(tree); 289var semanticModel = compilation.GetSemanticModel(tree);
Compilation\ControlFlowGraphVerifier.cs (2)
28public static (ControlFlowGraph graph, ISymbol associatedSymbol) GetControlFlowGraph(SyntaxNode syntaxNode, SemanticModel model) 349var model = compilation.GetSemanticModel(graph.OriginalOperation.Syntax.SyntaxTree);
Compilation\SemanticModelExtensions.cs (2)
13public static void VerifyOperationTree(this SemanticModel model, SyntaxNode node, string expectedOperationTree) 20public static void AppendOperationTree(this SemanticModel model, SyntaxNode node, StringBuilder actualTextBuilder, int initialIndent = 0)
Compilation\TestOperationVisitor.cs (1)
795private static void CheckOperators(SemanticModel semanticModel, SyntaxNode syntax)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2983public readonly List<SemanticModel> AnalyzedSemanticModels = new();
Diagnostics\DiagnosticsHelper.cs (1)
33public static void VerifyDiagnostics(SemanticModel model, string source, string pattern, params string[] expectedDiagnosticIds)
Diagnostics\OperationTestAnalyzer.cs (2)
2140var model = syntaxContext.SemanticModel; 2152var model = syntaxContext.SemanticModel;
Microsoft.CodeAnalysis.UnitTests (4)
Diagnostics\OperationTests.cs (1)
276var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true);
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (2)
1346var model = compilation.GetSemanticModel(syntaxTree); 1395private static ISymbol GetSymbolAtPosition(SemanticModel model, int pos)
Symbols\DocumentationCommentIdTests.cs (1)
175var semanticModel = comp.GetSemanticModel(tree);
Microsoft.CodeAnalysis.VisualBasic (120)
Binding\MemberSemanticModel.vb (2)
70Public NotOverridable Overrides ReadOnly Property ParentModel As SemanticModel 78Friend NotOverridable Overrides ReadOnly Property ContainingPublicModelOrSelf As SemanticModel
Compilation\PublicSemanticModel.vb (2)
8''' Instances of this <see cref="SemanticModel"/> can be exposed to external consumers. 15Friend NotOverridable Overrides ReadOnly Property ContainingPublicModelOrSelf As SemanticModel
Compilation\SemanticModel.vb (8)
2154Public Function TryGetSpeculativeSemanticModelForMethodBody(position As Integer, method As MethodBlockBaseSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2184Public Function TryGetSpeculativeSemanticModel(position As Integer, rangeArgument As RangeArgumentSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2213Public Function TryGetSpeculativeSemanticModel(position As Integer, statement As ExecutableStatementSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2243Public Function TryGetSpeculativeSemanticModel(position As Integer, initializer As EqualsValueSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2272Public Function TryGetSpeculativeSemanticModel(position As Integer, attribute As AttributeSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2304Public Function TryGetSpeculativeSemanticModel(position As Integer, type As TypeSyntax, <Out> ByRef speculativeModel As SemanticModel, Optional bindingOption As SpeculativeBindingOption = SpeculativeBindingOption.BindAsExpression) As Boolean 2321Public MustOverride Shadows ReadOnly Property ParentModel As SemanticModel 3061Protected NotOverridable Overrides ReadOnly Property ParentModelCore As SemanticModel
Compilation\SpeculativeSemanticModelWithMemberModel.vb (1)
107Public Overrides ReadOnly Property ParentModel As SemanticModel
Compilation\SpeculativeSyntaxTreeSemanticModel.vb (1)
57Public Overrides ReadOnly Property ParentModel As SemanticModel
Compilation\SyntaxTreeSemanticModel.vb (1)
1419Public Overrides ReadOnly Property ParentModel As SemanticModel
Compilation\VisualBasicCompilation.vb (4)
2041Public Shadows Function GetSemanticModel(syntaxTree As SyntaxTree, Optional ignoreAccessibility As Boolean = False) As SemanticModel 2042Dim model As SemanticModel = Nothing 2052Friend Overrides Function CreateSemanticModel(syntaxTree As SyntaxTree, options As SemanticModelOptions) As SemanticModel 2751Protected Overrides Function CommonGetSemanticModel(syntaxTree As SyntaxTree, options As SemanticModelOptions) As SemanticModel
Errors\ErrorFacts.vb (1)
9''' <see cref="SemanticModel.GetDiagnostics(Text.TextSpan?, System.Threading.CancellationToken)"/> API.
Operations\VisualBasicOperationFactory.vb (2)
18Private ReadOnly _semanticModel As SemanticModel 20Public Sub New(semanticModel As SemanticModel)
src\Compilers\VisualBasic\BasicAnalyzerDriver\VisualBasicDeclarationComputer.vb (3)
15Public Shared Sub ComputeDeclarationsInSpan(model As SemanticModel, 25Public Shared Sub ComputeDeclarationsInNode(model As SemanticModel, 41Private Shared Sub ComputeDeclarationsCore(model As SemanticModel,
SymbolDisplay\SymbolDisplay.vb (5)
45semanticModel As SemanticModel, 53semanticModel As SemanticModel, 96semanticModel As SemanticModel, 104semanticModelOpt As SemanticModel, 117semanticModelOpt As SemanticModel,
SymbolDisplay\SymbolDisplayVisitor.vb (3)
32semanticModelOpt As SemanticModel, 43semanticModelOpt As SemanticModel, 55Protected Shadows Sub Initialize(builder As ArrayBuilder(Of SymbolDisplayPart), format As SymbolDisplayFormat, isFirstSymbolVisited As Boolean, semanticModelOpt As SemanticModel, positionOpt As Integer, inNamespaceOrType As Boolean)
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (1)
179Private Function GetSyntaxTree(semanticModel As SemanticModel) As SyntaxTree
Symbols\Symbol.vb (4)
871Public Function ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String 875Public Function ToMinimalDisplayParts(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) 1332Private Function ISymbol_ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String Implements ISymbol.ToMinimalDisplayString 1336Private Function ISymbol_ToMinimalDisplayParts(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) Implements ISymbol.ToMinimalDisplayParts
Symbols\TypeSymbol.vb (2)
622Private Function ITypeSymbol_ToMinimalDisplayString(semanticModel As SemanticModel, topLevelNullability As NullableFlowState, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String Implements ITypeSymbol.ToMinimalDisplayString 626Private Function ITypeSymbol_ToMinimalDisplayParts(semanticModel As SemanticModel, topLevelNullability As NullableFlowState, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) Implements ITypeSymbol.ToMinimalDisplayParts
VisualBasicExtensions.vb (80)
665Public Function OptionStrict(semanticModel As SemanticModel) As OptionStrict 680Public Function OptionInfer(semanticModel As SemanticModel) As Boolean 695Public Function OptionExplicit(semanticModel As SemanticModel) As Boolean 710Public Function OptionCompareText(semanticModel As SemanticModel) As Boolean 807Public Function ClassifyConversion(semanticModel As SemanticModel, expression As ExpressionSyntax, destination As ITypeSymbol) As Conversion 825Public Function ClassifyConversion(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, destination As ITypeSymbol) As Conversion 842Public Function GetDeclaredSymbol(semanticModel As SemanticModel, identifierSyntax As ModifiedIdentifierSyntax, Optional cancellationToken As CancellationToken = Nothing) As ISymbol 859Public Function GetDeclaredSymbol(semanticModel As SemanticModel, elementSyntax As TupleElementSyntax, Optional cancellationToken As CancellationToken = Nothing) As ISymbol 876Public Function GetDeclaredSymbol(semanticModel As SemanticModel, fieldInitializerSyntax As FieldInitializerSyntax, Optional cancellationToken As CancellationToken = Nothing) As IPropertySymbol 889Public Function GetDeclaredSymbol(semanticModel As SemanticModel, anonymousObjectCreationExpressionSyntax As AnonymousObjectCreationExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 902Public Function GetDeclaredSymbol(semanticModel As SemanticModel, rangeVariableSyntax As ExpressionRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As IRangeVariableSymbol 915Public Function GetDeclaredSymbol(semanticModel As SemanticModel, rangeVariableSyntax As CollectionRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As IRangeVariableSymbol 928Public Function GetDeclaredSymbol(semanticModel As SemanticModel, rangeVariableSyntax As AggregationRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As IRangeVariableSymbol 941Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As LabelStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As ILabelSymbol 954Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EnumMemberDeclarationSyntax, Optional cancellationToken As CancellationToken = Nothing) As IFieldSymbol 967Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As TypeStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 980Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As TypeBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 993Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EnumStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 1006Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EnumBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 1019Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As NamespaceStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamespaceSymbol 1032Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As NamespaceBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamespaceSymbol 1045Public Function GetDeclaredSymbol(semanticModel As SemanticModel, parameter As ParameterSyntax, Optional cancellationToken As CancellationToken = Nothing) As IParameterSymbol 1058Public Function GetDeclaredSymbol(semanticModel As SemanticModel, typeParameter As TypeParameterSyntax, Optional cancellationToken As CancellationToken = Nothing) As ITypeParameterSymbol 1071Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As DelegateStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 1084Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As SubNewStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1097Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As MethodStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1110Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As DeclareStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1123Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As OperatorStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1136Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As MethodBlockBaseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1149Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As PropertyStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IPropertySymbol 1162Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EventStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IEventSymbol 1175Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As PropertyBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As IPropertySymbol 1188Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EventBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As IEventSymbol 1201Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As CatchStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As ILocalSymbol 1214Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As AccessorStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1227Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As SimpleImportsClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol 1240Public Function GetForEachStatementInfo(semanticModel As SemanticModel, node As ForEachStatementSyntax) As ForEachStatementInfo 1253Public Function GetForEachStatementInfo(semanticModel As SemanticModel, node As ForEachBlockSyntax) As ForEachStatementInfo 1266Public Function GetAwaitExpressionInfo(semanticModel As SemanticModel, awaitExpression As AwaitExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As AwaitExpressionInfo 1279Public Function GetPreprocessingSymbolInfo(semanticModel As SemanticModel, node As IdentifierNameSyntax) As PreprocessingSymbolInfo 1292Public Function GetSymbolInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo 1306Public Function GetCollectionInitializerSymbolInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo 1319Public Function GetSymbolInfo(semanticModel As SemanticModel, crefReference As CrefReferenceSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo 1332Public Function GetSymbolInfo(semanticModel As SemanticModel, attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo 1345Public Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As SymbolInfo 1358Public Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, position As Integer, attribute As AttributeSyntax) As SymbolInfo 1371Public Function GetConversion(semanticModel As SemanticModel, expression As SyntaxNode, Optional cancellationToken As CancellationToken = Nothing) As Conversion 1478Public Function GetSpeculativeConversion(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As Conversion 1488Public Function GetTypeInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As TypeInfo 1501Public Function GetSpeculativeTypeInfo(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As TypeInfo 1514Public Function GetTypeInfo(semanticModel As SemanticModel, attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As TypeInfo 1527Public Function GetMemberGroup(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As ImmutableArray(Of ISymbol) 1540Public Function GetSpeculativeMemberGroup(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax) As ImmutableArray(Of ISymbol) 1553Public Function GetMemberGroup(semanticModel As SemanticModel, attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As ImmutableArray(Of ISymbol) 1567Public Function GetAliasInfo(semanticModel As SemanticModel, nameSyntax As IdentifierNameSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol 1581Public Function GetSpeculativeAliasInfo(semanticModel As SemanticModel, position As Integer, nameSyntax As IdentifierNameSyntax, bindingOption As SpeculativeBindingOption) As IAliasSymbol 1595semanticModel As SemanticModel, 1612semanticModel As SemanticModel, 1683''' Use <see cref="GetAggregateClauseSymbolInfo(SemanticModel, AggregateClauseSyntax, CancellationToken)"/> instead. 1690semanticModel As SemanticModel, 1708semanticModel As SemanticModel, 1725semanticModel As SemanticModel, 1742semanticModel As SemanticModel, 1758Public Function AnalyzeControlFlow(semanticModel As SemanticModel, firstStatement As StatementSyntax, lastStatement As StatementSyntax) As ControlFlowAnalysis 1771Public Function AnalyzeControlFlow(semanticModel As SemanticModel, statement As StatementSyntax) As ControlFlowAnalysis 1784Public Function AnalyzeDataFlow(semanticModel As SemanticModel, expression As ExpressionSyntax) As DataFlowAnalysis 1797Public Function AnalyzeDataFlow(semanticModel As SemanticModel, firstStatement As StatementSyntax, lastStatement As StatementSyntax) As DataFlowAnalysis 1810Public Function AnalyzeDataFlow(semanticModel As SemanticModel, statement As StatementSyntax) As DataFlowAnalysis 1823Public Function TryGetSpeculativeSemanticModelForMethodBody(semanticModel As SemanticModel, position As Integer, method As MethodBlockBaseSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1837Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, rangeArgument As RangeArgumentSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1851Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, statement As ExecutableStatementSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1865Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, initializer As EqualsValueSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1879Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, attribute As AttributeSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1893Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, type As TypeSyntax, <Out> ByRef speculativeModel As SemanticModel, Optional bindingOption As SpeculativeBindingOption = SpeculativeBindingOption.BindAsExpression) As Boolean
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (92)
src\Analyzers\VisualBasic\Analyzers\MakeFieldReadonly\VisualBasicMakeFieldReadonlyDiagnosticAnalyzer.vb (1)
19Protected Overrides Function IsWrittenTo(semanticModel As SemanticModel, expression As MeExpressionSyntax, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb (1)
24Protected Overrides Function IsUnnecessaryCast(model As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryParentheses\VisualBasicRemoveUnnecessaryParenthesesDiagnosticAnalyzer.vb (2)
29semanticModel As SemanticModel, cancellationToken As CancellationToken, 38parenthesizedExpression As ParenthesizedExpressionSyntax, semanticModel As SemanticModel,
src\Analyzers\VisualBasic\Analyzers\SimplifyBooleanExpression\VisualBasicSimplifyConditionalDiagnosticAnalyzer.vb (1)
23Protected Overrides Function GetConversion(semanticModel As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As CommonConversion
src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (3)
52semanticModel As SemanticModel, 118Protected Overrides Function GetSetterExpression(semanticModel As SemanticModel, setMethod As IMethodSymbol, cancellationToken As CancellationToken) As ExpressionSyntax 151Protected Overrides Sub AddAccessedFields(semanticModel As SemanticModel, accessor As IMethodSymbol, fieldNames As HashSet(Of String), result As HashSet(Of IFieldSymbol), cancellationToken As CancellationToken)
src\Analyzers\VisualBasic\Analyzers\UseCoalesceExpression\VisualBasicUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.vb (1)
27Protected Overrides Function IsTargetTyped(semanticModel As SemanticModel, conditional As TernaryConditionalExpressionSyntax, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\Analyzers\UseCoalesceExpression\VisualBasicUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.vb (1)
25Protected Overrides Function IsTargetTyped(semanticModel As SemanticModel, conditional As TernaryConditionalExpressionSyntax, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\Analyzers\UseCollectionInitializer\VisualBasicUseCollectionInitializerDiagnosticAnalyzer.vb (1)
41Protected Overrides Function CanUseCollectionExpression(semanticModel As SemanticModel, objectCreationExpression As ObjectCreationExpressionSyntax, expressionType As INamedTypeSymbol, allowSemanticsChange As Boolean, cancellationToken As CancellationToken, ByRef changesSemantics As Boolean) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (2)
15semanticModel As SemanticModel, 24semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (10)
104semanticModel As SemanticModel, 142semanticModel As SemanticModel, 173semanticModel As SemanticModel, 189semanticModel As SemanticModel, 200semanticModel As SemanticModel, 211semanticModel As SemanticModel, 278Public Function IsInRefContext(expression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 362Public Function IsWrittenTo(expression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 465Public Function CanReplaceWithRValue(expression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 472Public Function CanReplaceWithLValue(expression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\InvocationExpressionSyntaxExtensions.vb (2)
12Public Function CanRemoveEmptyArgumentList(invocationExpression As InvocationExpressionSyntax, semanticModel As SemanticModel) As Boolean 17Private Function CanHaveOmittedArgumentList(invocationExpression As InvocationExpressionSyntax, semanticModel As SemanticModel) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ParenthesizedExpressionSyntaxExtensions.vb (2)
13Private Function EndsQuery(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 43semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (10)
15Public Function LookupTypeRegardlessOfArity(semanticModel As SemanticModel, 30Public Function LookupName(semanticModel As SemanticModel, name As SyntaxToken, 42Public Function LookupName(semanticModel As SemanticModel, 72Public Function GetSymbolInfo(semanticModel As SemanticModel, token As SyntaxToken) As SymbolInfo 82Public Function GetImportNamespacesInScope(semanticModel As SemanticModel, location As SyntaxNode) As ISet(Of INamespaceSymbol) 96Public Function GetAliasInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IAliasSymbol 106Public Function DetermineAccessibilityConstraint(semanticModel As SemanticModel, 178Public Iterator Function GetAliasSymbols(semanticModel As SemanticModel) As IEnumerable(Of IAliasSymbol) 195Public Function GenerateNameForExpression(semanticModel As SemanticModel, 240Private Function TryGenerateNameForArgumentExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As String
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (1)
1067semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\VariableDeclaratorSyntaxExtensions.vb (2)
29Public Function Type(variableDeclarator As VariableDeclaratorSyntax, semanticModel As SemanticModel) As ITypeSymbol 48Public Function IsTypeInferred(variableDeclarator As VariableDeclaratorSyntax, semanticModel As SemanticModel) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicUnnecessaryImportsProvider.vb (5)
26model As SemanticModel, 72Private Shared Function RemovalCausesAmbiguity(model As SemanticModel, redundantImport As ImportsClauseSyntax, cancellationToken As CancellationToken) As Boolean 86semanticModel As SemanticModel, 110semanticModel As SemanticModel, 133semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (25)
40Public Function IsOnlyWrittenTo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsOnlyWrittenTo 44Public Function IsWrittenTo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsWrittenTo 48Public Function IsInOutContext(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInOutContext 52Public Function IsInRefContext(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInRefContext 56Public Function IsInInContext(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInInContext 60Public Function CanReplaceWithRValue(semanticModel As SemanticModel, expression As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.CanReplaceWithRValue 64Public Function GetDeclaredSymbol(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.GetDeclaredSymbol 110Public Function TryGetSpeculativeSemanticModel(oldSemanticModel As SemanticModel, oldNode As SyntaxNode, newNode As SyntaxNode, <Out> ByRef speculativeModel As SemanticModel) As Boolean Implements ISemanticFacts.TryGetSpeculativeSemanticModel 140Dim vbSpeculativeModel As SemanticModel = Nothing 146Public Function GetAliasNameSet(model As SemanticModel, cancellationToken As CancellationToken) As ImmutableHashSet(Of String) Implements ISemanticFacts.GetAliasNameSet 167Public Function GetForEachSymbols(model As SemanticModel, forEachStatement As SyntaxNode) As ForEachSymbols Implements ISemanticFacts.GetForEachSymbols 193Public Function GetCollectionInitializerSymbolInfo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As SymbolInfo Implements ISemanticFacts.GetCollectionInitializerSymbolInfo 197Public Function GetGetAwaiterMethod(model As SemanticModel, node As SyntaxNode) As IMethodSymbol Implements ISemanticFacts.GetGetAwaiterMethod 207Public Function GetDeconstructionAssignmentMethods(model As SemanticModel, deconstruction As SyntaxNode) As ImmutableArray(Of IMethodSymbol) Implements ISemanticFacts.GetDeconstructionAssignmentMethods 211Public Function GetDeconstructionForEachMethods(model As SemanticModel, deconstruction As SyntaxNode) As ImmutableArray(Of IMethodSymbol) Implements ISemanticFacts.GetDeconstructionForEachMethods 223Public Function GetDeclaredSymbols(semanticModel As SemanticModel, memberDeclaration As SyntaxNode, cancellationToken As CancellationToken) As IEnumerable(Of ISymbol) Implements ISemanticFacts.GetDeclaredSymbols 233Public Function FindParameterForArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForArgument 237Public Function FindParameterForAttributeArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForAttributeArgument 241Public Function FindFieldOrPropertyForArgument(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.FindFieldOrPropertyForArgument 256Public Function FindFieldOrPropertyForAttributeArgument(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.FindFieldOrPropertyForAttributeArgument 260Public Function GetBestOrAllSymbols(semanticModel As SemanticModel, node As SyntaxNode, token As SyntaxToken, cancellationToken As CancellationToken) As ImmutableArray(Of ISymbol) Implements ISemanticFacts.GetBestOrAllSymbols 266Public Function IsInsideNameOfExpression(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInsideNameOfExpression 274Public Function IsInExpressionTree(semanticModel As SemanticModel, node As SyntaxNode, expressionTypeOpt As INamedTypeSymbol, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInExpressionTree 278Public Function GenerateNameForExpression(semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (5)
16Private ReadOnly _semanticModel As SemanticModel 23semanticModel As SemanticModel, 57Private Shared Function GetOuterCastType(expression As ExpressionSyntax, expressionTypeInfo As TypeInfo, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol 142Private Shared Function AsTypeInVariableDeclarator(node As SyntaxNode, semanticModel As SemanticModel) As ITypeSymbol 428semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (17)
44Public Sub New(expression As ExpressionSyntax, newExpression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken, Optional skipVerificationForReplacedNode As Boolean = False, Optional failOnOverloadResolutionFailuresInOriginalCode As Boolean = False) 100Protected Overrides Sub ValidateSpeculativeSemanticModel(speculativeSemanticModel As SemanticModel, nodeToSpeculate As SyntaxNode) 107Protected Overrides Function CreateSpeculativeSemanticModel(originalNode As SyntaxNode, nodeToSpeculate As SyntaxNode, semanticModel As SemanticModel) As SemanticModel 111Public Shared Function CreateSpeculativeSemanticModelForNode(originalNode As SyntaxNode, nodeToSpeculate As SyntaxNode, semanticModel As SemanticModel) As SemanticModel 117Public Shared Function CreateSpeculativeSemanticModelForNode(nodeToSpeculate As SyntaxNode, semanticModel As SemanticModel, position As Integer, isInNamespaceOrTypeContext As Boolean) As SemanticModel 126Dim speculativeModel As SemanticModel = Nothing 444Protected Overrides Function IsForEachTypeInferred(forEachStatement As ForEachStatementSyntax, semanticModel As SemanticModel) As Boolean 543Protected Overrides Function ConversionsAreCompatible(originalModel As SemanticModel, originalExpression As ExpressionSyntax, newModel As SemanticModel, newExpression As ExpressionSyntax) As Boolean 590Protected Overrides Function ForEachConversionsAreCompatible(originalModel As SemanticModel, originalForEach As ForEachStatementSyntax, newModel As SemanticModel, newForEach As ForEachStatementSyntax) As Boolean 597model As SemanticModel, 612Protected Overrides Function ClassifyConversion(model As SemanticModel, expression As ExpressionSyntax, targetType As ITypeSymbol) As Conversion 616Protected Overrides Function ClassifyConversion(model As SemanticModel, originalType As ITypeSymbol, targetType As ITypeSymbol) As Conversion
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (83)
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\ArgumentFixer.vb (1)
36Protected Overrides Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, newArgumentList As ArgumentListSyntax) As SymbolInfo
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (3)
58semanticModel As SemanticModel, 110semanticModel As SemanticModel, 168semanticModel As SemanticModel,
src\Analyzers\VisualBasic\CodeFixes\AddParameter\VisualBasicAddParameterCodeFixProvider.vb (1)
52Protected Overrides Function GetArgumentType(argumentNode As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol
src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (3)
35Protected Overrides Async Function GetDescriptionAsync(diagnostic As Diagnostic, node As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Task(Of String) 40Protected Overrides Async Function GetRootInOtherSyntaxTreeAsync(node As SyntaxNode, semanticModel As SemanticModel, diagnostic As Diagnostic, cancellationToken As CancellationToken) As Task(Of Tuple(Of SyntaxTree, SyntaxNode)) 53Private Shared Async Function GetMethodFromExpressionAsync(oldNode As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Task(Of Tuple(Of SyntaxNode, MethodBlockSyntax))
src\Analyzers\VisualBasic\CodeFixes\ConvertTypeOfToNameOf\VisualBasicConvertGetTypeToNameOfCodeFixProvider.vb (1)
29Protected Overrides Function GetSymbolTypeExpression(semanticModel As SemanticModel, node As MemberAccessExpressionSyntax, cancellationToken As CancellationToken) As SyntaxNode
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\VisualBasicGenerateConstructorService.vb (4)
40Protected Overrides Function GenerateNameForExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As String 45semanticModel As SemanticModel, 169Protected Overrides Function GetCurrentConstructor(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As IMethodSymbol 174Protected Overrides Function GetDelegatedConstructor(semanticModel As SemanticModel, constructor As IMethodSymbol, cancellationToken As CancellationToken) As IMethodSymbol
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicCommonGenerationServiceMethods.vb (2)
10Public Shared Function AreSpecialOptionsActive(semanticModel As SemanticModel) As Boolean 28Public Shared Function IsValidSymbol(symbol As ISymbol, semanticModel As SemanticModel) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (2)
24Protected Overrides Function AreSpecialOptionsActive(semanticModel As SemanticModel) As Boolean 51Protected Overrides Function IsValidSymbol(symbol As ISymbol, semanticModel As SemanticModel) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateMethodService.vb (4)
32Protected Overrides Function AreSpecialOptionsActive(semanticModel As SemanticModel) As Boolean 36Protected Overrides Function IsValidSymbol(symbol As ISymbol, semanticModel As SemanticModel) As Boolean 146Private Shared Function IsLegal(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean 162Protected Overrides Function DetermineReturnTypeForSimpleNameOrMemberAccessExpression(typeInferenceService As ITypeInferenceService, semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As ITypeSymbol
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (2)
43document As Document, model As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken, 90Private Shared Function GetInterfaceType(semanticModel As SemanticModel,
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
38Private Shared Function IsUnnecessaryCast(node As ExpressionSyntax, model As SemanticModel, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryParentheses\VisualBasicRemoveUnnecessaryParenthesesCodeFixProvider.vb (1)
22Protected Overrides Function CanRemoveParentheses(current As ParenthesizedExpressionSyntax, semanticModel As SemanticModel, cancellationtoken As CancellationToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (5)
25Protected Overrides Function GetExplicitNamespaceSymbol(node As SyntaxNode, model As SemanticModel) As INamespaceSymbol 39Protected Overrides Function AddPotentiallyConflictingImportsAsync(model As SemanticModel, container As SyntaxNode, namespaceSymbols As ImmutableArray(Of INamespaceSymbol), conflicts As HashSet(Of INamespaceSymbol), cancellationToken As CancellationToken) As Task 44Private Overloads Shared Function GetExplicitNamespaceSymbol(fullName As ExpressionSyntax, namespacePart As ExpressionSyntax, model As SemanticModel) As INamespaceSymbol 64Private ReadOnly _model As SemanticModel 86model As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (6)
63Public Function IsNamespaceContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 315Public Function IsDelegateCreationContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 339syntaxTree As SyntaxTree, position As Integer, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 346syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 479Public Function IsTypeContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 775Friend Function IsEnumTypeMemberAccessContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContext.vb (2)
53semanticModel As SemanticModel, 158Public Shared Function CreateContext(document As Document, semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As VisualBasicSyntaxContext
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContextService.vb (1)
20Public Function CreateContext(document As Document, semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As SyntaxContext Implements ISyntaxContextService.CreateContext
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
130semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\INamespaceOrTypeSymbolExtensions.vb (1)
19Public Function GetAliasForSymbol(symbol As INamespaceOrTypeSymbol, node As SyntaxNode, semanticModel As SemanticModel) As IAliasSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ParameterSyntaxExtensions.vb (1)
13Public Function CanRemoveAsClause(parameter As ParameterSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\SemanticModelExtensions.vb (6)
17Public Function GenerateParameterNames(semanticModel As SemanticModel, 31Public Function GenerateParameterNames(semanticModel As SemanticModel, 43Public Function GenerateParameterNames(semanticModel As SemanticModel, 64Public Function GenerateParameterNames(semanticModel As SemanticModel, 86Public Function GenerateNameForArgument(semanticModel As SemanticModel, 93Private Function GenerateNameForArgumentWorker(semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSemanticFactsService.vb (17)
48Public Function IsExpressionContext(semanticModel As SemanticModel, 55Public Function IsMemberDeclarationContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsMemberDeclarationContext 61Public Function IsNamespaceContext(semanticModel As SemanticModel, 68Public Function IsStatementContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsStatementContext 74Public Function IsTypeContext(semanticModel As SemanticModel, 81Public Function IsTypeDeclarationContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsTypeDeclarationContext 86Public Function IsGlobalStatementContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsGlobalStatementContext 90Public Function IsLabelContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsLabelContext 96Public Function IsAttributeNameContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsAttributeNameContext 102Public Function IsNamespaceDeclarationNameContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsNamespaceDeclarationNameContext 107semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 112semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, usedNames As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 117semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueLocalName 122semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, usedName As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueLocalName 126Private Function ISemanticFactsService_GenerateUniqueName(semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, filter As Func(Of ISymbol, Boolean), usedNames As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 134Public Function ClassifyConversion(semanticModel As SemanticModel, expression As SyntaxNode, destination As ITypeSymbol) As CommonConversion Implements ISemanticFactsService.ClassifyConversion 138Public Function TryGetDisposeMethod(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As IMethodSymbol Implements ISemanticFactsService.TryGetDisposeMethod
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (17)
18Public Sub New(semanticModel As SemanticModel, cancellationToken As CancellationToken) 29Dim info = SemanticModel.GetTypeInfo(node) 40Dim symbol = SemanticModel.GetSymbolInfo(unaryExpression.Operand, CancellationToken).GetAnySymbol() 109Dim typeSymbol = SemanticModel.GetTypeInfo(expressionType).Type 250Dim info = SemanticModel.GetSymbolInfo(invocation) 261Dim typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken) 280Dim expressionType = SemanticModel.GetTypeInfo(targetExpression) 293Dim info = SemanticModel.GetSymbolInfo(creation.Type) 334Dim info = SemanticModel.GetSymbolInfo(attribute) 610Dim symbol = SemanticModel.GetDeclaredSymbol(name, CancellationToken) 628Dim propertySymbol = SemanticModel.GetDeclaredSymbol(propertySyntax) 783Private Function GetDeclaredMemberSymbolFromOriginalSemanticModel(currentSemanticModel As SemanticModel, declarationInCurrentTree As DeclarationStatementSyntax) As ISymbol 986SemanticModel.GetSymbolInfo(identifier.Identifier).Symbol?.Kind = SymbolKind.Parameter Then 1004Dim right = SemanticModel.GetTypeInfo(initializer.Name).Type 1009Return CreateResult(SemanticModel.GetTypeInfo(initializer.Expression).Type) 1037Dim expressionAddMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expression).GetAllSymbols().OfType(Of IMethodSymbol) 1049Dim initializerAddMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(collectionInitializer).GetAllSymbols().OfType(Of IMethodSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.vb (1)
22Protected Overrides Function CreateTypeInferrer(semanticModel As SemanticModel, cancellationToken As CancellationToken) As AbstractTypeInferrer
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
EndConstructGeneration\EndConstructState.vb (3)
8Private ReadOnly _semanticModel As Lazy(Of SemanticModel) 13Public Sub New(caretPosition As Integer, semanticModel As Lazy(Of SemanticModel), syntaxTree As SyntaxTree, tokenToLeft As SyntaxToken, newLineCharacter As String) 29Public ReadOnly Property SemanticModel As SemanticModel
EndConstructGeneration\VisualBasicEndConstructGenerationService.vb (1)
164caretPosition.Value, New Lazy(Of SemanticModel)(Function() document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult(cancellationToken)), tree, tokenToLeft, bufferOptions.GetNewLineCharacter())
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
Attributes\AttributeTests.vb (4)
2292Dim speculativeModel As SemanticModel = Nothing 2336Dim speculativeModel As SemanticModel = Nothing 2379Dim speculativeModel As SemanticModel = Nothing 2423Dim speculativeModel As SemanticModel = Nothing
CodeGen\CodeGenTuples.vb (1)
3391Private Shared Sub AssertConversions(model As SemanticModel, literal As TupleExpressionSyntax, aggregate As ConversionKind, ParamArray parts As ConversionKind())
Microsoft.CodeAnalysis.VisualBasic.Features (182)
AddImport\VisualBasicAddImportFeatureService.vb (6)
191semanticModel As SemanticModel, 217Protected Overrides Function GetImportNamespacesInScope(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISet(Of INamespaceSymbol) 221Protected Overrides Function GetDeconstructInfo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ITypeSymbol 226semanticModel As SemanticModel, 328semanticModel As SemanticModel, 353Protected Overrides Function IsAddMethodContext(node As SyntaxNode, semanticModel As SemanticModel) As Boolean
ChangeSignature\VisualBasicChangeSignatureService.vb (2)
203Private Shared Function TryGetDeclaredSymbol(semanticModel As SemanticModel, 521Private Shared Function IsParamsArrayExpanded(semanticModel As SemanticModel, node As SyntaxNode, symbolInfo As SymbolInfo, cancellationToken As CancellationToken) As Boolean
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (4)
121semanticModel As SemanticModel, 169Private Shared Function TryGetDelegateSymbol(handlerExpression As ExpressionSyntax, semanticModel As SemanticModel, ByRef delegateSymbol As IMethodSymbol, cancellationToken As CancellationToken) As Boolean 187Private Shared Function ResolveTargetType(ByRef targetType As INamedTypeSymbol, semanticModel As SemanticModel) As Boolean 203Private Shared Function TryGetNameAndTargetType(eventExpression As ExpressionSyntax, containingSymbol As INamedTypeSymbol, semanticModel As SemanticModel, ByRef targetType As INamedTypeSymbol, ByRef actualEventName As String, cancellationToken As CancellationToken) As Boolean
CodeLens\VisualBasicDisplayInfoService.vb (1)
119Public Function GetDisplayName(semanticModel As SemanticModel, node As SyntaxNode) As String Implements ICodeLensDisplayInfoService.GetDisplayName
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.ReferenceRewriter.vb (3)
18Private ReadOnly _semanticModel As SemanticModel 25semanticModel As SemanticModel, 80semanticModel As SemanticModel,
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (4)
73semanticModel As SemanticModel 345Private Shared Function AddExplicitArgumentListIfNeeded(expression As ExpressionSyntax, semanticModel As SemanticModel) As ExpressionSyntax 410newSemanticModelForInlinedDocument As SemanticModel, 411semanticModelBeforeInline As SemanticModel,
Completion\CompletionProviders\AwaitCompletionProvider.vb (1)
53Protected Overrides Function GetTypeSymbolOfExpression(semanticModel As SemanticModel, potentialAwaitableExpression As SyntaxNode, cancellationToken As CancellationToken) As ITypeSymbol
Completion\CompletionProviders\CrefCompletionProvider.vb (5)
100Protected Overrides Async Function GetSymbolsAsync(document As Document, position As Integer, options As CompletionOptions, cancellationToken As CancellationToken) As Task(Of (SyntaxToken, SemanticModel, ImmutableArray(Of ISymbol))) 164Private Overloads Shared Function GetSymbols(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As IEnumerable(Of ISymbol) 176Private Shared Iterator Function GetQualifiedSymbols(qualifiedName As QualifiedNameSyntax, token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As IEnumerable(Of ISymbol) 197semanticModel As SemanticModel, 212semanticModel As SemanticModel,
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (4)
138Private Shared Function GetDottedMembers(position As Integer, qualifiedName As QualifiedNameSyntax, semanticModel As SemanticModel, memberKindKeyword As SyntaxKind, cancellationToken As CancellationToken) As ImmutableArray(Of ISymbol) 191Private Function GetInterfacesAndContainers(position As Integer, node As SyntaxNode, semanticModel As SemanticModel, kind As SyntaxKind, cancellationToken As CancellationToken) As ImmutableArray(Of ISymbol) 228Private Shared Sub AddAliasesAndContainers(symbol As ISymbol, interfacesAndContainers As ICollection(Of ISymbol), node As SyntaxNode, semanticModel As SemanticModel) 246Private Shared Sub AddAlias(symbol As ISymbol, interfacesAndContainers As ICollection(Of ISymbol), node As SyntaxNode, semanticModel As SemanticModel)
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (4)
130Private Shared Function GetParameterLists(semanticModel As SemanticModel, 140Private Shared Function GetObjectCreationExpressionParameterLists(semanticModel As SemanticModel, 155Private Shared Function GetAttributeParameterLists(semanticModel As SemanticModel, 167Private Shared Function GetInvocationExpressionParameterLists(semanticModel As SemanticModel,
Completion\CompletionProviders\ObjectInitializerCompletionProvider.vb (1)
56semanticModel As SemanticModel,
Completion\CompletionProviders\OverrideCompletionProvider.vb (1)
147semanticModel As SemanticModel,
Completion\KeywordRecommenders\Declarations\OfKeywordRecommender.vb (2)
106Private Shared Function IsPartiallyTypedGenericName(type As TypeSyntax, semanticModel As SemanticModel) As Boolean 116Private Shared Function IsGenericDelegateCreationExpression(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
Completion\KeywordRecommenders\RecommendationHelpers.vb (1)
154Optional semanticModel As SemanticModel = Nothing,
Completion\Providers\ContextVariableArgumentProvider.vb (1)
29Protected Overrides Function IsInstanceContext(syntaxTree As SyntaxTree, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (1)
45Protected Overrides Sub ConvertToForStatement(model As SemanticModel, foreachInfo As ForEachInfo, editor As SyntaxEditor, cancellationToken As CancellationToken)
ConvertIfToSwitch\VisualBasicConvertIfToSwitchCodeRefactoringProvider.Analyzer.vb (1)
34Public Overrides Function CanImplicitlyConvert(semanticModel As SemanticModel, syntax As SyntaxNode, targetType As ITypeSymbol) As Boolean
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (2)
40Private ReadOnly _semanticModel As SemanticModel 72Public Sub New(analyzer As VisualBasicSimplifyTypeNamesDiagnosticAnalyzer, semanticModel As SemanticModel, options As VisualBasicSimplifierOptions, analyzerOptions As AnalyzerOptions, ignoredSpans As TextSpanMutableIntervalTree, cancellationToken As CancellationToken)
Diagnostics\Analyzers\VisualBasicPreferFrameworkTypeDiagnosticAnalyzer.vb (1)
27Protected Overrides Function IsIdentifierNameReplaceableWithFrameworkType(semanticModel As SemanticModel, node As IdentifierNameSyntax) As Boolean
Diagnostics\Analyzers\VisualBasicSimplifyTypeNamesDiagnosticAnalyzer.vb (1)
75model As SemanticModel, node As SyntaxNode, options As VisualBasicSimplifierOptions,
Diagnostics\VisualBasicAnalyzerDriverService.vb (1)
22Public Sub ComputeDeclarationsInSpan(model As SemanticModel,
EditAndContinue\DeclarationBody\FieldOrPropertyDeclarationBody.vb (1)
130Public Overrides Function GetCapturedVariables(model As SemanticModel) As ImmutableArray(Of ISymbol)
EditAndContinue\DeclarationBody\FieldWithMultipleArrayBoundsDeclarationBody.vb (1)
35Public Overrides Function GetCapturedVariables(model As SemanticModel) As ImmutableArray(Of ISymbol)
EditAndContinue\DeclarationBody\FieldWithSingleArrayBoundsDeclarationBody.vb (1)
40Public Overrides Function GetCapturedVariables(model As SemanticModel) As ImmutableArray(Of ISymbol)
EditAndContinue\DeclarationBody\MethodBody.vb (1)
21Public Overrides Function GetCapturedVariables(model As SemanticModel) As ImmutableArray(Of ISymbol)
EditAndContinue\DeclarationBody\VisualBasicLambdaBody.vb (1)
44Public Overrides Function GetCapturedVariables(model As SemanticModel) As ImmutableArray(Of ISymbol)
EditAndContinue\SyntaxUtilities.vb (1)
117Friend Shared Function GetArrayBoundsCapturedVariables(model As SemanticModel, arrayBounds As ArgumentListSyntax) As ImmutableArray(Of ISymbol)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (15)
114Protected Overrides Function GetVariableUseSites(roots As IEnumerable(Of SyntaxNode), localOrParameter As ISymbol, model As SemanticModel, cancellationToken As CancellationToken) As IEnumerable(Of SyntaxNode) 637Protected Overrides Function GetDeclaredSymbol(model As SemanticModel, declaration As SyntaxNode, cancellationToken As CancellationToken) As ISymbol 709oldModel As SemanticModel, 710newModel As SemanticModel, 752oldModel As SemanticModel, 753newModel As SemanticModel, 896model As SemanticModel, 943Private Function GetParameterContainingMemberOrType(node As SyntaxNode, otherNode As SyntaxNode, model As SemanticModel, fromOtherMap As IReadOnlyDictionary(Of SyntaxNode, SyntaxNode), cancellationToken As CancellationToken) As ISymbol 1000Friend Overrides Function GetLambdaExpressionSymbol(model As SemanticModel, lambdaExpression As SyntaxNode, cancellationToken As CancellationToken) As IMethodSymbol 1011Friend Overrides Function QueryClauseLambdasTypeEquivalent(oldModel As SemanticModel, oldNode As SyntaxNode, newModel As SemanticModel, newNode As SyntaxNode, cancellationToken As CancellationToken) As Boolean 2288oldModel As SemanticModel, 2291newModel As SemanticModel, 2326oldModel As SemanticModel, 2329newModel As SemanticModel,
ExtractMethod\Extensions.vb (1)
117Public Function IsArgumentForByRefParameter(node As SyntaxNode, model As SemanticModel, cancellationToken As CancellationToken) As Boolean
ExtractMethod\VisualBasicMethodExtractor.Analyzer.vb (1)
40Protected Overrides Function GetRangeVariableType(semanticModel As SemanticModel, symbol As IRangeVariableSymbol) As ITypeSymbol
ExtractMethod\VisualBasicMethodExtractor.PostProcessor.vb (2)
13Private ReadOnly _semanticModel As SemanticModel 16Public Sub New(semanticModel As SemanticModel, contextPosition As Integer)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.SingleStatementCodeGenerator.vb (1)
24Dim semanticModel = CType(SemanticDocument.SemanticModel, SemanticModel)
ExtractMethod\VisualBasicSelectionValidator.Validator.vb (2)
11Public Shared Function Check(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean 21Private Shared Function CheckExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean
ExtractMethod\VisualBasicSelectionValidator.vb (4)
80Private Shared Function CheckErrorCasesAndAppendDescriptions(selectionInfo As SelectionInfo, semanticModel As SemanticModel, cancellationToken As CancellationToken) As SelectionInfo 178semanticModel As SemanticModel, 257semanticModel As SemanticModel, 311semanticModel As SemanticModel,
GenerateMember\GenerateVariable\VisualBasicGenerateVariableService.vb (2)
108Private Shared Function IsLegal(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean 120Protected Overrides Function TryConvertToLocalDeclaration(type As ITypeSymbol, identifierToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken, ByRef newRoot As SyntaxNode) As Boolean
GenerateType\VisualBasicGenerateTypeService.vb (9)
39Protected Overrides Function GenerateParameterNames(semanticModel As SemanticModel, arguments As IList(Of ArgumentSyntax), cancellationToken As CancellationToken) As IList(Of ParameterName) 74Protected Overrides Function IsInValueTypeConstraintContext(semanticModel As SemanticModel, expression As Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax, cancellationToken As System.Threading.CancellationToken) As Boolean 358Private Shared Function GetMemberGroupIfPresent(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IMethodSymbol 376semanticModel As SemanticModel, 393Protected Overrides Function DetermineTypeToGenerateIn(semanticModel As SemanticModel, 403Protected Overrides Function GetAccessibility(state As State, semanticModel As SemanticModel, intoNamespace As Boolean, cancellationToken As CancellationToken) As Accessibility 418Protected Overrides Function DetermineArgumentType(semanticModel As SemanticModel, argument As ArgumentSyntax, cancellationToken As CancellationToken) As ITypeSymbol 678semanticModel As SemanticModel, 706semanticModel As SemanticModel,
GoToDefinition\VisualBasicGoToDefinitionSymbolService.vb (1)
29Protected Overrides Function GetTargetPositionIfControlFlow(semanticModel As SemanticModel, token As SyntaxToken) As Integer?
InlineHints\VisualBasicInlineParameterNameHintsService.vb (1)
25semanticModel As SemanticModel,
LanguageServices\VisualBasicStructuralTypeDisplayService.vb (1)
28semanticModel As SemanticModel,
LanguageServices\VisualBasicSymbolDisplayService.SymbolDescriptionBuilder.vb (2)
30Public Sub New(semanticModel As SemanticModel, 89Protected Overrides Function ToMinimalDisplayParts(symbol As ISymbol, semanticModel As SemanticModel, position As Integer, format As SymbolDisplayFormat) As ImmutableArray(Of SymbolDisplayPart)
LanguageServices\VisualBasicSymbolDisplayService.vb (1)
19Protected Overrides Function CreateDescriptionBuilder(semanticModel As SemanticModel,
NavigationBar\VisualBasicNavigationBarItemService.vb (3)
61Private Shared Function GetTypesAndDeclarationsInFile(semanticModel As SemanticModel, cancellationToken As CancellationToken) As IEnumerable(Of Tuple(Of INamedTypeSymbol, SyntaxNode)) 105semanticModel As SemanticModel, 315semanticModel As SemanticModel,
Organizing\VisualBasicOrganizerService.Rewriter.vb (2)
14Private ReadOnly _semanticModel As SemanticModel 19semanticModel As SemanticModel,
QuickInfo\VisualBasicSemanticQuickInfoProvider.vb (3)
54semanticModel As SemanticModel, 166semanticModel As SemanticModel, 204semanticModel As SemanticModel,
Rename\VisualBasicRenameIssuesService.vb (1)
19Public Function CheckLanguageSpecificIssues(semantic As SemanticModel, symbol As ISymbol, triggerToken As SyntaxToken, <NotNullWhen(True)> ByRef langError As String) As Boolean Implements IRenameIssuesService.CheckLanguageSpecificIssues
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (1)
41semanticModel As SemanticModel,
SignatureHelp\AbstractIntrinsicOperatorSignatureHelpProvider.vb (1)
55Friend Shared Function GetSignatureHelpItemForIntrinsicOperator(document As Document, semanticModel As SemanticModel, position As Integer, documentation As AbstractIntrinsicOperatorDocumentation, cancellationToken As CancellationToken) As SignatureHelpItem
SignatureHelp\AbstractOrdinaryMethodSignatureHelpProvider.vb (3)
16semanticModel As SemanticModel) As SignatureHelpItem 32Private Shared Function GetMemberGroupPreambleParts(symbol As ISymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SymbolDisplayPart) 51semanticModel As SemanticModel,
SignatureHelp\AbstractVisualBasicSignatureHelpProvider.vb (1)
42semanticModel As SemanticModel,
SignatureHelp\AttributeSignatureHelpProvider.vb (3)
109semanticModel As SemanticModel, 133semanticModel As SemanticModel, 181Private Shared Function GetPreambleParts(method As IMethodSymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SymbolDisplayPart)
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (3)
97semanticModel As SemanticModel, 122semanticModel As SemanticModel, 137Private Shared Function GetParameterParts(method As IMethodSymbol, semanticModel As SemanticModel, position As Integer,
SignatureHelp\GenericNameSignatureHelpProvider.Method.vb (2)
9Private Shared Function GetPreambleParts(method As IMethodSymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SymbolDisplayPart) 38Private Shared Function GetPostambleParts(method As IMethodSymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SymbolDisplayPart)
SignatureHelp\GenericNameSignatureHelpProvider.NamedType.vb (1)
9Private Shared Function GetPreambleParts(namedType As INamedTypeSymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SymbolDisplayPart)
SignatureHelp\GenericNameSignatureHelpProvider.vb (3)
117Private Overloads Shared Function Convert(symbol As ISymbol, genericName As GenericNameSyntax, semanticModel As SemanticModel, structuralTypeDisplayService As IStructuralTypeDisplayService, documentationCommentFormattingService As IDocumentationCommentFormattingService) As SignatureHelpItem 149Private Overloads Shared Function Convert(parameter As ITypeParameterSymbol, semanticModel As SemanticModel, position As Integer, documentationCommentFormattingService As IDocumentationCommentFormattingService) As SignatureHelpSymbolParameter 163semanticModel As SemanticModel,
SignatureHelp\InvocationExpressionSignatureHelpProvider.DelegateInvoke.vb (4)
16semanticModel As SemanticModel, 39Private Shared Function GetDelegateInvokePreambleParts(invokeMethod As IMethodSymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SymbolDisplayPart) 52Private Shared Function GetDelegateInvokeParameters(invokeMethod As IMethodSymbol, semanticModel As SemanticModel, position As Integer, documentationCommentFormattingService As IDocumentationCommentFormattingService, cancellationToken As CancellationToken) As IList(Of SignatureHelpSymbolParameter) 67semanticModel As SemanticModel,
SignatureHelp\InvocationExpressionSignatureHelpProvider.ElementAccess.vb (4)
16semanticModel As SemanticModel, 38semanticModel As SemanticModel, 53Private Shared Function GetIndexerPreambleParts(symbol As IPropertySymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SymbolDisplayPart) 61semanticModel As SemanticModel,
SignatureHelp\InvocationExpressionSignatureHelpProvider.MemberGroup.vb (2)
15semanticModel As SemanticModel, 41semanticModel As SemanticModel) As IEnumerable(Of SignatureHelpItem)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.DelegateType.vb (3)
15semanticModel As SemanticModel, 38Private Shared Function GetDelegateTypePreambleParts(invokeMethod As IMethodSymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SymbolDisplayPart) 45Private Shared Function GetDelegateTypeParameters(invokeMethod As IMethodSymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SignatureHelpSymbolParameter)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.NormalType.vb (3)
19semanticModel As SemanticModel, 45Private Shared Function ConvertNormalTypeConstructor(constructor As IMethodSymbol, objectCreationExpression As ObjectCreationExpressionSyntax, semanticModel As SemanticModel, 60Private Shared Function GetNormalTypePreambleParts(method As IMethodSymbol, semanticModel As SemanticModel, position As Integer) As IList(Of SymbolDisplayPart)
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (2)
106semanticModel As SemanticModel, 130semanticModel As SemanticModel,
Snippets\VisualBasicSnippetFunctionService.vb (1)
38Dim model As SemanticModel = Await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\Analyzers\MakeFieldReadonly\VisualBasicMakeFieldReadonlyDiagnosticAnalyzer.vb (1)
19Protected Overrides Function IsWrittenTo(semanticModel As SemanticModel, expression As MeExpressionSyntax, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb (1)
24Protected Overrides Function IsUnnecessaryCast(model As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryParentheses\VisualBasicRemoveUnnecessaryParenthesesDiagnosticAnalyzer.vb (2)
29semanticModel As SemanticModel, cancellationToken As CancellationToken, 38parenthesizedExpression As ParenthesizedExpressionSyntax, semanticModel As SemanticModel,
src\Analyzers\VisualBasic\Analyzers\SimplifyBooleanExpression\VisualBasicSimplifyConditionalDiagnosticAnalyzer.vb (1)
23Protected Overrides Function GetConversion(semanticModel As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As CommonConversion
src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (3)
52semanticModel As SemanticModel, 118Protected Overrides Function GetSetterExpression(semanticModel As SemanticModel, setMethod As IMethodSymbol, cancellationToken As CancellationToken) As ExpressionSyntax 151Protected Overrides Sub AddAccessedFields(semanticModel As SemanticModel, accessor As IMethodSymbol, fieldNames As HashSet(Of String), result As HashSet(Of IFieldSymbol), cancellationToken As CancellationToken)
src\Analyzers\VisualBasic\Analyzers\UseCoalesceExpression\VisualBasicUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.vb (1)
27Protected Overrides Function IsTargetTyped(semanticModel As SemanticModel, conditional As TernaryConditionalExpressionSyntax, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\Analyzers\UseCoalesceExpression\VisualBasicUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.vb (1)
25Protected Overrides Function IsTargetTyped(semanticModel As SemanticModel, conditional As TernaryConditionalExpressionSyntax, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\Analyzers\UseCollectionInitializer\VisualBasicUseCollectionInitializerDiagnosticAnalyzer.vb (1)
41Protected Overrides Function CanUseCollectionExpression(semanticModel As SemanticModel, objectCreationExpression As ObjectCreationExpressionSyntax, expressionType As INamedTypeSymbol, allowSemanticsChange As Boolean, cancellationToken As CancellationToken, ByRef changesSemantics As Boolean) As Boolean
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\ArgumentFixer.vb (1)
36Protected Overrides Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, newArgumentList As ArgumentListSyntax) As SymbolInfo
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (3)
58semanticModel As SemanticModel, 110semanticModel As SemanticModel, 168semanticModel As SemanticModel,
src\Analyzers\VisualBasic\CodeFixes\AddParameter\VisualBasicAddParameterCodeFixProvider.vb (1)
52Protected Overrides Function GetArgumentType(argumentNode As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol
src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (3)
35Protected Overrides Async Function GetDescriptionAsync(diagnostic As Diagnostic, node As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Task(Of String) 40Protected Overrides Async Function GetRootInOtherSyntaxTreeAsync(node As SyntaxNode, semanticModel As SemanticModel, diagnostic As Diagnostic, cancellationToken As CancellationToken) As Task(Of Tuple(Of SyntaxTree, SyntaxNode)) 53Private Shared Async Function GetMethodFromExpressionAsync(oldNode As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Task(Of Tuple(Of SyntaxNode, MethodBlockSyntax))
src\Analyzers\VisualBasic\CodeFixes\ConvertTypeOfToNameOf\VisualBasicConvertGetTypeToNameOfCodeFixProvider.vb (1)
29Protected Overrides Function GetSymbolTypeExpression(semanticModel As SemanticModel, node As MemberAccessExpressionSyntax, cancellationToken As CancellationToken) As SyntaxNode
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\VisualBasicGenerateConstructorService.vb (4)
40Protected Overrides Function GenerateNameForExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As String 45semanticModel As SemanticModel, 169Protected Overrides Function GetCurrentConstructor(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As IMethodSymbol 174Protected Overrides Function GetDelegatedConstructor(semanticModel As SemanticModel, constructor As IMethodSymbol, cancellationToken As CancellationToken) As IMethodSymbol
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicCommonGenerationServiceMethods.vb (2)
10Public Shared Function AreSpecialOptionsActive(semanticModel As SemanticModel) As Boolean 28Public Shared Function IsValidSymbol(symbol As ISymbol, semanticModel As SemanticModel) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (2)
24Protected Overrides Function AreSpecialOptionsActive(semanticModel As SemanticModel) As Boolean 51Protected Overrides Function IsValidSymbol(symbol As ISymbol, semanticModel As SemanticModel) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateMethodService.vb (4)
32Protected Overrides Function AreSpecialOptionsActive(semanticModel As SemanticModel) As Boolean 36Protected Overrides Function IsValidSymbol(symbol As ISymbol, semanticModel As SemanticModel) As Boolean 146Private Shared Function IsLegal(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean 162Protected Overrides Function DetermineReturnTypeForSimpleNameOrMemberAccessExpression(typeInferenceService As ITypeInferenceService, semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As ITypeSymbol
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (2)
43document As Document, model As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken, 90Private Shared Function GetInterfaceType(semanticModel As SemanticModel,
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
38Private Shared Function IsUnnecessaryCast(node As ExpressionSyntax, model As SemanticModel, cancellationToken As CancellationToken) As Boolean
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryParentheses\VisualBasicRemoveUnnecessaryParenthesesCodeFixProvider.vb (1)
22Protected Overrides Function CanRemoveParentheses(current As ParenthesizedExpressionSyntax, semanticModel As SemanticModel, cancellationtoken As CancellationToken) As Boolean
src\Compilers\VisualBasic\BasicAnalyzerDriver\VisualBasicDeclarationComputer.vb (3)
15Public Shared Sub ComputeDeclarationsInSpan(model As SemanticModel, 25Public Shared Sub ComputeDeclarationsInNode(model As SemanticModel, 41Private Shared Sub ComputeDeclarationsCore(model As SemanticModel,
UseNamedArguments\VisualBasicUseNamedArgumentsCodeRefactoringProvider.vb (1)
53Protected Overrides Function IsImplicitIndexOrRangeIndexer(parameters As ImmutableArray(Of IParameterSymbol), argument As ArgumentSyntax, semanticModel As SemanticModel) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (73)
Binding\ImplicitVariableTests.vb (2)
1019Dim speculative As SemanticModel = Nothing 1061Dim speculative As SemanticModel = Nothing
Compilation\GetSemanticInfoBrokenCodeTests.vb (2)
484Private Sub VisitAllExpressions(model As SemanticModel, node As VisualBasicSyntaxNode) 493Private Sub VisitAllDeclarations(model As SemanticModel, node As VisualBasicSyntaxNode)
Compilation\SemanticModelAPITests.vb (33)
605Dim speculativeModel As SemanticModel = Nothing 667Dim speculativeModel As SemanticModel = Nothing 719Dim speculativeModel As SemanticModel = Nothing 765Dim speculativeModel As SemanticModel = Nothing 824Dim speculativeModel As SemanticModel = Nothing 897Dim speculativeModel As SemanticModel = Nothing 940Dim speculativeModel As SemanticModel = Nothing 975Dim speculativeModel As SemanticModel = Nothing 1010Dim speculativeModel As SemanticModel = Nothing 1046Dim speculativeModel As SemanticModel = Nothing 1085Dim speculativeModel As SemanticModel = Nothing 1128Dim speculativeModel As SemanticModel = Nothing 1142Dim newSpeculativeModel As SemanticModel = Nothing 1173Dim speculativeModel As SemanticModel = Nothing 1181Dim newSpeculativeModel As SemanticModel = Nothing 1223Dim speculativeModel As SemanticModel = Nothing 1392Dim speculativeModel As SemanticModel = Nothing 1435Dim speculativeModel As SemanticModel = Nothing 1443Private Shared Sub VerifySpeculativeSemanticModelForMethodBody(speculatedMethod As MethodBlockBaseSyntax, speculativeModel As SemanticModel) 1505Dim speculativeModel As SemanticModel = Nothing 1554Dim speculativeModel As SemanticModel = Nothing 1588Dim speculativeModel As SemanticModel = Nothing 1666Dim speculativeModel As SemanticModel = Nothing 1702Dim speculativeModel As SemanticModel = Nothing 1714Private Shared Sub TestGetSpeculativeSemanticModelForTypeSyntax_Common(model As SemanticModel, position As Integer, speculatedTypeSyntax As TypeSyntax, bindingOption As SpeculativeBindingOption, expectedSymbolKind As SymbolKind, expectedTypeDisplayString As String) 1719Dim speculativeModel As SemanticModel = Nothing 1832Dim speculativeModel As SemanticModel = Nothing 1920Dim speculativeModel As SemanticModel = Nothing 1950Dim speculativeModel As SemanticModel = Nothing 1989Dim speculativeModel As SemanticModel = Nothing 2024Dim speculativeModel As SemanticModel = Nothing 3996Dim speculativeModel As SemanticModel = Nothing 4127Dim speculativeModel As SemanticModel = Nothing
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (8)
751semanticModel As SemanticModel, 888semanticModel As SemanticModel, 896semanticModel As SemanticModel, 904semanticModel As SemanticModel, 1160semanticModel As SemanticModel, 1176semanticModel As SemanticModel, 1781semanticModel As SemanticModel, 1894semanticModel As SemanticModel,
Compilation\SuppressAccessibilityChecksTests.vb (3)
17Private Function GetSemanticModelWithIgnoreAccessibility() As SemanticModel 84Dim speculativeSemanticModel As SemanticModel = Nothing 246Dim speculativeModel As SemanticModel = Nothing
DeclaringSyntaxNodeTests.vb (1)
34Dim model As SemanticModel = compilation.GetSemanticModel(tree)
Diagnostics\DiagnosticAnalyzerTests.vb (3)
1707Private ReadOnly _cache As New ConcurrentDictionary(Of SyntaxTree, SemanticModel)() 1710Public Overrides Function GetSemanticModel(tree As SyntaxTree, compilation As Compilation, Optional options As SemanticModelOptions = SemanticModelOptions.None) As SemanticModel 1714Public Sub VerifyCachedModel(tree As SyntaxTree, model As SemanticModel)
Extensions.vb (1)
21Friend Function GetDeclaredSymbolFromSyntaxNode(model As SemanticModel, node As SyntaxNode, Optional cancellationToken As CancellationToken = Nothing) As Symbol
FlowAnalysis\FlowTestBase.vb (3)
73Private Function CompileAndGetModelAndSpan(Of T)(program As XElement, analysisDelegate As Func(Of SemanticModel, List(Of VisualBasicSyntaxNode), List(Of VisualBasicSyntaxNode), T), ilSource As XCData, errors As XElement) As T 109Protected Function AnalyzeControlFlow(model As SemanticModel, 123Protected Function AnalyzeDataFlow(model As SemanticModel,
Semantics\BinaryOperators.vb (1)
1023semanticModel As SemanticModel,
Semantics\ForeachTest.vb (1)
1385Private Function GetModel(compilation As VisualBasicCompilation) As SemanticModel
Semantics\ForLoopTest.vb (1)
654Private Function GetModel(compilation As VisualBasicCompilation) As SemanticModel
Semantics\GetExtendedSemanticInfoTests.vb (6)
8523Dim containingType = DirectCast(model, SemanticModel).GetEnclosingSymbol(SLDeclaration.SpanStart) 8529Dim TI = DirectCast(model, SemanticModel).GetTypeInfo(SLDeclaration) 8530Dim mG = DirectCast(model, SemanticModel).GetAliasInfo(SLDeclaration) 8532Dim lus1 = DirectCast(model, SemanticModel).LookupSymbols(SLDeclaration.SpanStart, name:="i") 8561Dim ai = DirectCast(model, SemanticModel).GetAliasInfo(id) 8562Dim si = DirectCast(model, SemanticModel).GetSymbolInfo(id)
Semantics\GetSemanticInfoTests.vb (1)
4421semanticModel As SemanticModel,
Semantics\IFOperatorTest.vb (1)
1239Private Function GetModel(compilation As VisualBasicCompilation) As SemanticModel
Semantics\MultiDimensionalTest.vb (1)
372Private Function GetModel(compilation As VisualBasicCompilation) As SemanticModel
Semantics\QueryExpressions_SemanticModel.vb (1)
3816Dim semanticModel As SemanticModel = compilation.GetSemanticModel(tree)
Semantics\UnaryOperators.vb (1)
695semanticModel As SemanticModel,
Semantics\VariableTypeInference.vb (1)
702Private Sub CheckVariableType(tree As SyntaxTree, model As SemanticModel, textToFind As String, typeName As String)
Semantics\WithBlockSemanticModelTests.vb (1)
324Dim modelAB As SemanticModel = Nothing
Semantics\XmlLiteralSemanticModelTests.vb (1)
418Private Sub ValueExtensionPropertyCore(model As SemanticModel, expr As MemberAccessExpressionSyntax)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (13)
DocumentationComments\DocCommentTests.vb (8)
1115Assert.Equal("Public Sub Main()", TryCast(model, SemanticModel).GetEnclosingSymbol(names(0).SpanStart).ToDisplayString()) 10074Private Sub CheckAllNames(model As SemanticModel, cref As CrefReferenceSyntax, ParamArray expected As NameSyntaxInfo()) 11889Private Sub CheckAllAliases(model As SemanticModel, cref As CrefReferenceSyntax, ParamArray expected As AliasInfo()) 11952Private Function CheckSymbolInfoOnly(model As SemanticModel, syntax As ExpressionSyntax, ParamArray expected() As String) As ImmutableArray(Of ISymbol) 11986Private Sub EnsureSymbolInfoOnCrefReference(model As SemanticModel, syntax As ExpressionSyntax) 12007Private Function CheckTypeParameterCrefSymbolInfoAndTypeInfo(model As SemanticModel, syntax As ExpressionSyntax, Optional expected As String = Nothing) As ImmutableArray(Of Symbol) 12030Private Function CheckSymbolInfoAndTypeInfo(model As SemanticModel, syntax As ExpressionSyntax, ParamArray expected() As String) As ImmutableArray(Of Symbol) 12071Private Sub TestSymbolAndTypeInfoForType(model As SemanticModel, syntax As TypeSyntax, expected As ISymbol)
SymbolDisplay\SymbolDisplayTests.vb (2)
6028Dim semanticModel As SemanticModel = comp.GetSemanticModel(tree) 6037Dim speculativeModel As SemanticModel = Nothing
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (2)
130Private Sub CheckAnonymousTypeExplicit(model As SemanticModel, local As LocalSymbol, anonObjectCreation As AnonymousObjectCreationExpressionSyntax) 1924Private Sub CheckFieldNameAndLocation(model As SemanticModel, type As ITypeSymbol, tree As SyntaxTree, identifierIndex As Integer, fieldName As String, Optional isKey As Boolean = False)
SymbolsTests\Source\BindingsTests.vb (1)
19semanticModel As SemanticModel,
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (6)
CompilationTestUtils.vb (6)
537Public Function GetSemanticInfoSummary(model As SemanticModel, node As SyntaxNode) As SemanticInfoSummary 577Public Function GetSpeculativeSemanticInfoSummary(model As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As SemanticInfoSummary 1084semanticModel As SemanticModel, 1098semanticModel As SemanticModel, 1112semanticModel As SemanticModel, 1247Friend Function LookupNames(model As SemanticModel,
Microsoft.CodeAnalysis.VisualBasic.Workspaces (235)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (3)
43Private ReadOnly _semanticModel As SemanticModel 47Public Sub New(syntaxFactsService As ISyntaxFactsService, semanticModel As SemanticModel, cancellationToken As CancellationToken) 172Private Function GetAliasOrAnySymbol(model As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISymbol
CaseCorrection\VisualBasicCaseCorrectionService.vb (2)
27Protected Overrides Sub AddReplacements(semanticModel As SemanticModel, 37Private Sub AddReplacementsWorker(semanticModel As SemanticModel,
Classification\SyntaxClassification\IdentifierNameSyntaxClassifier.vb (1)
21Public Overrides Sub AddClassifications(syntax As SyntaxNode, textSpan As TextSpan, semanticModel As SemanticModel, options As ClassificationOptions, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken)
Classification\SyntaxClassification\ImportAliasClauseSyntaxClassifier.vb (2)
20Public Overrides Sub AddClassifications(syntax As SyntaxNode, textSpan As TextSpan, semanticModel As SemanticModel, options As ClassificationOptions, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) 26semanticModel As SemanticModel,
Classification\SyntaxClassification\NameSyntaxClassifier.vb (5)
33semanticModel As SemanticModel, 69semanticModel As SemanticModel, 154semanticModel As SemanticModel, 167semanticModel As SemanticModel, 277Private Shared Sub ClassifyMethodStatement(methodStatement As MethodStatementSyntax, semanticModel As SemanticModel, result As SegmentedList(Of ClassifiedSpan))
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
25semanticModel As SemanticModel,
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (9)
11Public Function RewriteMethodStatement(func As MethodStatementSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As MethodStatementSyntax 15Public Function RewriteMethodStatement(func As MethodStatementSyntax, semanticModel As SemanticModel, oldFunc As MethodStatementSyntax, cancellationToken As CancellationToken) As MethodStatementSyntax 33Public Function RewriteLambdaHeader(lambdaHeader As LambdaHeaderSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As LambdaHeaderSyntax 37Public Function RewriteLambdaHeader(lambdaHeader As LambdaHeaderSyntax, semanticModel As SemanticModel, oldLambdaHeader As LambdaHeaderSyntax, cancellationToken As CancellationToken) As LambdaHeaderSyntax 56semanticModel As SemanticModel, 79semanticModel As SemanticModel, 112semanticModel As SemanticModel, 153semanticModel As SemanticModel, 178Private Sub RewriteFunctionAsClause(genericType As INamedTypeSymbol, ByRef asClauseOpt As SimpleAsClauseSyntax, semanticModel As SemanticModel, position As Integer)
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (2)
36Private ReadOnly _model As SemanticModel 38Private Sub New(semanticModel As SemanticModel, spans As ImmutableArray(Of TextSpan), cancellationToken As CancellationToken)
CodeCleanup\Providers\FixIncorrectTokensCodeCleanupProvider.vb (2)
45Private ReadOnly _semanticModel As SemanticModel 47Private Sub New(semanticModel As SemanticModel,
ObsoleteSymbol\VisualBasicObsoleteSymbolService.vb (1)
25Protected Overrides Sub ProcessDimKeyword(ByRef result As ArrayBuilder(Of TextSpan), semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken)
Rename\VisualBasicRenameRewriterLanguageService.vb (5)
48Private ReadOnly _semanticModel As SemanticModel 92Private _speculativeModel As SemanticModel 901semanticModel As SemanticModel, 1019Public Shared Function GetSemanticModelForNode(node As SyntaxNode, originalSemanticModel As SemanticModel) As SemanticModel
SemanticModelReuse\VisualBasicSemanticModelReuseLanguageService.vb (3)
56Protected Overrides Function TryGetSpeculativeSemanticModelWorker(previousSemanticModel As SemanticModel, previousBodyNode As SyntaxNode, currentBodyNode As SyntaxNode) As SemanticModel 64Dim speculativeModel As SemanticModel = Nothing
Simplification\Reducers\AbstractVisualBasicReducer.AbstractReductionRewriter.vb (6)
24Private _semanticModel As SemanticModel 83simplifyFunc As Func(Of TNode, SemanticModel, VisualBasicSimplifierOptions, CancellationToken, SyntaxNode) 115simplifyFunc As Func(Of SyntaxToken, SemanticModel, VisualBasicSimplifierOptions, CancellationToken, SyntaxToken) 159simplifier As Func(Of TExpression, SemanticModel, VisualBasicSimplifierOptions, CancellationToken, SyntaxNode) 168simplifier As Func(Of TStatement, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) 174Public Function VisitNodeOrToken(nodeOrToken As SyntaxNodeOrToken, semanticModel As SemanticModel, simplifyAllDescendants As Boolean) As SyntaxNodeOrToken Implements IReductionRewriter.VisitNodeOrToken
Simplification\Reducers\AbstractVisualBasicReducer.vb (2)
21Protected Shared ReadOnly s_reduceParentheses As Func(Of ParenthesizedExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf ReduceParentheses 25semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicCallReducer.vb (2)
18Private Shared ReadOnly s_simplifyCallStatement As Func(Of CallStatementSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyCallStatement 30semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicCastReducer.vb (4)
18Private Shared ReadOnly s_simplifyCast As Func(Of CastExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyCast 30semanticModel As SemanticModel, 42Private Shared ReadOnly s_simplifyPredefinedCast As Func(Of PredefinedCastExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyPredefinedCast 46semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicEscapingReducer.vb (1)
28Private Shared Function TryUnescapeToken(identifier As SyntaxToken, semanticModel As SemanticModel, options As VisualBasicSimplifierOptions, cancellationToken As CancellationToken) As SyntaxToken
Simplification\Reducers\VisualBasicExtensionMethodReducer.vb (2)
17Private Shared ReadOnly s_simplifyInvocationExpression As Func(Of InvocationExpressionSyntax, SemanticModel, VisualBasicSimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyInvocationExpression 29semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicInferredMemberNameReducer.Rewriter.vb (4)
21Private ReadOnly s_simplifyTupleName As Func(Of SimpleArgumentSyntax, SemanticModel, SimplifierOptions, CancellationToken, SimpleArgumentSyntax) = AddressOf SimplifyTupleName 22Private ReadOnly s_simplifyNamedFieldInitializer As Func(Of NamedFieldInitializerSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyNamedFieldInitializer 24Private Function SimplifyNamedFieldInitializer(node As NamedFieldInitializerSyntax, arg2 As SemanticModel, options As SimplifierOptions, arg4 As CancellationToken) As SyntaxNode 34semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicMiscellaneousReducer.vb (6)
18Private Shared ReadOnly s_simplifyParameter As Func(Of ParameterSyntax, SemanticModel, SimplifierOptions, CancellationToken, ParameterSyntax) = AddressOf SimplifyParameter 30semanticModel As SemanticModel, 43Private Shared ReadOnly s_simplifyInvocationExpression As Func(Of InvocationExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyInvocationExpression 47semanticModel As SemanticModel, 66Private Shared ReadOnly s_simplifyObjectCreationExpression As Func(Of ObjectCreationExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyObjectCreationExpression 70semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicNameReducer.vb (2)
22Private Shared ReadOnly s_simplifyName As Func(Of ExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyName 34semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicVariableDeclaratorReducer.vb (4)
21Private Shared ReadOnly s_simplifyVariableDeclarator As Func(Of VariableDeclaratorSyntax, SemanticModel, VisualBasicSimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyVariableDeclarator 33semanticModel As SemanticModel, 51semanticModel As SemanticModel, 144semanticModel As SemanticModel,
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (2)
62semanticModel As SemanticModel, 150Private Shared Function ValidateAliasForTarget(aliasReplacement As IAliasSymbol, semanticModel As SemanticModel, node As ExpressionSyntax, symbol As ISymbol) As Boolean
Simplification\Simplifiers\ExpressionSimplifier.vb (8)
25semanticModel As SemanticModel, 52semanticModel As SemanticModel, 76semanticModel As SemanticModel, 173semanticModel As SemanticModel, 219Private Shared Function ReplacementChangesSemantics(originalExpression As ExpressionSyntax, replacedExpression As ExpressionSyntax, semanticModel As SemanticModel) As Boolean 228semanticModel As SemanticModel, 272semanticModel As SemanticModel, 298semanticModel As SemanticModel,
Simplification\Simplifiers\MemberAccessExpressionSimplifier.vb (1)
26Protected Overrides Function GetSpeculationAnalyzer(semanticModel As SemanticModel, memberAccessExpression As MemberAccessExpressionSyntax, cancellationToken As CancellationToken) As ISpeculationAnalyzer
Simplification\Simplifiers\NameSimplifier.vb (4)
27semanticModel As SemanticModel, 289semanticModel As SemanticModel, 324Private Shared Function TryOmitModuleName(name As QualifiedNameSyntax, semanticModel As SemanticModel, <Out()> ByRef replacementNode As ExpressionSyntax, <Out()> ByRef issueSpan As TextSpan, cancellationToken As CancellationToken) As Boolean 354semanticModel As SemanticModel,
Simplification\VisualBasicSimplificationService.Expander.vb (4)
17Private ReadOnly _semanticModel As SemanticModel 24semanticModel As SemanticModel, 63Private Function AddCast(expression As ExpressionSyntax, targetType As ITypeSymbol, semanticModel As SemanticModel) As ExpressionSyntax 793Private Function IsTypeOfUnboundGenericType(semanticModel As SemanticModel, typeOfExpression As TypeOfExpressionSyntax) As Boolean
Simplification\VisualBasicSimplificationService.vb (6)
51Public Overrides Function Expand(node As SyntaxNode, semanticModel As SemanticModel, aliasReplacementAnnotation As SyntaxAnnotation, expandInsideNode As Func(Of SyntaxNode, Boolean), expandParameter As Boolean, cancellationToken As CancellationToken) As SyntaxNode 70Public Overrides Function Expand(token As SyntaxToken, semanticModel As SemanticModel, expandInsideNode As Func(Of SyntaxNode, Boolean), cancellationToken As CancellationToken) As SyntaxToken 77Protected Overrides Function GetSpeculativeSemanticModel(ByRef nodeToSpeculate As SyntaxNode, originalSemanticModel As SemanticModel, originalNode As SyntaxNode) As SemanticModel 81Dim speculativeModel As SemanticModel 164Protected Overrides Sub GetUnusedNamespaceImports(model As SemanticModel, namespaceImports As HashSet(Of SyntaxNode), cancellationToken As CancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (2)
15semanticModel As SemanticModel, 24semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (10)
104semanticModel As SemanticModel, 142semanticModel As SemanticModel, 173semanticModel As SemanticModel, 189semanticModel As SemanticModel, 200semanticModel As SemanticModel, 211semanticModel As SemanticModel, 278Public Function IsInRefContext(expression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 362Public Function IsWrittenTo(expression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 465Public Function CanReplaceWithRValue(expression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 472Public Function CanReplaceWithLValue(expression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\InvocationExpressionSyntaxExtensions.vb (2)
12Public Function CanRemoveEmptyArgumentList(invocationExpression As InvocationExpressionSyntax, semanticModel As SemanticModel) As Boolean 17Private Function CanHaveOmittedArgumentList(invocationExpression As InvocationExpressionSyntax, semanticModel As SemanticModel) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ParenthesizedExpressionSyntaxExtensions.vb (2)
13Private Function EndsQuery(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 43semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (10)
15Public Function LookupTypeRegardlessOfArity(semanticModel As SemanticModel, 30Public Function LookupName(semanticModel As SemanticModel, name As SyntaxToken, 42Public Function LookupName(semanticModel As SemanticModel, 72Public Function GetSymbolInfo(semanticModel As SemanticModel, token As SyntaxToken) As SymbolInfo 82Public Function GetImportNamespacesInScope(semanticModel As SemanticModel, location As SyntaxNode) As ISet(Of INamespaceSymbol) 96Public Function GetAliasInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IAliasSymbol 106Public Function DetermineAccessibilityConstraint(semanticModel As SemanticModel, 178Public Iterator Function GetAliasSymbols(semanticModel As SemanticModel) As IEnumerable(Of IAliasSymbol) 195Public Function GenerateNameForExpression(semanticModel As SemanticModel, 240Private Function TryGenerateNameForArgumentExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As String
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (1)
1067semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\VariableDeclaratorSyntaxExtensions.vb (2)
29Public Function Type(variableDeclarator As VariableDeclaratorSyntax, semanticModel As SemanticModel) As ITypeSymbol 48Public Function IsTypeInferred(variableDeclarator As VariableDeclaratorSyntax, semanticModel As SemanticModel) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicUnnecessaryImportsProvider.vb (5)
26model As SemanticModel, 72Private Shared Function RemovalCausesAmbiguity(model As SemanticModel, redundantImport As ImportsClauseSyntax, cancellationToken As CancellationToken) As Boolean 86semanticModel As SemanticModel, 110semanticModel As SemanticModel, 133semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (25)
40Public Function IsOnlyWrittenTo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsOnlyWrittenTo 44Public Function IsWrittenTo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsWrittenTo 48Public Function IsInOutContext(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInOutContext 52Public Function IsInRefContext(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInRefContext 56Public Function IsInInContext(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInInContext 60Public Function CanReplaceWithRValue(semanticModel As SemanticModel, expression As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.CanReplaceWithRValue 64Public Function GetDeclaredSymbol(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.GetDeclaredSymbol 110Public Function TryGetSpeculativeSemanticModel(oldSemanticModel As SemanticModel, oldNode As SyntaxNode, newNode As SyntaxNode, <Out> ByRef speculativeModel As SemanticModel) As Boolean Implements ISemanticFacts.TryGetSpeculativeSemanticModel 140Dim vbSpeculativeModel As SemanticModel = Nothing 146Public Function GetAliasNameSet(model As SemanticModel, cancellationToken As CancellationToken) As ImmutableHashSet(Of String) Implements ISemanticFacts.GetAliasNameSet 167Public Function GetForEachSymbols(model As SemanticModel, forEachStatement As SyntaxNode) As ForEachSymbols Implements ISemanticFacts.GetForEachSymbols 193Public Function GetCollectionInitializerSymbolInfo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As SymbolInfo Implements ISemanticFacts.GetCollectionInitializerSymbolInfo 197Public Function GetGetAwaiterMethod(model As SemanticModel, node As SyntaxNode) As IMethodSymbol Implements ISemanticFacts.GetGetAwaiterMethod 207Public Function GetDeconstructionAssignmentMethods(model As SemanticModel, deconstruction As SyntaxNode) As ImmutableArray(Of IMethodSymbol) Implements ISemanticFacts.GetDeconstructionAssignmentMethods 211Public Function GetDeconstructionForEachMethods(model As SemanticModel, deconstruction As SyntaxNode) As ImmutableArray(Of IMethodSymbol) Implements ISemanticFacts.GetDeconstructionForEachMethods 223Public Function GetDeclaredSymbols(semanticModel As SemanticModel, memberDeclaration As SyntaxNode, cancellationToken As CancellationToken) As IEnumerable(Of ISymbol) Implements ISemanticFacts.GetDeclaredSymbols 233Public Function FindParameterForArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForArgument 237Public Function FindParameterForAttributeArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForAttributeArgument 241Public Function FindFieldOrPropertyForArgument(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.FindFieldOrPropertyForArgument 256Public Function FindFieldOrPropertyForAttributeArgument(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.FindFieldOrPropertyForAttributeArgument 260Public Function GetBestOrAllSymbols(semanticModel As SemanticModel, node As SyntaxNode, token As SyntaxToken, cancellationToken As CancellationToken) As ImmutableArray(Of ISymbol) Implements ISemanticFacts.GetBestOrAllSymbols 266Public Function IsInsideNameOfExpression(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInsideNameOfExpression 274Public Function IsInExpressionTree(semanticModel As SemanticModel, node As SyntaxNode, expressionTypeOpt As INamedTypeSymbol, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInExpressionTree 278Public Function GenerateNameForExpression(semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (5)
16Private ReadOnly _semanticModel As SemanticModel 23semanticModel As SemanticModel, 57Private Shared Function GetOuterCastType(expression As ExpressionSyntax, expressionTypeInfo As TypeInfo, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol 142Private Shared Function AsTypeInVariableDeclarator(node As SyntaxNode, semanticModel As SemanticModel) As ITypeSymbol 428semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (17)
44Public Sub New(expression As ExpressionSyntax, newExpression As ExpressionSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken, Optional skipVerificationForReplacedNode As Boolean = False, Optional failOnOverloadResolutionFailuresInOriginalCode As Boolean = False) 100Protected Overrides Sub ValidateSpeculativeSemanticModel(speculativeSemanticModel As SemanticModel, nodeToSpeculate As SyntaxNode) 107Protected Overrides Function CreateSpeculativeSemanticModel(originalNode As SyntaxNode, nodeToSpeculate As SyntaxNode, semanticModel As SemanticModel) As SemanticModel 111Public Shared Function CreateSpeculativeSemanticModelForNode(originalNode As SyntaxNode, nodeToSpeculate As SyntaxNode, semanticModel As SemanticModel) As SemanticModel 117Public Shared Function CreateSpeculativeSemanticModelForNode(nodeToSpeculate As SyntaxNode, semanticModel As SemanticModel, position As Integer, isInNamespaceOrTypeContext As Boolean) As SemanticModel 126Dim speculativeModel As SemanticModel = Nothing 444Protected Overrides Function IsForEachTypeInferred(forEachStatement As ForEachStatementSyntax, semanticModel As SemanticModel) As Boolean 543Protected Overrides Function ConversionsAreCompatible(originalModel As SemanticModel, originalExpression As ExpressionSyntax, newModel As SemanticModel, newExpression As ExpressionSyntax) As Boolean 590Protected Overrides Function ForEachConversionsAreCompatible(originalModel As SemanticModel, originalForEach As ForEachStatementSyntax, newModel As SemanticModel, newForEach As ForEachStatementSyntax) As Boolean 597model As SemanticModel, 612Protected Overrides Function ClassifyConversion(model As SemanticModel, expression As ExpressionSyntax, targetType As ITypeSymbol) As Conversion 616Protected Overrides Function ClassifyConversion(model As SemanticModel, originalType As ITypeSymbol, targetType As ITypeSymbol) As Conversion
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (5)
25Protected Overrides Function GetExplicitNamespaceSymbol(node As SyntaxNode, model As SemanticModel) As INamespaceSymbol 39Protected Overrides Function AddPotentiallyConflictingImportsAsync(model As SemanticModel, container As SyntaxNode, namespaceSymbols As ImmutableArray(Of INamespaceSymbol), conflicts As HashSet(Of INamespaceSymbol), cancellationToken As CancellationToken) As Task 44Private Overloads Shared Function GetExplicitNamespaceSymbol(fullName As ExpressionSyntax, namespacePart As ExpressionSyntax, model As SemanticModel) As INamespaceSymbol 64Private ReadOnly _model As SemanticModel 86model As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (6)
63Public Function IsNamespaceContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 315Public Function IsDelegateCreationContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 339syntaxTree As SyntaxTree, position As Integer, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 346syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 479Public Function IsTypeContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 775Friend Function IsEnumTypeMemberAccessContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContext.vb (2)
53semanticModel As SemanticModel, 158Public Shared Function CreateContext(document As Document, semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As VisualBasicSyntaxContext
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContextService.vb (1)
20Public Function CreateContext(document As Document, semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As SyntaxContext Implements ISyntaxContextService.CreateContext
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
130semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\INamespaceOrTypeSymbolExtensions.vb (1)
19Public Function GetAliasForSymbol(symbol As INamespaceOrTypeSymbol, node As SyntaxNode, semanticModel As SemanticModel) As IAliasSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ParameterSyntaxExtensions.vb (1)
13Public Function CanRemoveAsClause(parameter As ParameterSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\SemanticModelExtensions.vb (6)
17Public Function GenerateParameterNames(semanticModel As SemanticModel, 31Public Function GenerateParameterNames(semanticModel As SemanticModel, 43Public Function GenerateParameterNames(semanticModel As SemanticModel, 64Public Function GenerateParameterNames(semanticModel As SemanticModel, 86Public Function GenerateNameForArgument(semanticModel As SemanticModel, 93Private Function GenerateNameForArgumentWorker(semanticModel As SemanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSemanticFactsService.vb (17)
48Public Function IsExpressionContext(semanticModel As SemanticModel, 55Public Function IsMemberDeclarationContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsMemberDeclarationContext 61Public Function IsNamespaceContext(semanticModel As SemanticModel, 68Public Function IsStatementContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsStatementContext 74Public Function IsTypeContext(semanticModel As SemanticModel, 81Public Function IsTypeDeclarationContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsTypeDeclarationContext 86Public Function IsGlobalStatementContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsGlobalStatementContext 90Public Function IsLabelContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsLabelContext 96Public Function IsAttributeNameContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsAttributeNameContext 102Public Function IsNamespaceDeclarationNameContext(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Boolean Implements ISemanticFactsService.IsNamespaceDeclarationNameContext 107semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 112semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, usedNames As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 117semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueLocalName 122semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, usedName As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueLocalName 126Private Function ISemanticFactsService_GenerateUniqueName(semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, filter As Func(Of ISymbol, Boolean), usedNames As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 134Public Function ClassifyConversion(semanticModel As SemanticModel, expression As SyntaxNode, destination As ITypeSymbol) As CommonConversion Implements ISemanticFactsService.ClassifyConversion 138Public Function TryGetDisposeMethod(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As IMethodSymbol Implements ISemanticFactsService.TryGetDisposeMethod
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (17)
18Public Sub New(semanticModel As SemanticModel, cancellationToken As CancellationToken) 29Dim info = SemanticModel.GetTypeInfo(node) 40Dim symbol = SemanticModel.GetSymbolInfo(unaryExpression.Operand, CancellationToken).GetAnySymbol() 109Dim typeSymbol = SemanticModel.GetTypeInfo(expressionType).Type 250Dim info = SemanticModel.GetSymbolInfo(invocation) 261Dim typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken) 280Dim expressionType = SemanticModel.GetTypeInfo(targetExpression) 293Dim info = SemanticModel.GetSymbolInfo(creation.Type) 334Dim info = SemanticModel.GetSymbolInfo(attribute) 610Dim symbol = SemanticModel.GetDeclaredSymbol(name, CancellationToken) 628Dim propertySymbol = SemanticModel.GetDeclaredSymbol(propertySyntax) 783Private Function GetDeclaredMemberSymbolFromOriginalSemanticModel(currentSemanticModel As SemanticModel, declarationInCurrentTree As DeclarationStatementSyntax) As ISymbol 986SemanticModel.GetSymbolInfo(identifier.Identifier).Symbol?.Kind = SymbolKind.Parameter Then 1004Dim right = SemanticModel.GetTypeInfo(initializer.Name).Type 1009Return CreateResult(SemanticModel.GetTypeInfo(initializer.Expression).Type) 1037Dim expressionAddMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expression).GetAllSymbols().OfType(Of IMethodSymbol) 1049Dim initializerAddMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(collectionInitializer).GetAllSymbols().OfType(Of IMethodSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.vb (1)
22Protected Overrides Function CreateTypeInferrer(semanticModel As SemanticModel, cancellationToken As CancellationToken) As AbstractTypeInferrer
Utilities\IntrinsicOperators\AbstractIntrinsicOperatorDocumentation.vb (1)
34Public Overridable Function GetSuffix(semanticModel As SemanticModel, position As Integer, nodeToBind As SyntaxNode, cancellationToken As CancellationToken) As IList(Of SymbolDisplayPart)
Utilities\IntrinsicOperators\MidAssignmentDocumentation.vb (1)
63Public Overrides Function GetSuffix(semanticModel As SemanticModel, position As Integer, nodeToBind As SyntaxNode, cancellationToken As CancellationToken) As IList(Of SymbolDisplayPart)
Microsoft.CodeAnalysis.Workspaces (385)
CaseCorrection\AbstractCaseCorrectionService.cs (3)
20protected abstract void AddReplacements(SemanticModel? semanticModel, SyntaxNode root, ImmutableArray<TextSpan> spans, ConcurrentDictionary<SyntaxToken, SyntaxToken> replacements, CancellationToken cancellationToken); 35var semanticModel = await document.ReuseExistingSpeculativeModelAsync(spans.Collapse(), cancellationToken).ConfigureAwait(false); 44private SyntaxNode CaseCorrect(SemanticModel? semanticModel, SyntaxNode root, ImmutableArray<TextSpan> spans, CancellationToken cancellationToken)
Classification\Classifier.cs (5)
32var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 48SemanticModel semanticModel, 60SemanticModel semanticModel, 72SemanticModel semanticModel, 114LanguageServices languageServices, SemanticModel semanticModel, TextSpan textSpan, ClassificationOptions options,
Classification\EmbeddedLanguageClassificationServiceExtensions.cs (1)
18SemanticModel semanticModel,
Classification\IEmbeddedLanguageClassificationService.cs (1)
26SemanticModel semanticModel,
Classification\SyntaxClassification\AbstractSyntaxClassificationService.cs (2)
38var semanticModel = await document.GetRequiredNullableDisabledSemanticModelAsync(cancellationToken).ConfigureAwait(false); 49SemanticModel semanticModel,
Classification\SyntaxClassification\AbstractSyntaxClassificationService.Worker.cs (3)
21private readonly SemanticModel _semanticModel; 35SemanticModel semanticModel, 57SemanticModel semanticModel,
Classification\SyntaxClassification\AbstractSyntaxClassifier.cs (2)
22public virtual void AddClassifications(SyntaxNode syntax, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 26public virtual void AddClassifications(SyntaxToken syntax, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
Classification\SyntaxClassification\ISyntaxClassificationService.cs (1)
45SemanticModel semanticModel,
Classification\SyntaxClassification\ISyntaxClassifier.cs (2)
29void AddClassifications(SyntaxNode node, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 34void AddClassifications(SyntaxToken token, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
Classification\SyntaxClassification\SyntaxClassificationExtensions.cs (1)
49SemanticModel semanticModel,
Diagnostics\CompilationWithAnalyzersPair.cs (1)
105public async Task<(AnalysisResult? projectAnalysisResult, AnalysisResult? hostAnalysisResult)> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken)
Diagnostics\Extensions.cs (2)
365var model = await ((Document)documentAnalysisScope.TextDocument).GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 437var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Editing\DocumentEditor.cs (4)
18private DocumentEditor(Document document, SemanticModel model, SyntaxNode root) 35var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 46/// The <see cref="CodeAnalysis.SemanticModel"/> of the original document. 48public SemanticModel SemanticModel { get; }
Editing\SymbolEditor.cs (2)
297var model = await newDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 485var model = await doc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Editing\SymbolEditorExtensions.cs (1)
41var model = await doc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ExternalAccess\Pythia\Api\PythiaDocumentExtensions.cs (1)
13public static Task<SemanticModel> GetSemanticModelForNodeAsync(this Document document, SyntaxNode? node, CancellationToken cancellationToken)
ExternalAccess\Pythia\Api\PythiaSemanticModelExtensions.cs (1)
12public static ISymbol GetEnclosingNamedTypeOrAssembly(this SemanticModel semanticModel, int position, CancellationToken cancellationToken)
ExternalAccess\Pythia\Api\PythiaTypeInferenceServiceWrapper.cs (1)
22public ImmutableArray<ITypeSymbol> InferTypes(SemanticModel semanticModel, int position, string? name, CancellationToken cancellationToken)
FindSymbols\FindReferences\DependentTypeFinder.cs (4)
197var cachedModels = new ConcurrentSet<SemanticModel>(); 242async ValueTask<SemanticModel> GetRequiredSemanticModelAsync(DocumentId documentId) 245var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 261var semanticModel = await GetRequiredSemanticModelAsync(documentId).ConfigureAwait(false);
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
155SemanticModel semanticModel,
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (3)
106var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 130SemanticModel semanticModel, 169private static SyntaxNode? GetContainer(SemanticModel semanticModel, SyntaxNode parameterNode, ISyntaxFactsService syntaxFactsService)
FindSymbols\FindReferences\FindReferenceCache.cs (6)
39var model = await document.GetRequiredNullableDisabledSemanticModelAsync(cancellationToken).ConfigureAwait(false); 40var nullableEnableSemanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 53public readonly SemanticModel SemanticModel; 63private readonly SemanticModel _nullableEnabledSemanticModel; 74Document document, SourceText text, SemanticModel semanticModel, SemanticModel nullableEnabledSemanticModel, SyntaxNode root, SyntaxTreeIndex syntaxTreeIndex)
FindSymbols\FindReferences\FindReferencesDocumentState.cs (1)
26public SemanticModel SemanticModel => this.Cache.SemanticModel;
FindSymbols\ReferenceLocationExtensions.cs (3)
36var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 49SemanticModel semanticModel, 70SemanticModel semanticModel,
FindSymbols\SymbolFinder.cs (8)
24/// Obsolete. Use <see cref="FindSymbolAtPositionAsync(SemanticModel, int, Workspace, CancellationToken)"/>. 28SemanticModel semanticModel, 44SemanticModel semanticModel, 62SemanticModel semanticModel, 78SemanticModel semanticModel, 95SemanticModel semanticModel, 114var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 281var semanticModel = await linkedDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\TopLevelSyntaxTree\DeclaredSymbolInfo.cs (1)
221public ISymbol? TryResolve(SemanticModel semanticModel, CancellationToken cancellationToken)
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (1)
44var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (6)
25protected virtual void ProcessDimKeyword(ref ArrayBuilder<TextSpan>? result, SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 35var semanticModel = await document.GetRequiredNullableDisabledSemanticModelAsync(cancellationToken).ConfigureAwait(false); 59void Recurse(TextSpan span, SemanticModel semanticModel) 109SyntaxToken ProcessNode(SemanticModel semanticModel, SyntaxNode node) 159void ProcessToken(SemanticModel semanticModel, SyntaxToken token) 171void ProcessIdentifier(SemanticModel semanticModel, SyntaxToken token)
ReassignedVariable\AbstractReassignedVariableService.cs (16)
50using var _3 = PooledDictionary<SyntaxTree, SemanticModel>.GetInstance(out var syntaxTreeToModel); 51var semanticModel = GetSemanticModel(root.SyntaxTree); 61void Recurse(TextSpan span, SemanticModel semanticModel) 90SemanticModel GetSemanticModel(SyntaxTree syntaxTree) 92if (!syntaxTreeToModel.TryGetValue(syntaxTree, out var model)) 103void ProcessNode(SemanticModel semanticModel, SyntaxNode node) 122void ProcessIdentifier(SemanticModel semanticModel, TIdentifierNameSyntax identifier) 134void ProcessParameter(SemanticModel semanticModel, TParameterSyntax parameterSyntax) 141void ProcessVariable(SemanticModel semanticModel, TVariableSyntax variable) 148void ProcessSingleVariableDesignation(SemanticModel semanticModel, TSingleVariableDesignationSyntax designation) 155bool IsSymbolReassigned(SemanticModel semanticModel, [NotNullWhen(true)] ISymbol? symbol) 176bool ComputeParameterIsAssigned(SemanticModel semanticModel, IParameterSymbol parameter) 200var otherSemanticModel = GetSemanticModel(group.Key); 240bool TryGetParameterLocation(SemanticModel semanticModel, IParameterSymbol parameter, out TextSpan location) 266bool ComputeLocalIsAssigned(SemanticModel semanticModel, ILocalSymbol local) 291SemanticModel semanticModel,
Recommendations\AbstractRecommendationService.cs (1)
28var semanticModel = syntaxContext.SemanticModel;
Recommendations\AbstractRecommendationServiceRunner.cs (2)
278var semanticModel = _context.SemanticModel; 290var semanticModel = _context.SemanticModel;
Recommendations\Recommender.cs (3)
20SemanticModel semanticModel, 36SemanticModel semanticModel, 51var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\ConflictResolver.cs (2)
130private static ImmutableArray<ISymbol> SymbolsForEnclosingInvocationExpressionWorker(SyntaxNode invocationExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 179SemanticModel semanticModel,
Rename\ConflictEngine\ConflictResolver.Session.cs (3)
357SemanticModel? newDocumentSemanticModel = null; 654private ImmutableArray<ISymbol> GetSymbolsInNewSolution(Document newDocument, SemanticModel newDocumentSemanticModel, RenameActionAnnotation conflictAnnotation, SyntaxNodeOrToken tokenOrNode) 793var semanticModel = await document.GetRequiredSemanticModelAsync(_cancellationToken).ConfigureAwait(false);
Rename\IRenameRewriterLanguageService.cs (2)
87SemanticModel semanticModel, 128public abstract ImmutableArray<Location> ComputePossibleImplicitUsageConflicts(ISymbol renamedSymbol, SemanticModel semanticModel, Location originalDeclarationLocation, int newDeclarationLocationStartingPosition, CancellationToken cancellationToken);
Rename\Renamer.RenameSymbolDocumentAction.cs (2)
50var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 106var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Rename\RenameRewriterParameters.cs (2)
16SemanticModel semanticModel, 50internal readonly SemanticModel SemanticModel = semanticModel;
Rename\RenameUtilities.cs (2)
45int position, SemanticModel semanticModel, SolutionServices services, CancellationToken cancellationToken) 147SemanticModel semanticModel,
SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (4)
29protected abstract SemanticModel? TryGetSpeculativeSemanticModelWorker(SemanticModel previousSemanticModel, SyntaxNode previousBodyNode, SyntaxNode currentBodyNode); 42public async Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken)
SemanticModelReuse\ISemanticModelReuseLanguageService.cs (2)
36Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken);
SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (6)
15internal readonly struct SemanticModelReuseInfo(SemanticModel previousNonSpeculativeSemanticModel, SemanticModel currentSemanticModel, SyntaxNode bodyNode, VersionStamp topLevelSementicVersion) 20public readonly SemanticModel PreviousNonSpeculativeSemanticModel = previousNonSpeculativeSemanticModel; 23/// The current semantic model we retrieved <see cref="SemanticModel"/> for the <see cref="BodyNode"/>. Could 26public readonly SemanticModel CurrentSemanticModel = currentSemanticModel; 34/// The top level version of the project when we retrieved <see cref="SemanticModel"/>. As long as this is the
Shared\Extensions\SemanticModelExtensions.cs (2)
18public static SemanticMap GetSemanticMap(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 70this SemanticModel semanticModel,
Shared\Utilities\SemanticMap.cs (1)
23internal static SemanticMap From(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken)
Shared\Utilities\SemanticMap.Walker.cs (1)
13private sealed class Walker(SemanticModel semanticModel, SemanticMap map, CancellationToken cancellationToken)
Simplification\Simplifier.cs (6)
74var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 81public static TNode Expand<TNode>(TNode node, SemanticModel semanticModel, Workspace workspace, Func<SyntaxNode, bool>? expandInsideNode = null, bool expandParameter = false, CancellationToken cancellationToken = default) where TNode : SyntaxNode 92internal static TNode Expand<TNode>(TNode node, SemanticModel semanticModel, SolutionServices services, Func<SyntaxNode, bool>? expandInsideNode = null, bool expandParameter = false, CancellationToken cancellationToken = default) where TNode : SyntaxNode 119var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 126public static SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Workspace workspace, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default) 137internal static SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, SolutionServices services, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
22/// <see cref="SemanticModel"/> is needed, use <see cref="SemanticSpanAnalysis"/> or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
23SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
577public static bool IsAwaitableNonDynamic([NotNullWhen(true)] this ISymbol? symbol, SemanticModel semanticModel, int position)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (7)
17public static bool AreEquivalent(SemanticModel semanticModel, SyntaxNode node1, SyntaxNode node2) 21SemanticModel semanticModel1, 22SemanticModel semanticModel2, 51SemanticModel semanticModel1, 52SemanticModel semanticModel2, 132SemanticModel semanticModel1, 133SemanticModel semanticModel2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (20)
32public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 35public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode statementOrExpression) 38public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 41public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode statement) 44public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 47public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken) 53public static IOperation GetRequiredOperation(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 59public static ISymbol GetRequiredEnclosingSymbol(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 65public static TSymbol? GetEnclosingSymbol<TSymbol>(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 81public static ISymbol GetEnclosingNamedTypeOrAssembly(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 87public static INamedTypeSymbol? GetEnclosingNamedType(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 90public static INamespaceSymbol? GetEnclosingNamespace(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 94this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null) 102public static SemanticModel GetOriginalSemanticModel(this SemanticModel semanticModel) 116this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? filter = null) 128SemanticModel semanticModel, SyntaxNode node, 150public static string GenerateNameFromType(this SemanticModel semanticModel, ITypeSymbol type, ISyntaxFacts syntaxFacts, bool capitalize) 181private static bool ShouldPluralize(this SemanticModel semanticModel, ITypeSymbol type) 232this SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (3)
21SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 23public ImmutableArray<TSyntaxNode> GetUnnecessaryImports(SemanticModel model, TextSpan? span, CancellationToken cancellationToken) 27SemanticModel model, TextSpan? span, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\IUnnecessaryImportsProvider.cs (2)
15ImmutableArray<TSyntaxNode> GetUnnecessaryImports(SemanticModel model, TextSpan? span, CancellationToken cancellationToken); 18SemanticModel model,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFacts.cs (24)
53bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 60bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 61bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 62bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 63bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 65bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken); 67ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken); 74bool TryGetSpeculativeSemanticModel(SemanticModel oldSemanticModel, SyntaxNode oldNode, SyntaxNode newNode, [NotNullWhen(true)] out SemanticModel? speculativeModel); 79ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken); 81ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement); 82SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 84IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node); 86ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node); 88ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node); 92IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken); 94IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 95IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 97ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken); 98ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken); 100ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken); 102bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 109bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken); 111string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (3)
17SemanticModel semanticModel) 121public static IParameterSymbol? FindParameterForArgument(this ISemanticFacts semanticFacts, SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 124public static IParameterSymbol? FindParameterForAttributeArgument(this ISemanticFacts semanticFacts, SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (2)
44var semanticModel = reader.Compilation.GetSemanticModel(syntaxTree); 59SemanticModel semanticModel, SyntaxNode syntaxNode, string name, ISymbol target,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs (1)
53var semanticModel = reader.Compilation.GetSemanticModel(syntaxTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (4)
88TryGetSemanticModel(compilation, syntaxTree, out var semanticModel)) 117[NotNullWhen(true)] out SemanticModel? semanticModel) 186TryGetSemanticModel(reader.Compilation, firstSourceTree, out var semanticModel)) 256SemanticModel semanticModel, SyntaxNode containerDeclaration, SymbolKind kind, string localName, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
727var semanticModel = Compilation.GetSemanticModel(location.SourceTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (18)
52private SemanticModel? _lazySpeculativeSemanticModel; 77SemanticModel semanticModel, 98protected abstract SemanticModel CreateSpeculativeSemanticModel(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel); 104protected abstract TConversion ClassifyConversion(SemanticModel model, TExpressionSyntax expression, ITypeSymbol targetType); 105protected abstract TConversion ClassifyConversion(SemanticModel model, ITypeSymbol originalType, ITypeSymbol targetType); 106protected abstract bool ConversionsAreCompatible(SemanticModel model1, TExpressionSyntax expression1, SemanticModel model2, TExpressionSyntax expression2); 111protected abstract bool IsForEachTypeInferred(TForEachStatementSyntax forEachStatement, SemanticModel semanticModel); 112protected abstract bool ForEachConversionsAreCompatible(SemanticModel originalModel, TForEachStatementSyntax originalForEach, SemanticModel newModel, TForEachStatementSyntax newForEach); 114SemanticModel model, TForEachStatementSyntax forEach, out IMethodSymbol getEnumeratorMethod, out ITypeSymbol elementType, out ImmutableArray<ILocalSymbol> localVariables); 154public SemanticModel OriginalSemanticModel { get; } 189public SemanticModel SpeculativeSemanticModel 223protected abstract void ValidateSpeculativeSemanticModel(SemanticModel speculativeSemanticModel, SyntaxNode nodeToSpeculate); 980SemanticModel speculativeSemanticModel) 1034private bool IsReceiverNonUniquePossibleValueTypeParam(TExpressionSyntax invocation, SemanticModel semanticModel) 1052private static bool IsReceiverUniqueInstance(TExpressionSyntax receiver, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
28SemanticModel semanticModel, 49public static void AddAliasSymbols(SemanticModel semanticModel, int namespaceId, IEnumerable<IAliasSymbol> aliasSymbols)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ISpeculationAnalyzer.cs (4)
11/// <see cref="SemanticModel.SyntaxTree"/> that <see cref="OriginalSemanticModel"/> points at. 17/// cref="SemanticModel.SyntaxTree"/> that <see cref="SpeculativeSemanticModel"/> points at. 24SemanticModel OriginalSemanticModel { get; } 30SemanticModel SpeculativeSemanticModel { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (2)
204public string ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null) 207public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
70public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 73public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (5)
69protected abstract INamespaceSymbol? GetExplicitNamespaceSymbol(SyntaxNode node, SemanticModel model); 74SemanticModel model, 90SemanticModel model, 117var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 254private static bool IsInsideNamespace(SyntaxNode node, INamespaceSymbol symbol, SemanticModel model, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ContextQuery\ISyntaxContextService.cs (1)
13SyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ContextQuery\SyntaxContext.cs (2)
15public SemanticModel SemanticModel { get; } 60SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (8)
38public static async ValueTask<SemanticModel> GetRequiredSemanticModelAsync(this Document document, CancellationToken cancellationToken) 40if (document.TryGetSemanticModel(out var semanticModel)) 49public static async ValueTask<SemanticModel> GetRequiredNullableDisabledSemanticModelAsync(this Document document, CancellationToken cancellationToken) 51if (document.TryGetNullableDisabledSemanticModel(out var semanticModel)) 116public static ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, int position, CancellationToken cancellationToken) 133public static async ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, TextSpan span, CancellationToken cancellationToken) 158public static ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, SyntaxNode? node, CancellationToken cancellationToken) 183var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (11)
15public static ImmutableArray<ITypeSymbol> InferTypes(this ITypeInferenceService service, SemanticModel semanticModel, SyntaxNode expression, CancellationToken cancellationToken) 18public static ImmutableArray<ITypeSymbol> InferTypes(this ITypeInferenceService service, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 21public static ImmutableArray<TypeInferenceInfo> GetTypeInferenceInfo(this ITypeInferenceService service, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 24public static ImmutableArray<TypeInferenceInfo> GetTypeInferenceInfo(this ITypeInferenceService service, SemanticModel semanticModel, SyntaxNode expression, CancellationToken cancellationToken) 29SemanticModel semanticModel, 39SemanticModel semanticModel, 47private static INamedTypeSymbol? GetFirstDelegateType(SemanticModel semanticModel, ImmutableArray<ITypeSymbol> types) 55SemanticModel semanticModel, 67SemanticModel semanticModel, 85SemanticModel semanticModel, 97SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (13)
30Func<SemanticModel, TType, TNode, bool> canReplace, 31Func<SemanticModel, SyntaxNode, TType, TNode, SyntaxNode> updateRoot, 53Func<SemanticModel, TType, TNode, bool> canReplace, 54Func<SemanticModel, SyntaxNode, TType, TNode, SyntaxNode> updateRoot, 75Func<SemanticModel, TNode, bool> canReplace, 76Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot, 97Func<SemanticModel, TType, TNode, bool> canReplace, 98Func<SemanticModel, SyntaxNode, TType, TNode, SyntaxNode> updateRoot, 119Func<SemanticModel, TNode, bool> canReplace, 120Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot, 155Func<SemanticModel, TType, TNode, bool> canReplace, 156Func<SemanticModel, SyntaxNode, TType, TNode, SyntaxNode> updateRoot, 172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (4)
318SemanticModel semanticModel, 369SemanticModel semanticModel, 431SemanticModel semanticModel, 441this SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, string identifierName)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
67SemanticModel semanticModel, 459SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (7)
39SemanticModel semanticModel, 49SemanticModel semanticModel, 60SemanticModel semanticModel, 144SemanticModel semanticModel, 236SemanticModel semanticModel, 262private static SyntaxNode GetNegationOfIsPatternExpression(SyntaxNode isExpression, SyntaxGenerator generator, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, CancellationToken cancellationToken) 474SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsService.cs (2)
31var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 38var currentModel = await current.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (30)
40SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 48SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 56SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 64SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 72SemanticModel semanticModel, 91protected virtual IEnumerable<ISymbol> GetCollidableSymbols(SemanticModel semanticModel, SyntaxNode location, SyntaxNode container, CancellationToken cancellationToken) 179public bool IsWrittenTo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 182public bool IsOnlyWrittenTo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 185public bool IsInOutContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 188public bool IsInRefContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 191public bool IsInInContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 194public bool CanReplaceWithRValue(SemanticModel semanticModel, SyntaxNode expression, CancellationToken cancellationToken) 197public ISymbol GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 203public bool TryGetSpeculativeSemanticModel(SemanticModel oldSemanticModel, SyntaxNode oldNode, SyntaxNode newNode, out SemanticModel speculativeModel) 206public ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken) 209public ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement) 212public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 215public IMethodSymbol GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 218public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 221public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 227public IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 230public IParameterSymbol FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 233public IParameterSymbol FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 236public ISymbol FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, CancellationToken cancellationToken) 239public ISymbol FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, CancellationToken cancellationToken) 242public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 245public bool IsInsideNameOfExpression(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 251public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol expressionTypeOpt, CancellationToken cancellationToken) 254public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (17)
15bool IsExpressionContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 16bool IsStatementContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 17bool IsTypeContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 18bool IsNamespaceContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 19bool IsNamespaceDeclarationNameContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 20bool IsTypeDeclarationContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 21bool IsMemberDeclarationContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 22bool IsGlobalStatementContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 23bool IsLabelContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 24bool IsAttributeNameContext(SemanticModel semanticModel, int position, CancellationToken cancellationToken); 27SemanticModel semanticModel, SyntaxNode location, 31SemanticModel semanticModel, SyntaxNode location, 34SyntaxToken GenerateUniqueName(SemanticModel semanticModel, SyntaxNode location, SyntaxNode? container, string baseName, 38SemanticModel semanticModel, SyntaxNode location, 42SemanticModel semanticModel, SyntaxNode location, 47CommonConversion ClassifyConversion(SemanticModel semanticModel, SyntaxNode expression, ITypeSymbol destination); 49IMethodSymbol? TryGetDisposeMethod(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
21protected readonly SemanticModel SemanticModel; 29protected AbstractTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (8)
15protected abstract AbstractTypeInferrer CreateTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken); 18SemanticModel semanticModel, ImmutableArray<ITypeSymbol> result, string nameOpt) 29SemanticModel semanticModel, ImmutableArray<TypeInferenceInfo> result, string nameOpt) 44SemanticModel semanticModel, string name) 82SemanticModel semanticModel, int position, 94SemanticModel semanticModel, SyntaxNode expression, 106SemanticModel semanticModel, int position, 114SemanticModel semanticModel, SyntaxNode expression,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\ITypeInferenceService.cs (4)
29ImmutableArray<ITypeSymbol> InferTypes(SemanticModel semanticModel, SyntaxNode expression, string nameOpt, CancellationToken cancellationToken); 30ImmutableArray<ITypeSymbol> InferTypes(SemanticModel semanticModel, int position, string nameOpt, CancellationToken cancellationToken); 32ImmutableArray<TypeInferenceInfo> GetTypeInferenceInfo(SemanticModel semanticModel, int position, string nameOpt, CancellationToken cancellationToken); 33ImmutableArray<TypeInferenceInfo> GetTypeInferenceInfo(SemanticModel semanticModel, SyntaxNode expression, string nameOpt, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractReducer.IExpressionRewriter.cs (1)
18SyntaxNodeOrToken VisitNodeOrToken(SyntaxNodeOrToken nodeOrTokenToReduce, SemanticModel semanticModel, bool simplifyAllDescendants);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (9)
40protected abstract SemanticModel GetSpeculativeSemanticModel(ref SyntaxNode nodeToSpeculate, SemanticModel originalSemanticModel, SyntaxNode originalNode); 50public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 51public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 70var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 187var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 213var semanticModelForReduce = semanticModel; 313var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 334protected abstract void GetUnusedNamespaceImports(SemanticModel model, HashSet<SyntaxNode> namespaceImports, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (2)
18SemanticModel semanticModel, 26SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
64public static ISymbol? GetOriginalSymbolInfo(SemanticModel semanticModel, SyntaxNode expression) 100public static bool IsNamespaceOrTypeOrThisParameter(SyntaxNode expression, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\Simplifiers\AbstractMemberAccessExpressionSimplifier.cs (2)
24SemanticModel semanticModel, TMemberAccessExpressionSyntax memberAccessExpression, CancellationToken cancellationToken); 34SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\Simplifiers\AbstractSimplifier.cs (1)
18SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (3)
12internal sealed class SemanticDocument(Document document, SourceText text, SyntaxNode root, SemanticModel semanticModel) 15public readonly SemanticModel SemanticModel = semanticModel; 21var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\WorkspaceServices\SemanticModelReuse\ISemanticModelReuseWorkspaceService.cs (1)
21ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
Workspace\Solution\Document.cs (21)
31/// A cached reference to the <see cref="SemanticModel"/>. 33private WeakReference<SemanticModel>? _model; 36/// A cached reference to the <see cref="SemanticModel"/>. 38private WeakReference<SemanticModel>? _nullableDisabledModel; 259public bool TryGetSemanticModel([NotNullWhen(returnValue: true)] out SemanticModel? semanticModel) 270internal bool TryGetNullableDisabledSemanticModel([NotNullWhen(returnValue: true)] out SemanticModel? semanticModel) 280/// The returned <see cref="SemanticModel"/> may be <see langword="null"/> if <see 285internal async Task<SemanticModel?> GetSemanticModelAsync(SemanticModelOptions options, CancellationToken cancellationToken = default) 295internal async ValueTask<SemanticModel> GetRequiredNullableDisabledSemanticModelAsync(CancellationToken cancellationToken) 297if (this.TryGetNullableDisabledSemanticModel(out var semanticModel)) 310/// The returned <see cref="SemanticModel"/> may be <see langword="null"/> if <see 314public Task<SemanticModel?> GetSemanticModelAsync(CancellationToken cancellationToken = default) 323/// The returned <see cref="SemanticModel"/> may be <see langword="null"/> if <see 327private async Task<SemanticModel?> GetSemanticModelHelperAsync(bool disableNullableAnalysis, CancellationToken cancellationToken) 332var semanticModel = await GetSemanticModelWorkerAsync().ConfigureAwait(false); 336async Task<SemanticModel> GetSemanticModelWorkerAsync() 342if (this.TryGetNullableDisabledSemanticModel(out var semanticModel)) 347if (this.TryGetSemanticModel(out var semanticModel)) 355var result = compilation.GetSemanticModel(syntaxTree, disableNullableAnalysis ? SemanticModelOptions.DisableNullableAnalysis : SemanticModelOptions.None); 358var original = Interlocked.CompareExchange(ref disableNullableAnalysis ? ref _nullableDisabledModel : ref _model, new WeakReference<SemanticModel>(result), null); 368if (original.TryGetTarget(out var semanticModel))
Workspace\Solution\Solution_SemanticModelCaching.cs (3)
24private SemanticModel? _activeDocumentSemanticModel; 27private SemanticModel? _activeDocumentNullableDisabledSemanticModel; 30internal void OnSemanticModelObtained(DocumentId documentId, SemanticModel semanticModel)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (6)
NetCoreTests.cs (6)
91var semanticModel = await document.GetSemanticModelAsync(); 116var semanticModel = await document.GetSemanticModelAsync(); 156var semanticModel = await document.GetSemanticModelAsync(); 216var semanticModel = await document.GetSemanticModelAsync(); 340var semanticModel = await document.GetSemanticModelAsync(); 507var semanticModel = await document.GetSemanticModelAsync();
Microsoft.CodeAnalysis.Workspaces.UnitTests (25)
CodeCleanup\CodeCleanupTests.cs (1)
300var semanticModel = await document.GetSemanticModelAsync();
FindReferencesTests.cs (3)
181var semanticModel = comp.GetSemanticModel(tree); 220var semanticModel = comp.GetSemanticModel(tree); 284var semanticModel = comp.GetSemanticModel(tree);
SemanticModelReuse\SemanticModelReuseTests.cs (2)
76var actualModel = await document.GetSemanticModelAsync(); 315var actualModel = await document.GetSemanticModelAsync();
SolutionTests\SolutionTests.cs (2)
2585var semantics = await document.GetSemanticModelAsync(); 3502var docModel = doc.GetSemanticModelAsync().Result;
SymbolKeyTests.cs (17)
619var model = compilation.GetSemanticModel(tree); 655var model = compilation.GetSemanticModel(tree); 677var model = compilation.GetSemanticModel(tree); 702var model = compilation.GetSemanticModel(tree); 720var model = compilation.GetSemanticModel(tree); 738var model = compilation.GetSemanticModel(tree); 758var model = compilation.GetSemanticModel(tree); 781var model = compilation.GetSemanticModel(tree); 824var model = compilation.GetSemanticModel(tree); 838var model = compilation.GetSemanticModel(tree); 867var firstModel = await document.GetSemanticModelAsync(); 914var firstModel = await document.GetSemanticModelAsync(); 1277var semanticModel = compilation1.GetSemanticModel(tree); 1494SemanticModel model, Func<SyntaxNode, bool> predicate = null) 1502SemanticModel model, SyntaxNode node, 1561var semanticModel = compilation.GetSemanticModel(node.SyntaxTree); 1569private static void GetInteriorSymbols(SemanticModel model, SyntaxNode root, List<ISymbol> symbols)
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\AppContextDefaultsAnalyzer.cs (1)
106private bool IsCallToDefineSwitchDefault(InvocationExpressionSyntax call, SemanticModel model)
Microsoft.Extensions.Logging.Generators (5)
LoggerMessageGenerator.Parser.cs (2)
78SemanticModel sm = _compilation.GetSemanticModel(syntaxTree); 627private (string? loggerField, bool multipleLoggerFields) FindLoggerField(SemanticModel sm, TypeDeclarationSyntax classDec, ITypeSymbol loggerSymbol)
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs (3)
34public SemanticModel SemanticModel { get; } 49SemanticModel semanticModel, 129var semanticModel = compilation.GetSemanticModel(syntaxTree);
Microsoft.Extensions.Options.SourceGeneration (5)
Generator.cs (3)
20IncrementalValuesProvider<(TypeDeclarationSyntax? TypeSyntax, SemanticModel SemanticModel)> typeDeclarations = context.SyntaxProvider 27IncrementalValueProvider<(Compilation, ImmutableArray<(TypeDeclarationSyntax? TypeSyntax, SemanticModel SemanticModel)>)> compilationAndTypes = 33private static void HandleAnnotatedTypes(Compilation compilation, ImmutableArray<(TypeDeclarationSyntax? TypeSyntax, SemanticModel SemanticModel)> types, SourceProductionContext context)
Parser.cs (2)
46public IReadOnlyList<ValidatorType> GetValidatorTypes(IEnumerable<(TypeDeclarationSyntax TypeSyntax, SemanticModel SemanticModel)> classes) 52SemanticModel? sm = null;
Microsoft.Gen.ComplianceReports (2)
Parser.cs (2)
38SemanticModel? sm = null; 105SemanticModel sm)
Microsoft.Gen.Logging (3)
Parsing\Parser.cs (3)
54SemanticModel? sm = _compilation.GetSemanticModel(syntaxTree); 603private Location? GetLoggerMessageAttribute(MethodDeclarationSyntax methodSyntax, SemanticModel sm, SymbolHolder symbols) 620private (string? member, ISymbol? secondMember, bool isNullable) FindLoggerMember(SemanticModel sm, TypeDeclarationSyntax classDec, ITypeSymbol loggerSymbol)
Microsoft.Gen.Metrics (4)
Parser.cs (4)
70SemanticModel? semanticModel = null; 278SemanticModel semanticModel) 368SemanticModel semanticModel, 398SemanticModel semanticModel)
Microsoft.Gen.MetricsReports (4)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (4)
70SemanticModel? semanticModel = null; 278SemanticModel semanticModel) 368SemanticModel semanticModel, 398SemanticModel semanticModel)
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\CustomMarshallerAttributeFixer.cs (2)
37SemanticModel model = await doc.GetSemanticModelAsync(fixAllContext.CancellationToken).ConfigureAwait(false); 156var model = await doc.GetSemanticModelAsync(ct).ConfigureAwait(false);
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (1)
35SemanticModel model = context.GetSemanticModel(diagnostic.Location.SourceTree);
Microsoft.ML.InternalCodeAnalyzer (4)
BestFriendAnalyzer.cs (1)
50var model = context.SemanticModel;
ContractsCheckNameofFixProvider.cs (1)
133var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken);
NameFixProvider.cs (1)
106var semanticModel = await document.GetSemanticModelAsync(cancellationToken);
RelaxTestNamingSuppressor.cs (1)
44var semanticModel = context.GetSemanticModel(tree);
Microsoft.VisualStudio.LanguageServices (9)
CallHierarchy\CallHierarchyCommandHandler.cs (1)
88var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ChangeSignature\AddParameterDialogViewModel.cs (1)
24private readonly SemanticModel _semanticModel;
Progression\GraphNodeIdCreation.cs (1)
540var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Progression\GraphQueries\CallsGraphQuery.cs (1)
48var semanticModel = await solution.GetDocument(reference.SyntaxTree).GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Progression\SymbolContainment.cs (1)
33var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Venus\ContainedLanguageCodeSupport.cs (4)
63var semanticModel = document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult_Venus(cancellationToken); 297var semanticModel = document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult_Venus(cancellationToken); 424var semanticModel = document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult_Venus(cancellationToken); 482var semanticModel = document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult_Venus(cancellationToken);
Microsoft.VisualStudio.LanguageServices.CSharp (25)
CodeModel\CSharpCodeModelService.cs (10)
954public override string GetFullName(SyntaxNode node, SemanticModel semanticModel) 969public override string GetFullyQualifiedName(string name, int position, SemanticModel semanticModel) 2893public override string GetMethodXml(SyntaxNode node, SemanticModel semanticModel) 3013protected override ITypeSymbol? GetTypeSymbolFromPartialName(string partialName, SemanticModel semanticModel, int position) 3050var semanticModel = compilation.GetSemanticModel(tree); 3689private static TypeDeclarationSyntax InsertIntoBaseList(TypeDeclarationSyntax typeDeclaration, ITypeSymbol typeSymbol, SemanticModel semanticModel, int insertionIndex) 3721public override SyntaxNode AddBase(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel, int? position) 3754public override SyntaxNode RemoveBase(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel) 3814public override SyntaxNode AddImplementedInterface(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel, int? position) 3849public override SyntaxNode RemoveImplementedInterface(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel)
CodeModel\MethodXml\MethodXmlBuilder.cs (13)
17private MethodXmlBuilder(IMethodSymbol symbol, SemanticModel semanticModel) 144var typeSymbol = SemanticModel.GetTypeInfo(type).Type; 249var constantValue = SemanticModel.GetConstantValue(expression); 255var type = SemanticModel.GetTypeInfo(expression).Type; 291var constantValue = SemanticModel.GetConstantValue(expression); 375var type = SemanticModel.GetTypeInfo(castExpression.Type).Type; 391if (SemanticModel.GetSymbolInfo(objectCreationExpression.Type).Symbol is not ITypeSymbol type) 414var type = SemanticModel.GetTypeInfo(arrayCreationExpression).Type; 479var symbol = SemanticModel.GetSymbolInfo(memberAccessExpression).Symbol; 486var leftHandSymbol = SemanticModel.GetSymbolInfo(memberAccessExpression.Expression).Symbol; 518var symbol = SemanticModel.GetSymbolInfo(identifierName).Symbol; 569var type = SemanticModel.GetTypeInfo(typeOfExpression.Type).Type; 609public static string Generate(MethodDeclarationSyntax methodDeclaration, SemanticModel semanticModel)
LanguageService\CSharpHelpContextService.cs (2)
95private string? TryGetText(SyntaxToken token, SemanticModel semanticModel, Document document, CancellationToken cancellationToken) 157SyntaxToken token, SemanticModel semanticModel, Document document, CancellationToken cancellationToken,
Microsoft.VisualStudio.LanguageServices.VisualBasic (29)
CodeModel\MethodXML\MethodXmlBuilder.vb (17)
20Private Sub New(symbol As IMethodSymbol, semanticModel As SemanticModel) 125Dim eventSymbol = TryCast(SemanticModel.GetSymbolInfo(eventExpression).Symbol, IEventSymbol) 232Dim constantValue = SemanticModel.GetConstantValue(expression) 237Dim type = SemanticModel.GetTypeInfo(expression).Type 294Dim type = TryCast(SemanticModel.GetSymbolInfo(objectCreationExpression.Type).Symbol, ITypeSymbol) 352symbolOpt = If(symbolOpt, SemanticModel.GetSymbolInfo(memberAccess).Symbol) 363Dim leftHandSymbol = SemanticModel.GetSymbolInfo(memberAccess.GetExpressionOfMemberAccessExpression()).Symbol 404symbolOpt = If(symbolOpt, SemanticModel.GetSymbolInfo(identifierName).Symbol) 468Dim type = SemanticModel.GetTypeInfo(getTypeExpression.Type).Type 491Dim type = SemanticModel.GetTypeInfo(castExpression.Type).Type 515Dim type = GetTypeFromPredefinedCastKeyword(SemanticModel.Compilation, predefinedCastExpression.Keyword.Kind) 528Dim constantValue = SemanticModel.GetConstantValue(expression) 542GenerateNumber(upperBound, SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32)) 647Dim type = SemanticModel.GetTypeInfo(arrayCreationExpression).Type 664Dim delegateSymbol = TryCast(SemanticModel.GetSymbolInfo(delegateExpression).Symbol, IMethodSymbol) 669Dim eventType = SemanticModel.GetTypeInfo(expression).Type 692Public Shared Function Generate(methodBlock As MethodBlockBaseSyntax, semanticModel As SemanticModel) As String
CodeModel\VisualBasicCodeModelService.vb (10)
1062Public Overrides Function GetFullName(node As SyntaxNode, semanticModel As SemanticModel) As String 3480Public Overrides Function GetFullyQualifiedName(name As String, position As Integer, semanticModel As SemanticModel) As String 3671Protected Overrides Function GetTypeSymbolFromPartialName(partialName As String, semanticModel As SemanticModel, position As Integer) As ITypeSymbol 3989Public Overrides Function GetMethodXml(node As SyntaxNode, semanticModel As SemanticModel) As String 4142Public Overloads Overrides Function GetHandledEventNames(method As SyntaxNode, semanticModel As SemanticModel) As IList(Of String) 4148Public Overrides Function HandlesEvent(eventName As String, method As SyntaxNode, semanticModel As SemanticModel) As Boolean 4255Public Overrides Function AddBase(node As SyntaxNode, typeSymbol As ITypeSymbol, semanticModel As SemanticModel, position As Integer?) As SyntaxNode 4281Public Overrides Function RemoveBase(node As SyntaxNode, typeSymbol As ITypeSymbol, semanticModel As SemanticModel) As SyntaxNode 4321Public Overrides Function AddImplementedInterface(node As SyntaxNode, typeSymbol As ITypeSymbol, semanticModel As SemanticModel, position As Integer?) As SyntaxNode 4353Public Overrides Function RemoveImplementedInterface(node As SyntaxNode, typeSymbol As ITypeSymbol, semanticModel As SemanticModel) As SyntaxNode
Help\VisualBasicHelpContextService.Visitor.vb (2)
20Private ReadOnly _semanticModel As SemanticModel 25Public Sub New(span As TextSpan, semanticModel As SemanticModel, isNotMetadata As Boolean, service As VisualBasicHelpContextService, cancellationToken As CancellationToken)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\LanguageServer\Extensions\SymbolExtensions.cs (1)
48var semanticModel = await codeDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
System.Private.CoreLib.Generators (5)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (5)
198private static INamedTypeSymbol? GetIsSupportedTypeSymbol(SemanticModel model, MemberAccessExpressionSyntax memberAccessExpression) 211private static INamedTypeSymbol? GetIsSupportedTypeSymbol(SemanticModel model, IdentifierNameSyntax identifierName) 221private static INamedTypeSymbol[] GatherAndConditions(SemanticModel model, ExpressionSyntax expressionToDecompose) 273private static INamedTypeSymbol[][] DecomposePropertySymbolForIsSupportedGroups_Property(OperationAnalysisContext context, SemanticModel model, ExpressionSyntax expressionToDecompose) 309private static INamedTypeSymbol[][] DecomposeConditionForIsSupportedGroups(OperationAnalysisContext context, SemanticModel model, ExpressionSyntax expressionToDecompose)
System.Text.Json.SourceGeneration (5)
JsonSourceGenerator.Parser.cs (2)
78public ContextGenerationSpec? ParseContextGenerationSpec(ClassDeclarationSyntax contextClassDeclaration, SemanticModel semanticModel, CancellationToken cancellationToken) 169private static bool TryGetNestedTypeDeclarations(ClassDeclarationSyntax contextClassSyntax, SemanticModel semanticModel, CancellationToken cancellationToken, [NotNullWhen(true)] out List<string>? typeDeclarations)
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs (3)
34public SemanticModel SemanticModel { get; } 49SemanticModel semanticModel, 129var semanticModel = compilation.GetSemanticModel(syntaxTree);
System.Text.RegularExpressions.Generator (2)
RegexGenerator.Parser.cs (1)
39SemanticModel sm = context.SemanticModel;
UpgradeToGeneratedRegexCodeFixer.cs (1)
78SemanticModel? semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
System.Windows.Forms.PrivateSourceGenerators (4)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (4)
203var semanticModelCache = new Dictionary<SyntaxTree, SemanticModel>(); 216SemanticModel semanticModel = GetSemanticModel(compilation, argument.SyntaxTree); 233SemanticModel GetSemanticModel(Compilation compilation, SyntaxTree syntaxTree) 235if (!semanticModelCache.TryGetValue(syntaxTree, out SemanticModel model))