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
7683 references to SemanticModel
ILLink.RoslynAnalyzer (1)
RequiresAnalyzerBase.cs (1)
73 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)
113var 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)
70var 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 (277)
Compilation\Compilation.cs (7)
310/// Gets a new <see cref="SemanticModel"/> for the specified syntax tree. 317public SemanticModel GetSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility = false) 324public SemanticModel GetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options) 328/// Gets a <see cref="SemanticModel"/> for the given <paramref name="syntaxTree"/>. 333protected abstract SemanticModel CommonGetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options); 336/// Creates a new <see cref="SemanticModel"/> for the given <paramref name="syntaxTree"/>. 341internal 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 ?? 2861SemanticModel semanticModel, 2935SemanticModel semanticModel,
DiagnosticAnalyzer\AnalyzerExecutor.cs (10)
42private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 111Func<SyntaxTree, SemanticModel> getSemanticModel, 143Func<SyntaxTree, SemanticModel> getSemanticModel, 531SemanticModel semanticModel, 718SemanticModel semanticModel, 724public readonly SemanticModel SemanticModel = semanticModel; 740SemanticModel semanticModel, 844SemanticModel semanticModel, 999SemanticModel model, 1100SemanticModel 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 (158)
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\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)
678SemanticModel? 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)
183private static bool IsType<T>(INamedTypeSymbol type, SemanticModel semanticModel) 186private 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)
88protected abstract TExpression? GetSetterExpression(SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken); 91SemanticModel semanticModel, IMethodSymbol accessor, HashSet<string> fieldNames, HashSet<IFieldSymbol> result, CancellationToken cancellationToken); 94HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 224SemanticModel semanticModel, 256SemanticModel semanticModel, 275SemanticModel semanticModel, IMethodSymbol setMethod, HashSet<string> fieldNames, CancellationToken cancellationToken) 291SemanticModel semanticModel, 333var semanticModel = context.SemanticModel; 496SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
53var 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, 130var 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, 99SyntaxNode expr, SemanticModel semanticModel, bool isTopLevel, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
55var semanticModel = ifOperation.SemanticModel;
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)
149var semanticModel = context.SemanticModel; 318var semanticModel = context.SemanticModel; 346SemanticModel semanticModel, 370ISyntaxFacts 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)
636public static bool IsAwaitableNonDynamic([NotNullWhen(true)] this ISymbol? symbol, SemanticModel semanticModel, int position)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (7)
15public static bool AreEquivalent(SemanticModel semanticModel, SyntaxNode node1, SyntaxNode node2) 19SemanticModel semanticModel1, 20SemanticModel semanticModel2, 49SemanticModel semanticModel1, 50SemanticModel semanticModel2, 130SemanticModel semanticModel1, 131SemanticModel semanticModel2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (18)
33public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 36public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode statementOrExpression) 39public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 42public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode statement) 45public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 48public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken) 54public static IOperation GetRequiredOperation(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 60public static ISymbol GetRequiredEnclosingSymbol(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 66public static TSymbol? GetEnclosingSymbol<TSymbol>(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 82public static ISymbol GetEnclosingNamedTypeOrAssembly(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 88public static INamedTypeSymbol? GetEnclosingNamedType(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 91public static INamespaceSymbol? GetEnclosingNamespace(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 94public static SemanticModel GetOriginalSemanticModel(this SemanticModel semanticModel) 108this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null) 137public static string GenerateNameFromType(this SemanticModel semanticModel, ITypeSymbol type, ISyntaxFacts syntaxFacts, bool capitalize) 168private static bool ShouldPluralize(this SemanticModel semanticModel, ITypeSymbol type) 219this SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (2)
64SemanticModel? semanticModel, 66Func<SemanticModel?, SyntaxToken, bool> predicate,
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 (25)
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); 122IPreprocessingSymbol? GetPreprocessingSymbol(SemanticModel semanticModel, SyntaxNode node);
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\Services\SyntaxFacts\ISyntaxFacts.cs (1)
384bool IsBindableToken(SemanticModel? semanticModel, SyntaxToken token);
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)
728var 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); 976SemanticModel speculativeSemanticModel) 1030private bool IsReceiverNonUniquePossibleValueTypeParam(TExpressionSyntax invocation, SemanticModel semanticModel) 1048private 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 (252)
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)
46protected abstract ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken); 56SemanticModel semanticModel, 70var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 125SemanticModel semanticModel, 146SemanticModel semanticModel, 194SemanticModel semanticModel, 404var semanticModel = await invocationDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 422var semanticModel = await invocationDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 432SemanticModel 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); 52SemanticModel semanticModel,
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<TExpressionSyntax> 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); 155protected string GenerateNameForArgument(SemanticModel semanticModel, Argument<TExpressionSyntax> argument, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (3)
293private static ITypeSymbol FixType(ITypeSymbol typeSymbol, SemanticModel semanticModel, IEnumerable<ITypeParameterSymbol> allTypeParameters) 472var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 490var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
82SemanticModel 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)
30protected abstract bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
391private 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)
31protected abstract bool TryInitializeState(Document document, SemanticModel model, SyntaxNode interfaceNode, CancellationToken cancellationToken, out SyntaxNode classOrStructDecl, out INamedTypeSymbol classOrStructType, out ImmutableArray<INamedTypeSymbol> interfaceTypes); 42var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 59var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.State.cs (3)
19SemanticModel model) 31public SemanticModel Model { get; } = model; 45SemanticModel 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)
48var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (8)
121protected virtual SyntaxNode? TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel) => null; 301var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 348SemanticModel semanticModel, 385SemanticModel semanticModel, 444SemanticModel semanticModel, 919var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 931SemanticModel semanticModel, 936private readonly SemanticModel _semanticModel = semanticModel;
src\Analyzers\Core\CodeFixes\SimplifyBooleanExpression\SimplifyConditionalCodeFixProvider.cs (1)
59SyntaxNode SimplifyConditional(SemanticModel semanticModel, Diagnostic diagnostic, SyntaxNode expr)
src\Analyzers\Core\CodeFixes\SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs (1)
50var 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)
68var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForReturn\AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
57var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (2)
83var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 103SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
72var 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)
64public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 67public 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)
14SemanticModel semanticModel, 48public SemanticModel SemanticModel { get; } = 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)
345SemanticModel semanticModel, 396SemanticModel semanticModel, 458SemanticModel semanticModel, 468this 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\InitializeParameter\AbstractInitializerParameterService.cs (3)
38SemanticModel semanticModel, 119var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 208var semanticModel = compilation.GetSemanticModel(group.Key);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\IInitializeParameterService.cs (1)
26SemanticModel 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 (31)
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) 257public IPreprocessingSymbol GetPreprocessingSymbol(SemanticModel semanticModel, SyntaxNode node)
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)
41protected abstract SemanticModel GetSpeculativeSemanticModel(ref SyntaxNode nodeToSpeculate, SemanticModel originalSemanticModel, SyntaxNode originalNode); 51public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 52public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 69var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 165var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 191var semanticModelForReduce = semanticModel; 291var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 312protected 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\NullableHelpers.cs (2)
25SemanticModel semanticModel, 53SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (3)
13internal sealed class SemanticDocument(Document document, SourceText text, SyntaxNode root, SemanticModel semanticModel) 16public readonly SemanticModel SemanticModel = semanticModel; 22var 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)
802var model = GetSemanticModel(tree); 2505public new SemanticModel GetSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility) 2514public new SemanticModel GetSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options) 2526SemanticModel? model = null; 2537internal override SemanticModel CreateSemanticModel(SyntaxTree syntaxTree, SemanticModelOptions options) 3969protected 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) 4932protected 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)) 1637public static IMethodSymbol? GetInterceptorMethod(this SemanticModel? semanticModel, InvocationExpressionSyntax node, CancellationToken cancellationToken = default) 1649public static InterceptableLocation? GetInterceptableLocation(this SemanticModel? semanticModel, InvocationExpressionSyntax node, CancellationToken cancellationToken = default)
Errors\ErrorFacts.cs (1)
583/// <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 (269)
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)
126var semanticModel = context.SemanticModel; 250SemanticModel semanticModel, 328SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
275var semanticModel = syntaxContext.SemanticModel;
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)
222var semanticModel = blockOperation.SemanticModel; 265SemanticModel 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)
59var semanticModel = context.SemanticModel; 243SemanticModel semanticModel1, 245SemanticModel 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\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (2)
59SemanticModel semanticModel, 181var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (3)
51SemanticModel semanticModel, 206SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken) 240SemanticModel 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)
28var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
29var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
71var semanticModel = context.SemanticModel; 157var semanticModel = state.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
42var semanticModel = context.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 (8)
62SemanticModel semanticModel, 80SemanticModel semanticModel, 385SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 735SemanticModel semanticModel, 856SemanticModel semanticModel, 1007SemanticModel semanticModel, ArgumentSyntax argument, out bool unwrapArgument, out bool useSpread, CancellationToken cancellationToken) 1046public static bool IsIterable(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 1079SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerDiagnosticAnalyzer.cs (1)
50SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (3)
53var semanticModel = context.SemanticModel; 119var semanticModel = context.SemanticModel; 174SemanticModel 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)
68protected 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 (3)
22SemanticModel semanticModel, ExpressionBodyPreference preference, 68SemanticModel semanticModel, ExpressionBodyPreference preference, LambdaExpressionSyntax declaration, LanguageVersion languageVersion, CancellationToken cancellationToken) 109SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (2)
42var semanticModel = context.SemanticModel; 61SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (2)
40var semanticModel = context.SemanticModel; 68SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
37var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
198var semanticModel = instance.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
79var 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)
68var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
63var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (4)
19private readonly SemanticModel _semanticModel; 29SemanticModel semanticModel, 56SemanticModel semanticModel, 252var semanticModel = _semanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
83var semanticModel = syntaxContext.SemanticModel; 269SemanticModel semanticModel, 317SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
111var semanticModel = syntaxContext.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
71var 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)
85var semanticModel = context.SemanticModel; 132SemanticModel semanticModel, 175SemanticModel semanticModel, 225SemanticModel 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)
33SemanticModel semanticModel, 120SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
40SemanticModel 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 (5)
322SemanticModel semanticModel, 425[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 455[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 466this ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 909SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (3)
21this ParenthesizedExpressionSyntax node, SemanticModel semanticModel, CancellationToken cancellationToken) 322SemanticModel semanticModel, CancellationToken cancellationToken) 389ParenthesizedExpressionSyntax node, ExpressionSyntax parentExpression, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (18)
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, 430SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 460public static INamedTypeSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, BaseTypeDeclarationSyntax syntax, CancellationToken cancellationToken) 466public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ConstructorDeclarationSyntax syntax, CancellationToken cancellationToken) 472public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, LocalFunctionStatementSyntax syntax, CancellationToken cancellationToken) 478public static IParameterSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ParameterSyntax syntax, CancellationToken cancellationToken) 484public static IPropertySymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, PropertyDeclarationSyntax syntax, CancellationToken cancellationToken) 490public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, BaseMethodDeclarationSyntax syntax, CancellationToken cancellationToken) 496public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, VariableDeclaratorSyntax syntax, CancellationToken cancellationToken) 502public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SingleVariableDesignationSyntax syntax, CancellationToken cancellationToken) 512public static bool UnifiesNativeIntegers(this SemanticModel semanticModel)
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 (31)
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 node) 183public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 186public IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 197public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 209public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 245public IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 255public IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 258public IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 262public ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 265public ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 270public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken) 283static ImmutableArray<ISymbol> GetCallingConventionSymbols(SemanticModel model, FunctionPointerUnmanagedCallingConventionSyntax syntax) 292/// cref="ModelExtensions.GetSymbolInfo(SemanticModel, SyntaxNode, CancellationToken)"/>, but sometimes employs 296private ImmutableArray<ISymbol> GetSymbolInfo(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 368public bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 376var semanticModel = compilation.GetSemanticModel(syntaxReference.SyntaxTree); 392public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken) 395public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken) 398public IPreprocessingSymbol? GetPreprocessingSymbol(SemanticModel semanticModel, SyntaxNode node) 407private static IPreprocessingSymbol? CreatePreprocessingSymbol(SemanticModel model, SyntaxToken identifier)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
495public bool IsBindableToken(SemanticModel? semanticModel, SyntaxToken token)
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) 121SemanticModel semanticModel, 153SemanticModel semanticModel, 178SemanticModel originalSemanticModel, CancellationToken cancellationToken) 249SemanticModel originalSemanticModel, IDelegateCreationOperation originalDelegateCreationOperation, 289SemanticModel originalSemanticModel, IConversionOperation originalConversionOperation, 607SemanticModel originalSemanticModel, 671ExpressionSyntax castNode, ExpressionSyntax castedExpressionNode, SemanticModel semanticModel, CancellationToken cancellationToken) 758ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, 825ExpressionSyntax castNode, SemanticModel originalSemanticModel, 826ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, CancellationToken cancellationToken) 944SemanticModel semanticModel, 1020SemanticModel semanticModel, 1079SemanticModel semanticModel, CancellationToken cancellationToken) 1146private static bool IsFieldOrArrayElement(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 1153ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 1167SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1220SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1254SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel) 1285SemanticModel originalSemanticModel, 1286SemanticModel rewrittenSemanticModel, 1394SemanticModel originalSemanticModel, 1395SemanticModel rewrittenSemanticModel, 1434SemanticModel semanticModel, 1472MemberAccessExpressionSyntax memberAccessExpression, SemanticModel semanticModel, 1528SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1550private static (SemanticModel? rewrittenSemanticModel, ExpressionSyntax? rewrittenExpression) GetSemanticModelWithCastRemoved( 1553SemanticModel 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, 58protected override bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 69protected override bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken) 98TypeSyntax typeName, SemanticModel semanticModel, 166SemanticModel semanticModel, 196var newSemanticModel = semanticModel.Compilation.ReplaceSyntaxTree(tree, newTree).GetSemanticModel(newTree); 205private static bool IsSafeToSwitchToVarWithoutNeedingSpeculation(DeclarationExpressionSyntax declarationExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 257SemanticModel semanticModel,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (138)
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\AddParameter\CSharpAddParameterCodeFixProvider.cs (2)
49protected override ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken) 56SemanticModel 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)
33protected 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)
174protected override string GenerateNameForExpression(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 177protected override ITypeSymbol GetArgumentType(SemanticModel semanticModel, Argument<ExpressionSyntax> argument, CancellationToken cancellationToken) 183protected override IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 186protected 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)
97CSharpSimplifierOptions options, SemanticModel semanticModel, 324SemanticModel semanticModel, 384SemanticModel semanticModel, 386out 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\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
33SemanticModel semanticModel, InvocationExpressionSyntax invocationExpression, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (1)
76SemanticModel semanticModel, SyntaxEditor editor, Diagnostic diagnostic,
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (5)
22internal static LambdaExpressionSyntax Update(SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, CancellationToken cancellationToken) 26SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, CancellationToken cancellationToken) 35SemanticModel semanticModel, LambdaExpressionSyntax declaration, CancellationToken cancellationToken) 57SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, ExpressionSyntax expressionBody) 80SemanticModel semanticModel, LambdaExpressionSyntax declaration)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (2)
154SemanticModel semanticModel, 227private static ITypeSymbol GetConvertedType(SemanticModel semanticModel, SyntaxNode typeSyntax, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
64SemanticModel 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)
51SemanticModel semanticModel, 180public static CSharpSyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 184Document 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, 3013public 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)
23protected override AbstractTypeInferrer CreateTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (24)
30SemanticModel semanticModel, 101var typeInfo = SemanticModel.GetTypeInfo(node, CancellationToken); 102var symbolInfo = SemanticModel.GetSymbolInfo(node, CancellationToken); 192var syntaxTree = SemanticModel.SyntaxTree; 391var info = SemanticModel.GetSymbolInfo(initializer, CancellationToken); 438var info = SemanticModel.GetTypeInfo(creation, CancellationToken); 459var info = SemanticModel.GetTypeInfo(primaryConstructorBaseType.Type, CancellationToken); 475var info = SemanticModel.GetSymbolInfo(invocation, CancellationToken); 487SemanticModel.GetMemberGroup(invocation.Expression, CancellationToken) 499var typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken); 558var info = SemanticModel.GetSymbolInfo(attribute, CancellationToken); 566var info = SemanticModel.GetTypeInfo(elementAccess.Expression, CancellationToken); 1221SemanticModel.GetDeclaredSymbol(equalsValue.Parent, CancellationToken) is IParameterSymbol parameter) 1233var typeInfo = SemanticModel.GetTypeInfo(propertyDeclaration.Type); 1311var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(initializerExpression).GetAllSymbols(); 1329var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expressionOpt).GetAllSymbols(); 1420var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expressionOpt).GetAllSymbols(); 1536_ when SemanticModel.GetOperation(pattern, CancellationToken) is IPatternOperation patternOperation => 1553var typeInfo = SemanticModel.GetTypeInfo(recursivePattern); 1826SemanticModel.GetSymbolInfo(identifierName.Identifier).Symbol?.Kind == SymbolKind.Parameter) 2053var currentSemanticModel = SemanticModel; 2178var symbol = SemanticModel.GetDeclaredSymbol(variableDeclarator); 2224var descendantSymbol = SemanticModel.GetSymbolInfo(descendant, CancellationToken).GetAnySymbol(); 2253var symbol = SemanticModel.GetRequiredDeclaredSymbol(designation, CancellationToken);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (5)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
319var semanticModel = semanticDocument.SemanticModel;
EventHookup\EventHookupSessionManager_EventHookupSession.cs (3)
187private IEventSymbol? GetEventSymbol(SemanticModel semanticModel, SyntaxToken plusEqualsToken, CancellationToken cancellationToken) 199IEventSymbol eventSymbol, SyntaxToken plusEqualsToken, SemanticModel semanticModel, 222private 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)
8746var model = comp.GetSemanticModel(tree); 8812var 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 (1127)
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)); 5717var model = cm.GetSemanticModel(cm.SyntaxTrees[0]); 7537var semanticModel = compilation.GetSemanticModel(tree); 7578var semanticModel = compilation.GetSemanticModel(tree); 11637var 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 (7)
1274var model = comp.GetSemanticModel(tree); 1332var model = comp.GetSemanticModel(tree); 9473var model = comp.GetSemanticModel(tree); 10489var model = comp.GetSemanticModel(tree); 10494Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(previousAccessor.Body.SpanStart, modifiedAccessor, out var speculativeModel)); 10523var model = comp.GetSemanticModel(tree); 10528Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(previousAccessor.Body.SpanStart, modifiedAccessor, out var speculativeModel));
FirstClassSpanTests.cs (3)
2822var model = comp.GetSemanticModel(tree); 2855var model = comp.GetSemanticModel(tree); 5000var 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 (21)
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); 14167var model = comp.GetSemanticModel(tree); 14205var model = comp.GetSemanticModel(tree); 14250var model = comp.GetSemanticModel(tree);
OverloadResolutionPriorityTests.cs (8)
443var model = comp.GetSemanticModel(tree); 699var model = comp3.GetSemanticModel(tree); 759var model = comp3.GetSemanticModel(tree); 807var model = comp3.GetSemanticModel(tree); 978var model = comp.GetSemanticModel(tree); 2312var model = comp.GetSemanticModel(tree); 2410var model = comp.GetSemanticModel(tree); 2582var model = comp.GetSemanticModel(tree);
RefReadonlyParameterTests.cs (3)
1521var model = comp.GetSemanticModel(tree); 7098var model = comp.GetSemanticModel(tree); 7126var model = comp.GetSemanticModel(tree);
RefStructInterfacesTests.cs (54)
7575var model = comp.GetSemanticModel(tree); 7765var model = comp.GetSemanticModel(tree); 7984var model = comp.GetSemanticModel(tree); 8175var model = comp.GetSemanticModel(tree); 8368var model = comp.GetSemanticModel(tree); 8443var model = comp.GetSemanticModel(tree); 8647var model = comp.GetSemanticModel(tree); 9018var model = comp.GetSemanticModel(tree); 9222var model = comp.GetSemanticModel(tree); 9386var model = comp.GetSemanticModel(tree); 9586var model = comp.GetSemanticModel(tree); 9810var model = comp.GetSemanticModel(tree); 10019var model = comp.GetSemanticModel(tree); 10246var model = comp.GetSemanticModel(tree); 10349var model = comp.GetSemanticModel(tree); 10444var model = comp.GetSemanticModel(tree); 10629var model = comp.GetSemanticModel(tree); 10826var model = comp.GetSemanticModel(tree); 11066var model = comp.GetSemanticModel(tree); 11294var model = comp.GetSemanticModel(tree); 11506var model = comp.GetSemanticModel(tree); 11606var model = comp.GetSemanticModel(tree); 11701var model = comp.GetSemanticModel(tree); 14258var model = comp.GetSemanticModel(tree); 14599var model = comp.GetSemanticModel(tree); 14965var model = comp.GetSemanticModel(tree); 15309var model = comp.GetSemanticModel(tree); 15657var model = comp.GetSemanticModel(tree); 15734var model = comp.GetSemanticModel(tree); 16095var model = comp.GetSemanticModel(tree); 16760var model = comp.GetSemanticModel(tree); 16825var model = comp.GetSemanticModel(tree); 16890var model = comp.GetSemanticModel(tree); 16974var model = comp.GetSemanticModel(tree); 17062var model = comp.GetSemanticModel(tree); 17155var model = comp.GetSemanticModel(tree); 17252var model = comp.GetSemanticModel(tree); 17336var model = comp.GetSemanticModel(tree); 17762var model = comp.GetSemanticModel(tree); 17959var model = comp.GetSemanticModel(tree); 18182var model = comp.GetSemanticModel(tree); 18379var model = comp.GetSemanticModel(tree); 18580var model = comp.GetSemanticModel(tree); 18654var model = comp.GetSemanticModel(tree); 18864var model = comp.GetSemanticModel(tree); 19199var model = comp.GetSemanticModel(tree); 19370var model = comp.GetSemanticModel(tree); 19527var model = comp.GetSemanticModel(tree); 19695var model = comp.GetSemanticModel(tree); 19863var model = comp.GetSemanticModel(tree); 19968var model = comp.GetSemanticModel(tree); 21237var model = comp2.GetSemanticModel(tree); 21305var model = comp.GetSemanticModel(tree); 21707var model = comp.GetSemanticModel(tree);
Semantics\CollectionExpressionTests.cs (43)
200var model = comp.GetSemanticModel(tree); 235var model = comp.GetSemanticModel(tree); 4773var model = comp.GetSemanticModel(tree); 14233var model = comp.GetSemanticModel(tree); 14309var model = comp.GetSemanticModel(tree); 14382var model = comp.GetSemanticModel(tree); 14444var model = comp.GetSemanticModel(tree); 14568var model = comp.GetSemanticModel(tree); 14651var model = comp.GetSemanticModel(tree); 14740var model = comp.GetSemanticModel(tree); 15079var model = comp.GetSemanticModel(tree); 15096private static void VerifyTypes(SemanticModel model, ExpressionSyntax expr, string expectedType, string expectedConvertedType, ConversionKind expectedConversionKind) 27100SemanticModel IOperation.SemanticModel => throw null; 28619var model = comp.GetSemanticModel(tree); 28663var model = comp.GetSemanticModel(tree); 28709var model = comp.GetSemanticModel(tree); 28753var model = comp.GetSemanticModel(tree); 28796var model = comp.GetSemanticModel(tree); 28839var model = comp.GetSemanticModel(tree); 28878var model = comp.GetSemanticModel(tree); 28911var model = comp.GetSemanticModel(tree); 28945var model = comp.GetSemanticModel(tree); 28998var model = comp.GetSemanticModel(tree); 29064var model = comp.GetSemanticModel(tree); 29125var model = comp.GetSemanticModel(tree); 29201var model = comp.GetSemanticModel(tree); 29244var model = comp.GetSemanticModel(tree); 29291var model = comp.GetSemanticModel(tree); 31480var model = comp.GetSemanticModel(tree); 31528var model = comp.GetSemanticModel(tree); 31586var model = comp.GetSemanticModel(tree); 31684var model = comp.GetSemanticModel(tree); 32300var model = comp.GetSemanticModel(tree); 32336var model = comp.GetSemanticModel(tree); 32367var model = comp.GetSemanticModel(tree); 32395var model = comp.GetSemanticModel(tree); 32437var model = comp.GetSemanticModel(tree); 32482var model = comp.GetSemanticModel(tree); 32545var model = comp.GetSemanticModel(tree); 32641var model = comp.GetSemanticModel(tree); 33036var model = comp.GetSemanticModel(tree); 33464var model = compilation.GetSemanticModel(tree); 33505var 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); 21037var model = compilation.GetSemanticModel(tree); 21132var model = compilation.GetSemanticModel(tree); 21236var model = compilation.GetSemanticModel(tree); 21293var model = compilation.GetSemanticModel(tree); 21361var model = compilation.GetSemanticModel(tree); 21411var model = compilation.GetSemanticModel(tree); 21645var model = compilation.GetSemanticModel(tree); 21818var model = compilation.GetSemanticModel(tree); 22012var model = compilation.GetSemanticModel(tree); 22139var model = compilation.GetSemanticModel(tree); 22237var model = compilation.GetSemanticModel(tree); 22425var model = compilation.GetSemanticModel(tree); 22580var model = compilation.GetSemanticModel(tree); 22659var model = compilation.GetSemanticModel(tree); 22696SemanticModel model, 22714private static void VerifyModelNotSupported(SemanticModel model, params IdentifierNameSyntax[] references) 22782var model = compilation.GetSemanticModel(tree); 22864var model = compilation.GetSemanticModel(tree); 22948var model = compilation.GetSemanticModel(tree); 23015var model = compilation.GetSemanticModel(tree); 23054var model = compilation.GetSemanticModel(tree); 23210var model = compilation.GetSemanticModel(tree); 23304var model = compilation.GetSemanticModel(tree); 23394var model = compilation.GetSemanticModel(tree); 23442var model = compilation.GetSemanticModel(tree); 23475var model = compilation.GetSemanticModel(tree); 23526var model = compilation.GetSemanticModel(tree); 23670var model = compilation.GetSemanticModel(tree); 23768var model = compilation.GetSemanticModel(tree); 23866var model = compilation.GetSemanticModel(tree); 24008var model = compilation.GetSemanticModel(tree); 24112var model = compilation.GetSemanticModel(tree); 24207var model = compilation.GetSemanticModel(tree); 24295var model = compilation.GetSemanticModel(tree); 24401var model = compilation.GetSemanticModel(tree); 24494var model = compilation.GetSemanticModel(tree); 24525var model = compilation.GetSemanticModel(tree); 24727var model = compilation.GetSemanticModel(tree); 24986var model = compilation.GetSemanticModel(tree); 25177var model = compilation.GetSemanticModel(tree); 25290var model = compilation.GetSemanticModel(tree); 25389var model = compilation.GetSemanticModel(tree); 25568var model = compilation.GetSemanticModel(tree); 25612var model = compilation.GetSemanticModel(tree); 25693var model = compilation.GetSemanticModel(tree); 25737var model = compilation.GetSemanticModel(tree); 25792var model = compilation.GetSemanticModel(tree); 25873var model = compilation.GetSemanticModel(tree); 25933var model = compilation.GetSemanticModel(tree); 26030var model = compilation.GetSemanticModel(tree); 26087var model = compilation.GetSemanticModel(tree); 26154var model = compilation.GetSemanticModel(tree); 26202var model = compilation.GetSemanticModel(tree); 26283var model = compilation.GetSemanticModel(tree); 26330var model = compilation.GetSemanticModel(tree); 26425var model = compilation.GetSemanticModel(tree); 26473var model = compilation.GetSemanticModel(tree); 26557var model = compilation.GetSemanticModel(tree); 26617var model = compilation.GetSemanticModel(tree); 26701var model = compilation.GetSemanticModel(tree); 26761var model = compilation.GetSemanticModel(tree); 26822var model = compilation.GetSemanticModel(tree); 26892var model = compilation.GetSemanticModel(tree); 26936var model = compilation.GetSemanticModel(tree); 27022var model = compilation.GetSemanticModel(tree); 27067var model = compilation.GetSemanticModel(tree); 27159var model = compilation.GetSemanticModel(tree); 27213var model = compilation.GetSemanticModel(tree); 27312var model = compilation.GetSemanticModel(tree); 27366var model = compilation.GetSemanticModel(tree); 27435var model = compilation.GetSemanticModel(tree); 27512var model = compilation.GetSemanticModel(tree); 27585var model = compilation.GetSemanticModel(tree); 27689var model = compilation.GetSemanticModel(tree); 27762var model = compilation.GetSemanticModel(tree); 27825var model = compilation.GetSemanticModel(tree); 27902var model = compilation.GetSemanticModel(tree); 27975var model = compilation.GetSemanticModel(tree); 28080var model = compilation.GetSemanticModel(tree); 28153var model = compilation.GetSemanticModel(tree); 28226var model = compilation.GetSemanticModel(tree); 28301var model = compilation.GetSemanticModel(tree); 28355var model = compilation.GetSemanticModel(tree); 28452var model = compilation.GetSemanticModel(tree); 28506var model = compilation.GetSemanticModel(tree); 28573var model = compilation.GetSemanticModel(tree); 28621var model = compilation.GetSemanticModel(tree); 28705var model = compilation.GetSemanticModel(tree); 28766var model = compilation.GetSemanticModel(tree); 28873var model = compilation.GetSemanticModel(tree); 28929var model = compilation.GetSemanticModel(tree); 29024var model = compilation.GetSemanticModel(tree); 29080var model = compilation.GetSemanticModel(tree); 29145var model = compilation.GetSemanticModel(tree); 29231var model = compilation.GetSemanticModel(tree); 29298var model = compilation.GetSemanticModel(tree); 29407var model = compilation.GetSemanticModel(tree); 29474var model = compilation.GetSemanticModel(tree); 29547var model = compilation.GetSemanticModel(tree); 29596var model = compilation.GetSemanticModel(tree); 29694var model = compilation.GetSemanticModel(tree); 29770var model = compilation.GetSemanticModel(tree); 29895var model = compilation.GetSemanticModel(tree); 29971var model = compilation.GetSemanticModel(tree); 30049var model = compilation.GetSemanticModel(tree); 30135var model = compilation.GetSemanticModel(tree); 30196var model = compilation.GetSemanticModel(tree); 30307var model = compilation.GetSemanticModel(tree); 30368var model = compilation.GetSemanticModel(tree); 30432var model = compilation.GetSemanticModel(tree); 30487var model = compilation.GetSemanticModel(tree); 30531var model = compilation.GetSemanticModel(tree); 30575var model = compilation.GetSemanticModel(tree); 30616var model = compilation.GetSemanticModel(tree); 30696var model = compilation.GetSemanticModel(tree); 30765var model = compilation.GetSemanticModel(tree); 30867var model = compilation.GetSemanticModel(tree); 30936var model = compilation.GetSemanticModel(tree); 31000var model = compilation.GetSemanticModel(tree); 31055var model = compilation.GetSemanticModel(tree); 31099var model = compilation.GetSemanticModel(tree); 31143var model = compilation.GetSemanticModel(tree); 31227var model = compilation.GetSemanticModel(tree); 31286var model = compilation.GetSemanticModel(tree); 31400var model = compilation.GetSemanticModel(tree); 31459var model = compilation.GetSemanticModel(tree); 31528var model = compilation.GetSemanticModel(tree); 31583var model = compilation.GetSemanticModel(tree); 31627var model = compilation.GetSemanticModel(tree); 31671var model = compilation.GetSemanticModel(tree); 31712var model = compilation.GetSemanticModel(tree); 31766var model = compilation.GetSemanticModel(tree); 31800var model = compilation.GetSemanticModel(tree); 31853var model = compilation.GetSemanticModel(tree); 31893var model = compilation.GetSemanticModel(tree); 31943var model = compilation.GetSemanticModel(tree); 31977var model = compilation.GetSemanticModel(tree); 32033var model = compilation.GetSemanticModel(tree); 32073var model = compilation.GetSemanticModel(tree); 32118var model = compilation.GetSemanticModel(tree); 32162var model = compilation.GetSemanticModel(tree); 32196var model = compilation.GetSemanticModel(tree); 32230var model = compilation.GetSemanticModel(tree); 32270var model = compilation.GetSemanticModel(tree); 32310var model = compilation.GetSemanticModel(tree); 32365var model = compilation.GetSemanticModel(tree); 32434var model = compilation.GetSemanticModel(tree); 32481var model = compilation.GetSemanticModel(tree); 32520var model = compilation.GetSemanticModel(tree); 32547var model = compilation.GetSemanticModel(tree); 32575var model = compilation.GetSemanticModel(tree); 32603var model = compilation.GetSemanticModel(tree); 32629var model = compilation.GetSemanticModel(tree); 32667var model = compilation.GetSemanticModel(tree); 32703var model = compilation.GetSemanticModel(tree); 32710SemanticModel model, 32718SemanticModel model, 32726SemanticModel model, 32947var model = compilation.GetSemanticModel(tree); 32976var model = comp.Compilation.GetSemanticModel(tree); 33061var model = comp.GetSemanticModel(tree); 33130var model = comp.GetSemanticModel(tree); 33175var model = comp.GetSemanticModel(tree); 33239var model = comp.GetSemanticModel(tree); 33505var model = comp.GetSemanticModel(tree); 33546var model = comp.GetSemanticModel(tree); 33609var model = compilation.GetSemanticModel(tree); 33692var model = compilation.GetSemanticModel(tree); 33780var model = compilation.GetSemanticModel(tree); 33878var model = compilation.GetSemanticModel(tree); 33977var model = compilation.GetSemanticModel(tree); 34075var model = compilation.GetSemanticModel(tree); 34148var model = compilation.GetSemanticModel(tree); 34204var model = compilation.GetSemanticModel(tree); 34270var model = compilation.GetSemanticModel(tree); 34397var model = compilation.GetSemanticModel(tree); 34488var model = compilation.GetSemanticModel(tree); 34595var model = compilation.GetSemanticModel(tree); 34716var model = compilation.GetSemanticModel(tree); 34756var model = compilation.GetSemanticModel(tree); 34832var model = compilation.GetSemanticModel(tree); 34887var model = compilation.GetSemanticModel(tree); 34941var model = compilation.GetSemanticModel(tree); 34999var model = compilation.GetSemanticModel(tree); 35049var model = compilation.GetSemanticModel(tree); 35103var model = compilation.GetSemanticModel(tree); 35143var model = compilation.GetSemanticModel(tree); 35177var model = compilation.GetSemanticModel(tree); 35216var model = compilation.GetSemanticModel(tree); 35260var model = compilation.GetSemanticModel(tree); 35291var model = compilation.GetSemanticModel(tree); 35330var model = compilation.GetSemanticModel(tree); 35362var model = compilation.GetSemanticModel(tree); 35398var model = compilation.GetSemanticModel(tree); 35437var model = compilation.GetSemanticModel(tree); 35467var model = compilation.GetSemanticModel(tree); 35504var model = compilation.GetSemanticModel(tree); 35556var model = compilation.GetSemanticModel(tree); 35661var model = comp.GetSemanticModel(tree); 35696var model = comp.GetSemanticModel(tree); 35775var model = compilation.GetSemanticModel(tree); 35817var model = compilation.GetSemanticModel(tree); 35846var model = compilation.GetSemanticModel(tree); 35892var model = compilation.GetSemanticModel(tree); 35980var model = compilation.GetSemanticModel(tree); 36120var model = compilation.GetSemanticModel(tree); 36228var model = compilation.GetSemanticModel(tree); 36321var model = compilation.GetSemanticModel(tree); 36360var model = comp.GetSemanticModel(tree); 36364Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36406var model = comp.GetSemanticModel(tree); 36410Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36446var model = comp.GetSemanticModel(tree); 36450Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36488var model = comp.GetSemanticModel(tree); 36492Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36523var model = comp.GetSemanticModel(tree); 36527Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36561var model = comp.GetSemanticModel(tree); 36565Assert.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, 371SemanticModel model, 415protected 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); 12475var model = compilation.GetSemanticModel(tree); 12642var model = compilation.GetSemanticModel(tree); 12833var model = compilation.GetSemanticModel(tree); 12954var model = compilation.GetSemanticModel(tree); 13046var model = compilation.GetSemanticModel(tree); 13228var model = compilation.GetSemanticModel(tree); 13371var model = compilation.GetSemanticModel(tree); 13445var model = compilation.GetSemanticModel(tree); 13533var model = compilation.GetSemanticModel(tree); 13610var model = compilation.GetSemanticModel(tree); 13689var model = compilation.GetSemanticModel(tree); 13756var model = compilation.GetSemanticModel(tree); 13786var model = compilation.GetSemanticModel(tree); 13821var model = comp.GetSemanticModel(tree); 14018var 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)
420var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 961var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 1003var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 1071var model = comp.GetSemanticModel(tree); 1293var model = comp.GetSemanticModel(tree); 1364var model = comp.GetSemanticModel(tree); 1410var model = comp.GetSemanticModel(tree); 1466var model = comp.GetSemanticModel(tree); 1525var model = comp.GetSemanticModel(tree); 1614var model = comp.GetSemanticModel(tree); 1813var model = comp.GetSemanticModel(tree); 1853var model = comp.GetSemanticModel(tree); 1896var model = comp.GetSemanticModel(tree); 1966var model = comp.GetSemanticModel(tree); 2113var model = comp.GetSemanticModel(tree); 2162SemanticModel speculativeModel; 2295var model = comp.GetSemanticModel(tree); 2424var model = comp.GetSemanticModel(tree); 2472var model = comp.GetSemanticModel(tree); 2640var model = comp.GetSemanticModel(tree); 2678var model = comp.GetSemanticModel(tree); 2715var model = comp.GetSemanticModel(tree); 2751var model = comp.GetSemanticModel(tree); 6095var model = comp.GetSemanticModel(tree); 6832var model = comp.GetSemanticModel(tree); 6858var model = comp.GetSemanticModel(tree); 7794var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8756var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9162var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 19787var model = comp.GetSemanticModel(tree); 20646var semanticModel = comp.GetSemanticModel(tree); 20679var semanticModel = comp.GetSemanticModel(tree); 20723var semanticModel = comp.GetSemanticModel(tree); 20770var semanticModel = comp.GetSemanticModel(tree); 20820var semanticModel = comp.GetSemanticModel(tree); 21677var 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); 2558var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8159var model = comp.GetSemanticModel(tree); 8672var model = comp.GetSemanticModel(tree); 8932var model = comp.GetSemanticModel(tree); 21257var model = comp.GetSemanticModel(tree); 21481var model = comp.GetSemanticModel(tree); 21552var model = comp.GetSemanticModel(tree); 21598var model = comp.GetSemanticModel(tree); 21654var model = comp.GetSemanticModel(tree); 21713var model = comp.GetSemanticModel(tree); 21802var model = comp.GetSemanticModel(tree); 22001var model = comp.GetSemanticModel(tree); 22038var model = comp.GetSemanticModel(tree); 22078var model = comp.GetSemanticModel(tree); 22113var model = comp.GetSemanticModel(tree); 22192var model = comp.GetSemanticModel(tree); 22339var model = comp.GetSemanticModel(tree); 22388SemanticModel speculativeModel; 22521var model = comp.GetSemanticModel(tree); 23030var model = comp.GetSemanticModel(tree); 23484var model = comp.GetSemanticModel(tree); 24756var model = comp.GetSemanticModel(tree); 24791var model = comp.GetSemanticModel(tree); 24825var model = comp.GetSemanticModel(tree); 24860var model = comp.GetSemanticModel(tree); 28305var model = comp.GetSemanticModel(tree); 28462var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 30485var model = comp.GetSemanticModel(tree); 30509var model = comp.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (4)
EndToEndTests.cs (4)
492var model = comp.GetSemanticModel(tree); 612var model = comp.GetSemanticModel(tree); 699var model = comp.GetSemanticModel(tree); 881var model = comp.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Features (458)
AddImport\CSharpAddImportFeatureService.cs (12)
235SemanticModel semanticModel, 243SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 249SemanticModel semanticModel, 296SemanticModel semanticModel, 358var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 424SemanticModel semanticModel, 442SemanticModel semanticModel, 497SemanticModel semanticModel, 518SemanticModel semanticModel, 561SemanticModel semanticModel, 608protected override bool IsViableExtensionMethod(IMethodSymbol method, SyntaxNode expression, SemanticModel semanticModel, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken) 631protected override bool IsAddMethodContext(SyntaxNode node, SemanticModel semanticModel)
ChangeSignature\CSharpChangeSignatureService.cs (2)
416var semanticModel = document.SemanticModel; 583private 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)
190var 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 (2)
56protected override TextChange? GetReturnTypeChange(SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken) 146protected 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)
106private 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, 466SemanticModel 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\ExplicitInterfaceMemberCompletionProvider.ItemGetter.cs (5)
182private string ToDisplayString(ISymbol symbol, SemanticModel semanticModel) 191private string ToDisplayString(IPropertySymbol symbol, SemanticModel semanticModel) 214private string ToDisplayString(IMethodSymbol symbol, SemanticModel semanticModel) 249private void AddParameters(ImmutableArray<IParameterSymbol> parameters, StringBuilder builder, SemanticModel semanticModel) 277private void AddType(ITypeSymbol symbol, StringBuilder builder, SemanticModel semanticModel)
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
106var 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)
103Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 140private 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)
50public 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);
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)
181protected override IEnumerable<SyntaxNode> GetVariableUseSites(IEnumerable<SyntaxNode> roots, ISymbol localOrParameter, SemanticModel model, CancellationToken cancellationToken) 1014protected override ISymbol? GetDeclaredSymbol(SemanticModel model, SyntaxNode declaration, CancellationToken cancellationToken) 1031SemanticModel? oldModel, 1032SemanticModel newModel, 1077SemanticModel? oldModel, 1078SemanticModel newModel, 1386SemanticModel model, 1421private ISymbol? GetParameterContainingMemberOrType(SyntaxNode? node, SyntaxNode? otherNode, SemanticModel? model, IReadOnlyDictionary<SyntaxNode, SyntaxNode> fromOtherMap, CancellationToken cancellationToken) 1486internal override IMethodSymbol GetLambdaExpressionSymbol(SemanticModel model, SyntaxNode lambdaExpression, CancellationToken cancellationToken) 1495internal override bool QueryClauseLambdasTypeEquivalent(SemanticModel oldModel, SyntaxNode oldNode, SemanticModel newModel, SyntaxNode newNode, CancellationToken cancellationToken) 2840SemanticModel oldModel, 2843SemanticModel newModel, 2974SemanticModel oldModel, 2977SemanticModel 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)
35var semanticModel = context.SemanticModel; 108Host.SolutionServices solutionServices, SemanticModel semanticModel, VirtualCharSequence virtualCharsWithoutMarkup, CancellationToken cancellationToken) 116var 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.CSharpCodeGenerator.cs (4)
151var semanticModel = SemanticDocument.SemanticModel; 786var semanticModel = SemanticDocument.SemanticModel; 1093var semanticModel = originalDocument.SemanticModel; 1135var semanticModel = SemanticDocument.SemanticModel;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
39var semanticModel = SemanticDocument.SemanticModel;
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (2)
25private readonly SemanticModel _semanticModel; 28public PostProcessor(SemanticModel semanticModel, int contextPosition)
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (2)
55var model = SemanticDocument.SemanticModel; 84SemanticModel semanticModel, ExpressionSyntax node, CancellationToken cancellationToken)
ExtractMethod\CSharpSelectionResult.StatementResult.cs (1)
53var semanticModel = SemanticDocument.SemanticModel;
ExtractMethod\CSharpSelectionValidator.cs (2)
75var model = SemanticDocument.SemanticModel; 165SemanticModel semanticModel,
ExtractMethod\CSharpSelectionValidator.Validator.cs (2)
17public static bool Check(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 44private 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)
53SemanticModel semanticModel, 176var semanticModel = document.SemanticModel; 422private static IMethodSymbol GetMethodSymbolIfPresent(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 452SemanticModel semanticModel, 461SemanticModel semanticModel, 470SemanticModel semanticModel, 498SemanticModel semanticModel, IList<ArgumentSyntax> arguments, CancellationToken cancellationToken) 509protected override INamedTypeSymbol DetermineTypeToGenerateIn(SemanticModel semanticModel, SimpleNameSyntax simpleName, CancellationToken cancellationToken) 512protected override Accessibility GetAccessibility(State state, SemanticModel semanticModel, bool intoNamespace, CancellationToken cancellationToken) 537protected override ITypeSymbol DetermineArgumentType(SemanticModel semanticModel, ArgumentSyntax argument, CancellationToken cancellationToken) 547var semanticModel = await selectedDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 761SemanticModel semanticModel, 804SemanticModel 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)
277var semanticModel = compilation.GetSemanticModel(group.Key);
InlineHints\CSharpInlineParameterNameHintsService.cs (3)
27SemanticModel semanticModel, 44SemanticModel semanticModel, 60SemanticModel semanticModel,
InlineHints\CSharpInlineTypeHintsService.cs (1)
23SemanticModel 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)
22SemanticModel semanticModel, 115protected 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)
86protected 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, 198int position, SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken, 224SemanticModel semanticModel, 243SemanticModel 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)
126var semanticModel = context.SemanticModel; 250SemanticModel semanticModel, 328SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
275var semanticModel = syntaxContext.SemanticModel;
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)
222var semanticModel = blockOperation.SemanticModel; 265SemanticModel 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)
59var semanticModel = context.SemanticModel; 210var rewrittenSemanticModel = analyzer.SpeculativeSemanticModel; 243SemanticModel semanticModel1, 245SemanticModel 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\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (2)
59SemanticModel semanticModel, 181var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (3)
51SemanticModel semanticModel, 206SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken) 240SemanticModel 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)
28var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
29var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
71var semanticModel = context.SemanticModel; 157var semanticModel = state.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
42var semanticModel = context.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 (8)
62SemanticModel semanticModel, 80SemanticModel semanticModel, 385SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 735SemanticModel semanticModel, 856SemanticModel semanticModel, 1007SemanticModel semanticModel, ArgumentSyntax argument, out bool unwrapArgument, out bool useSpread, CancellationToken cancellationToken) 1046public static bool IsIterable(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 1079SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerDiagnosticAnalyzer.cs (1)
50SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (3)
53var semanticModel = context.SemanticModel; 119var semanticModel = context.SemanticModel; 174SemanticModel 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)
68protected 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 (3)
22SemanticModel semanticModel, ExpressionBodyPreference preference, 68SemanticModel semanticModel, ExpressionBodyPreference preference, LambdaExpressionSyntax declaration, LanguageVersion languageVersion, CancellationToken cancellationToken) 109SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (2)
42var semanticModel = context.SemanticModel; 61SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (2)
40var semanticModel = context.SemanticModel; 68SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
37var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
198var semanticModel = instance.SemanticModel;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
79var 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)
68var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
63var semanticModel = context.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (4)
19private readonly SemanticModel _semanticModel; 29SemanticModel semanticModel, 56SemanticModel semanticModel, 252var semanticModel = _semanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
83var semanticModel = syntaxContext.SemanticModel; 269SemanticModel semanticModel, 317SemanticModel semanticModel,
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
111var semanticModel = syntaxContext.SemanticModel;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
71var 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)
85var semanticModel = context.SemanticModel; 132SemanticModel semanticModel, 175SemanticModel semanticModel, 225SemanticModel 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\AddParameter\CSharpAddParameterCodeFixProvider.cs (2)
49protected override ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken) 56SemanticModel 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)
33protected 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)
56var semanticModel = document.SemanticModel; 174protected override string GenerateNameForExpression(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 177protected override ITypeSymbol GetArgumentType(SemanticModel semanticModel, Argument<ExpressionSyntax> argument, CancellationToken cancellationToken) 183protected override IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 186protected 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)
97CSharpSimplifierOptions options, SemanticModel semanticModel, 324SemanticModel semanticModel, 384SemanticModel semanticModel, 386out 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\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
33SemanticModel semanticModel, InvocationExpressionSyntax invocationExpression, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (1)
76SemanticModel semanticModel, SyntaxEditor editor, Diagnostic diagnostic,
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (5)
22internal static LambdaExpressionSyntax Update(SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, CancellationToken cancellationToken) 26SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, CancellationToken cancellationToken) 35SemanticModel semanticModel, LambdaExpressionSyntax declaration, CancellationToken cancellationToken) 57SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, ExpressionSyntax expressionBody) 80SemanticModel semanticModel, LambdaExpressionSyntax declaration)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (2)
154SemanticModel semanticModel, 227private static ITypeSymbol GetConvertedType(SemanticModel semanticModel, SyntaxNode typeSyntax, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
64SemanticModel 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)
125var 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\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (5)
66var semanticModel = context.SemanticModel; 109SemanticModel semanticModel, 200SemanticModel updatedSemanticModel, CancellationToken cancellationToken) 210public static SemanticModel ReplaceMatches( 211SemanticModel 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 (1155)
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) 14379private static void VerifyLocalDelegateType(SemanticModel model, VariableDeclaratorSyntax variable, string expectedInvokeMethod) 14397private static void VerifyExpressionType(SemanticModel model, ExpressionSyntax variable, string expectedSymbol, string expectedInvokeMethod) 14731var model = comp.GetSemanticModel(tree); 14778var model = comp.GetSemanticModel(tree); 14791static void verifyConversions(SemanticModel model, ExpressionSyntax expr, ITypeSymbol destination, ConversionKind expectedImplicitKind, ConversionKind expectedExplicitKind) 19790var model = comp.GetSemanticModel(tree); 19832var 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 (28)
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); 4609var model = comp.GetSemanticModel(tree); 4641var model = comp.GetSemanticModel(tree); 4673var model = comp.GetSemanticModel(tree); 4711var model = comp.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 (2)
44var model = comp.GetSemanticModel(tree); 215var model = comp.GetSemanticModel(source);
Semantics\InterpolationTests.cs (5)
4598var model = comp.GetSemanticModel(tree); 4824var model = comp.GetSemanticModel(tree); 19074var model = comp.GetSemanticModel(tree); 19130var model = comp.GetSemanticModel(tree); 19194var 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 (67)
838var model = comp.GetSemanticModel(tree); 938var model = compilation.GetSemanticModel(tree); 1030var model = compilation.GetSemanticModel(tree); 1084var model = compilation.GetSemanticModel(tree); 1119var model = compilation.GetSemanticModel(tree); 1175var model = comp.GetSemanticModel(tree); 1203var model = comp.GetSemanticModel(tree); 1235var model = comp.GetSemanticModel(tree); 1516var semanticModel = compilation.GetSemanticModel(tree); 1551var semanticModel = compilation.GetSemanticModel(tree); 1585var semanticModel = compilation.GetSemanticModel(tree); 1617var semanticModel = compilation.GetSemanticModel(tree); 1976var model = compilation.GetSemanticModel(tree); 2118var sm = compilation.GetSemanticModel(tree); 2164var sm = compilation.GetSemanticModel(tree); 2210var sm = compilation.GetSemanticModel(tree); 2256var sm = compilation.GetSemanticModel(tree); 2302var sm = compilation.GetSemanticModel(tree); 2332var sm = compilation.GetSemanticModel(tree); 2359var sm = compilation.GetSemanticModel(tree); 2413var sm = compilation.GetSemanticModel(tree); 2459var sm = compilation.GetSemanticModel(tree); 2505var sm = compilation.GetSemanticModel(tree); 2538var sm = compilation.GetSemanticModel(tree); 2571var sm = compilation.GetSemanticModel(tree); 2608var sm = compilation.GetSemanticModel(tree); 2660var sm = compilation.GetSemanticModel(tree); 2998var model = comp.GetSemanticModel(tree); 3040var model = comp.GetSemanticModel(tree); 3610var model = comp.GetSemanticModel(tree); 3891var model = comp.GetSemanticModel(tree); 3935var model = comp.GetSemanticModel(tree); 3975var model = comp.GetSemanticModel(tree); 4091var model = comp.GetSemanticModel(tree); 4120var model = comp.GetSemanticModel(tree); 4155var model = comp.GetSemanticModel(tree); 4183var model = comp.GetSemanticModel(tree); 4210var model = comp.GetSemanticModel(tree); 4785var model = comp.GetSemanticModel(tree); 4870var model = comp.GetSemanticModel(tree); 4925var model = comp.GetSemanticModel(tree); 4952var model = comp.GetSemanticModel(tree); 4980var model = comp.GetSemanticModel(tree); 5026var model = comp.GetSemanticModel(tree); 5634var model = comp.GetSemanticModel(tree); 6220private static LambdaSymbol GetLambdaSymbol(SemanticModel model, LambdaExpressionSyntax syntax) 6507var model = comp.GetSemanticModel(tree); 6817var model = comp.GetSemanticModel(tree); 6846var model = comp.GetSemanticModel(tree); 6892var model = comp.GetSemanticModel(tree); 7008var model = comp.GetSemanticModel(syntaxTree); 7101var model = comp.GetSemanticModel(syntaxTree); 7627var model = comp.GetSemanticModel(tree); 8001var model = comp.GetSemanticModel(tree); 8049var model = comp.GetSemanticModel(tree); 8073var model = comp.GetSemanticModel(tree); 8078Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(m2Syntax.Body.SpanStart, newMethod, out var speculativeModel)); 8109var model = comp.GetSemanticModel(tree); 8221var model = comp.GetSemanticModel(tree); 8351var model = comp.GetSemanticModel(tree); 8384var model = comp.GetSemanticModel(tree); 8569var semanticModel = compilation.GetSemanticModel(tree); 8677var semanticModel = compilation.GetSemanticModel(tree); 8706var semanticModel = compilation.GetSemanticModel(tree); 8733var semanticModel = compilation.GetSemanticModel(tree); 8763var semanticModel = compilation.GetSemanticModel(tree); 8790var semanticModel = compilation.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 (18)
684var model = compilation.GetSemanticModel(tree); 710var model = compilation.GetSemanticModel(tree); 745var model = compilation.GetSemanticModel(tree); 792var model = compilation.GetSemanticModel(tree); 829var model = compilation.GetSemanticModel(tree); 865var model = compilation.GetSemanticModel(tree); 911var model = compilation.GetSemanticModel(tree); 944var model = compilation.GetSemanticModel(tree); 984var model = comp.GetSemanticModel(tree); 1000Assert.True(model.TryGetSpeculativeSemanticModel(initializer.Position, initializer, out var model2)); 1056var model = comp.GetSemanticModel(tree); 1071Assert.True(model.TryGetSpeculativeSemanticModel(initializer.Position, initializer, out var model2)); 1138var model = comp.GetSemanticModel(tree); 1157Assert.True(model.TryGetSpeculativeSemanticModel(initializer.Position, initializer, out var model2)); 1219var model = comp.GetSemanticModel(tree); 1235Assert.True(model.TryGetSpeculativeSemanticModel(initializer.Position, initializer, out var model2)); 1421var model = compilation.GetSemanticModel(tree); 3039var semanticModel = 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); 2378var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2402var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2664var model = comp.GetSemanticModel(tree); 2699var model = comp.GetSemanticModel(tree); 2733var model = comp.GetSemanticModel(tree); 2768var model = comp.GetSemanticModel(tree); 3318var model = comp.GetSemanticModel(tree); 3360var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 3408var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 3459var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 5920var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 5962var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 6996var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 7677var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8882var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 10841var model = comp.GetSemanticModel(tree);
Semantics\RefEscapingTests.cs (3)
49var model = comp.GetSemanticModel(tree); 5782var model = compilation.GetSemanticModel(tree); 5882var 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); 11393var model = comp.GetSemanticModel(tree); 11985var model = comp.GetSemanticModel(tree); 12065var model = comp.GetSemanticModel(tree); 12134var model = comp.GetSemanticModel(tree); 12202var model = comp.GetSemanticModel(tree); 12384var model = comp.GetSemanticModel(tree); 12571var model = comp.GetSemanticModel(tree); 12797var model = comp.GetSemanticModel(tree); 12980var model = comp.GetSemanticModel(tree); 13155var model = comp.GetSemanticModel(tree); 13210var model = comp.GetSemanticModel(tree); 13269var model = comp.GetSemanticModel(tree); 13312var model = comp.GetSemanticModel(tree); 13341var model = comp.GetSemanticModel(tree); 13366var model = comp.GetSemanticModel(tree); 13386var model = comp.GetSemanticModel(tree); 13408var model = comp.GetSemanticModel(tree); 13443var model = comp.GetSemanticModel(tree); 13507var model = comp.GetSemanticModel(tree); 13583var model = comp.GetSemanticModel(tree); 13654var model = comp.GetSemanticModel(tree); 13718var model = comp.GetSemanticModel(tree); 14359var model = comp.GetSemanticModel(tree); 14401var model = comp.GetSemanticModel(tree); 14526var model = comp.GetSemanticModel(tree); 14602var model = comp.GetSemanticModel(tree); 14847var model = comp.GetSemanticModel(tree); 15055var model = comp.GetSemanticModel(tree); 15081var model = comp.GetSemanticModel(tree); 15136var model = comp.GetSemanticModel(tree); 16554var model = comp.GetSemanticModel(tree); 16595var model = comp.GetSemanticModel(tree); 16634var model = comp.GetSemanticModel(tree); 16730var model = comp.GetSemanticModel(tree); 16778var model = comp.GetSemanticModel(syntaxTree); 17950var model = comp.GetSemanticModel(tree); 23375var model = comp.GetSemanticModel(tree); 23443var model = comp.GetSemanticModel(tree); 24445var model = comp.GetSemanticModel(tree); 24481var model = comp.GetSemanticModel(tree); 24518var model = comp.GetSemanticModel(tree); 25285var model = comp.GetSemanticModel(tree); 25303static (NamedTypeSymbol, LambdaSymbol) getDelegateTypeAndLambda(SemanticModel model, VariableDeclaratorSyntax decl) 27340var model = comp.GetSemanticModel(tree); 27392var model = comp.GetSemanticModel(tree); 27444var model = comp.GetSemanticModel(tree); 27601var model = comp.GetSemanticModel(tree); 27691var model = comp.GetSemanticModel(tree); 27811var model = comp.GetSemanticModel(tree); 27912var model = comp.GetSemanticModel(tree); 27957var model = comp.GetSemanticModel(tree); 28017var model = comp.GetSemanticModel(tree); 28247var model = comp.GetSemanticModel(tree); 28295var model = comp.GetSemanticModel(tree); 29385var 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\SimpleLambdaParametersWithModifiersTests.cs (43)
37var semanticModel = compilation.GetSemanticModel(tree); 64var semanticModel = compilation.GetSemanticModel(tree); 96var semanticModel = compilation.GetSemanticModel(tree); 126var semanticModel = compilation.GetSemanticModel(tree); 162var semanticModel = compilation.GetSemanticModel(tree); 197var semanticModel = compilation.GetSemanticModel(tree); 229var semanticModel = compilation.GetSemanticModel(tree); 257var semanticModel = compilation.GetSemanticModel(tree); 288var semanticModel = compilation.GetSemanticModel(tree); 322var semanticModel = compilation.GetSemanticModel(tree); 351var semanticModel = compilation.GetSemanticModel(tree); 382var semanticModel = compilation.GetSemanticModel(tree); 416var semanticModel = compilation.GetSemanticModel(tree); 448var semanticModel = compilation.GetSemanticModel(tree); 477var semanticModel = compilation.GetSemanticModel(tree); 509var semanticModel = compilation.GetSemanticModel(tree); 542var semanticModel = compilation.GetSemanticModel(tree); 575var semanticModel = compilation.GetSemanticModel(tree); 608var semanticModel = compilation.GetSemanticModel(tree); 637var semanticModel = compilation.GetSemanticModel(tree); 665var semanticModel = compilation.GetSemanticModel(tree); 697var semanticModel = compilation.GetSemanticModel(tree); 726var semanticModel = compilation.GetSemanticModel(tree); 755var semanticModel = compilation.GetSemanticModel(tree); 786var semanticModel = compilation.GetSemanticModel(tree); 820var semanticModel = compilation.GetSemanticModel(tree); 854var semanticModel = compilation.GetSemanticModel(tree); 886var semanticModel = compilation.GetSemanticModel(tree); 932var semanticModel = compilation.GetSemanticModel(tree); 960var semanticModel = compilation.GetSemanticModel(tree); 985var semanticModel = compilation.GetSemanticModel(tree); 1036var semanticModel = compilation.GetSemanticModel(tree); 1071var semanticModel = compilation.GetSemanticModel(tree); 1100var semanticModel = compilation.GetSemanticModel(tree); 1129var semanticModel = compilation.GetSemanticModel(tree); 1156var semanticModel = compilation.GetSemanticModel(tree); 1185var semanticModel = compilation.GetSemanticModel(tree); 1219var semanticModel = compilation.GetSemanticModel(tree); 1328var semanticModel = compilation.GetSemanticModel(tree); 1358var semanticModel = compilation.GetSemanticModel(tree); 1385var semanticModel = compilation.GetSemanticModel(tree); 1418var semanticModel = compilation.GetSemanticModel(tree); 1451var semanticModel = 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)
4334var model = context.SemanticModel;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1034)
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 (181)
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; 3122var model = comp.GetSemanticModel(tree); 3129Assert.True(model.TryGetSpeculativeSemanticModel(methodDeclLocation, returnStatement, out var speculativeModel)); 3156var model = comp.GetSemanticModel(tree); 3186var model = comp.GetSemanticModel(tree); 3191SemanticModel speculativeModel; 3221var model = comp.GetSemanticModel(tree); 3226SemanticModel speculativeModel; 3251var model = comp.GetSemanticModel(tree); 3256SemanticModel speculativeModel; 3288var model = comp.GetSemanticModel(tree); 3297SemanticModel speculativeModel; 3329var model = comp.GetSemanticModel(tree); 3338SemanticModel speculativeModel; 3370var model = comp.GetSemanticModel(tree); 3404var model = comp.GetSemanticModel(tree); 3414SemanticModel speculativeModel; 3446var model = comp.GetSemanticModel(tree); 3455SemanticModel speculativeModel; 3487var model = comp.GetSemanticModel(tree); 3496SemanticModel speculativeModel; 3528var model = comp.GetSemanticModel(tree); 3553var model = compilation.GetSemanticModel(tree); 3574var model = compilation.GetSemanticModel(tree); 3578SemanticModel model2; 3613var model = comp.GetSemanticModel(tree); 3618SemanticModel speculativeModel; 3643var semanticModel = compilation.GetSemanticModel(tree); 3779var model = comp.GetSemanticModel(tree); 3815var model = comp.GetSemanticModel(tree); 3820Assert.True(model.TryGetSpeculativeSemanticModel(localFunctionBody.Block!.Statements[0].SpanStart + 1, @return, out var specModel)); 3848var model = comp.GetSemanticModel(tree); 3875var model = comp.GetSemanticModel(tree); 3903var model = comp.GetSemanticModel(tree); 3934var model = comp.GetSemanticModel(tree); 4059var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4087var model = compilation.GetSemanticModel(tree); 4115var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4136var model = comp.GetSemanticModel(tree); 4173var model = comp.GetSemanticModel(tree); 4216var model = comp.GetSemanticModel(tree); 4240var model = comp.GetSemanticModel(tree); 4268var model = comp.GetSemanticModel(tree); 4306var model = comp.GetSemanticModel(tree); 4358var model = comp.GetSemanticModel(tree); 4401var semanticModel = compilation.GetSemanticModel(tree); 4456var model = comp.GetSemanticModel(syntaxTree); 4461Assert.True(model.TryGetSpeculativeSemanticModel(ifStatement.SpanStart, replacementIfStatement, out var specModel)); 4490var model = comp.GetSemanticModel(tree); 4505var model = comp.GetSemanticModel(tree); 4569var model = comp.GetSemanticModel(tree); 4657var model = compilation.GetSemanticModel(tree); 4676var model = compilation.GetSemanticModel(tree); 4693var model = compilation.GetSemanticModel(tree); 4708var model = compilation.GetSemanticModel(tree); 4724var model = compilation.GetSemanticModel(tree); 4740var model = compilation.GetSemanticModel(tree); 4759var model = compilation.GetSemanticModel(tree); 4775var model = compilation.GetSemanticModel(tree); 4790var model = compilation.GetSemanticModel(tree); 4802var 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 (31)
3033var model = comp.GetSemanticModel(tree); 3590var model = comp.GetSemanticModel(tree); 5595var model = comp.GetSemanticModel(comp.SyntaxTrees.First()); 5621var model = comp.GetSemanticModel(tree); 6061var model = comp.GetSemanticModel(tree); 6608var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6651var semanticModel = comp.GetSemanticModel(srcTree); 6685var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6747var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6780var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6841var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6874var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6919var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7037var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7075var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7113var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7173var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7245var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7505var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7658var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7686var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7910var model = compilation.GetSemanticModel(tree); 8002var model = compilation.GetSemanticModel(tree); 8062var model = compilation.GetSemanticModel(tree); 8094var model = compilation.GetSemanticModel(tree); 8397var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 8448var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 8483var model = comp.GetSemanticModel(tree); 8874var model = comp.GetSemanticModel(tree); 8930var model = comp.GetSemanticModel(tree); 9023var 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 (15)
390var model = compilation.GetSemanticModel(tree); 452var model = comp.GetSemanticModel(tree); 483var model = comp.GetSemanticModel(tree); 518var model = comp.GetSemanticModel(tree); 554var model = comp.GetSemanticModel(tree); 590var model = comp.GetSemanticModel(tree); 624var model = comp.GetSemanticModel(tree); 659var model = comp.GetSemanticModel(tree); 684var model = comp.GetSemanticModel(tree); 715var model = comp.GetSemanticModel(tree); 741var model = comp.GetSemanticModel(tree); 764var model = comp.GetSemanticModel(tree); 2067var model = comp.GetSemanticModel(tree); 2137var model = comp.GetSemanticModel(tree); 2171var 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)
7647var 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); 3973var model = comp.GetSemanticModel(syntaxTree); 4042var model = comp.GetSemanticModel(syntaxTree); 4063Assert.True(model.TryGetSpeculativeSemanticModel(localFunction.SpanStart, speculativeAttribute, out var speculativeModel)); 4109var model = comp.GetSemanticModel(syntaxTree); 4172var model = comp.GetSemanticModel(syntaxTree); 4206var model = comp.GetSemanticModel(syntaxTree); 4211Assert.True(model.TryGetSpeculativeSemanticModel(attributeUsage.SpanStart, newAttributeUsage, out var specModel)); 4238var model = comp.GetSemanticModel(syntaxTree); 4267var model = comp.GetSemanticModel(syntaxTree); 4301var model = comp.GetSemanticModel(syntaxTree); 4331var model = comp.GetSemanticModel(tree); 4361var model = comp.GetSemanticModel(tree); 4365Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4389var model = comp.GetSemanticModel(tree); 4393Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4417var model = comp.GetSemanticModel(tree); 4423Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4447var model = comp.GetSemanticModel(tree); 4453Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4477var model = comp.GetSemanticModel(tree); 4483Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4507var model = comp.GetSemanticModel(tree); 4515Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(type.SpanStart, methodDeclaration, out var speculativeModel)); 4539var model = comp.GetSemanticModel(tree); 4548Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(type.SpanStart, methodDeclaration, out var speculativeModel)); 4572var model = comp.GetSemanticModel(tree); 4576Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, arrow, out var speculativeModel)); 4600var model = comp.GetSemanticModel(tree); 4606Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, arrow, out var speculativeModel)); 4633var model = comp.GetSemanticModel(tree); 4637Assert.True(model.TryGetSpeculativeSemanticModel(initializer.SpanStart, newInitializer, out var speculativeModel)); 4664var model = comp.GetSemanticModel(tree); 4670Assert.True(model.TryGetSpeculativeSemanticModel(initializer.SpanStart, newInitializer, out var speculativeModel)); 4695var model = comp.GetSemanticModel(tree); 4725var model = comp.GetSemanticModel(tree); 4776var model = comp.GetSemanticModel(syntaxTree); 4811var model = comp.GetSemanticModel(tree); 4845var model = context.SemanticModel; 4897var model = comp.GetSemanticModel(tree); 4909Assert.True(model.TryGetSpeculativeSemanticModel(spanStart, newBody, out var speculativeModel)); 4931var model = comp.GetSemanticModel(tree); 4962var model = comp.GetSemanticModel(tree); 5005var model = comp.GetSemanticModel(tree); 5044var model = comp.GetSemanticModel(tree); 5064var model = comp.GetSemanticModel(tree); 5098var model = comp.GetSemanticModel(tree); 5130var model = comp.GetSemanticModel(tree); 5158var model = comp.GetSemanticModel(tree); 5193var model = comp.GetSemanticModel(tree, options); 5228var model = comp.GetSemanticModel(tree, options); 5249var model = comp.GetSemanticModel(tree); 5272var model = comp.GetSemanticModel(tree); 5304var model = comp.GetSemanticModel(tree); 5327var model = comp.GetSemanticModel(tree); 5349var model = comp.GetSemanticModel(tree); 5394var model = comp.GetSemanticModel(tree); 5451var 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)
1563var 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)
1662public Tuple<TNode, SemanticModel> GetBindingNodeAndModel<TNode>(CSharpCompilation compilation, int treeIndex = 0) where TNode : SyntaxNode 1665return new Tuple<TNode, SemanticModel>(node, compilation.GetSemanticModel(compilation.SyntaxTrees[treeIndex])); 1668public Tuple<TNode, SemanticModel> GetBindingNodeAndModel<TNode>(Compilation compilation, int treeIndex = 0) where TNode : SyntaxNode 1673public Tuple<IList<TNode>, SemanticModel> GetBindingNodesAndModel<TNode>(CSharpCompilation compilation, int treeIndex = 0, int which = -1) where TNode : SyntaxNode 1676return new Tuple<IList<TNode>, SemanticModel>(nodes, compilation.GetSemanticModel(compilation.SyntaxTrees[treeIndex])); 2041var model = compilation.GetSemanticModel(tree); 2091protected static void VerifyOperationTreeForNode(CSharpCompilation compilation, SemanticModel model, SyntaxNode syntaxNode, string expectedOperationTree) 2114var 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 (312)
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)
920private ITypeSymbol? GetContainerForUnnamedSymbols(SemanticModel semanticModel, ExpressionSyntax originalExpression)
Rename\CSharpRenameRewriterLanguageService.cs (5)
55private readonly SemanticModel _semanticModel; 103private SemanticModel? _speculativeModel; 1022SemanticModel semanticModel, 1235public 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)
53public override SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken) 78public override SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken) 170protected override SemanticModel GetSpeculativeSemanticModel(ref SyntaxNode nodeToSpeculate, SemanticModel originalSemanticModel, SyntaxNode originalNode) 186protected override void GetUnusedNamespaceImports(SemanticModel model, HashSet<SyntaxNode> namespaceImports, CancellationToken cancellationToken)
Simplification\CSharpSimplificationService.Expander.cs (4)
46private readonly SemanticModel _semanticModel; 53SemanticModel semanticModel, 779private static bool IsInvocationWithDynamicArguments(SimpleNameSyntax originalSimpleName, SemanticModel semanticModel) 1013private 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) 73ExpressionSyntax node, SemanticModel semanticModel, 196private static bool HasUsingAliases(SemanticModel semanticModel, CancellationToken cancellationToken) 211private static bool ComputeHasUsingAliases(SemanticModel model, CancellationToken cancellationToken) 257private static bool ValidateAliasForTarget(IAliasSymbol aliasReplacement, SemanticModel semanticModel, ExpressionSyntax node, ISymbol symbol) 310private static IAliasSymbol GetAliasForSymbol(INamespaceOrTypeSymbol symbol, SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 333private static int? GetNamespaceIdForAliasSearch(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 360private static SyntaxNode GetStartNodeForNamespaceId(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 379protected static bool InsideNameOfExpression(ExpressionSyntax expression, SemanticModel semanticModel) 393protected static bool PreferPredefinedTypeKeywordInMemberAccess(ExpressionSyntax expression, CSharpSimplifierOptions options, SemanticModel semanticModel) 403ExpressionSyntax 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, 579NameSyntax name, TypeSyntax reducedName, SemanticModel semanticModel) 614private static bool CanReplaceWithReducedName(NameSyntax name, TypeSyntax reducedName, SemanticModel semanticModel, CancellationToken cancellationToken) 677private static bool IsNonReducableQualifiedNameInUsingDirective(SemanticModel model, NameSyntax name) 685private static bool IsQualifiedNameInUsingDirective(SemanticModel model, NameSyntax name) 714private static bool IsInScriptClass(SemanticModel model, NameSyntax name) 730private 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)
33SemanticModel semanticModel, 120SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
40SemanticModel 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 (5)
322SemanticModel semanticModel, 425[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 455[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 466this ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 909SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (3)
21this ParenthesizedExpressionSyntax node, SemanticModel semanticModel, CancellationToken cancellationToken) 322SemanticModel semanticModel, CancellationToken cancellationToken) 389ParenthesizedExpressionSyntax node, ExpressionSyntax parentExpression, SemanticModel semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (18)
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, 430SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 460public static INamedTypeSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, BaseTypeDeclarationSyntax syntax, CancellationToken cancellationToken) 466public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ConstructorDeclarationSyntax syntax, CancellationToken cancellationToken) 472public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, LocalFunctionStatementSyntax syntax, CancellationToken cancellationToken) 478public static IParameterSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ParameterSyntax syntax, CancellationToken cancellationToken) 484public static IPropertySymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, PropertyDeclarationSyntax syntax, CancellationToken cancellationToken) 490public static IMethodSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, BaseMethodDeclarationSyntax syntax, CancellationToken cancellationToken) 496public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, VariableDeclaratorSyntax syntax, CancellationToken cancellationToken) 502public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SingleVariableDesignationSyntax syntax, CancellationToken cancellationToken) 512public static bool UnifiesNativeIntegers(this SemanticModel semanticModel)
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 (31)
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 node) 183public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 186public IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 197public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 209public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 245public IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 255public IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 258public IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 262public ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 265public ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 270public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken) 283static ImmutableArray<ISymbol> GetCallingConventionSymbols(SemanticModel model, FunctionPointerUnmanagedCallingConventionSyntax syntax) 292/// cref="ModelExtensions.GetSymbolInfo(SemanticModel, SyntaxNode, CancellationToken)"/>, but sometimes employs 296private ImmutableArray<ISymbol> GetSymbolInfo(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 368public bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 376var semanticModel = compilation.GetSemanticModel(syntaxReference.SyntaxTree); 392public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken) 395public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken) 398public IPreprocessingSymbol? GetPreprocessingSymbol(SemanticModel semanticModel, SyntaxNode node) 407private static IPreprocessingSymbol? CreatePreprocessingSymbol(SemanticModel model, SyntaxToken identifier)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
495public bool IsBindableToken(SemanticModel? semanticModel, SyntaxToken token)
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) 121SemanticModel semanticModel, 153SemanticModel semanticModel, 178SemanticModel originalSemanticModel, CancellationToken cancellationToken) 249SemanticModel originalSemanticModel, IDelegateCreationOperation originalDelegateCreationOperation, 289SemanticModel originalSemanticModel, IConversionOperation originalConversionOperation, 607SemanticModel originalSemanticModel, 671ExpressionSyntax castNode, ExpressionSyntax castedExpressionNode, SemanticModel semanticModel, CancellationToken cancellationToken) 758ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, 825ExpressionSyntax castNode, SemanticModel originalSemanticModel, 826ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, CancellationToken cancellationToken) 944SemanticModel semanticModel, 1020SemanticModel semanticModel, 1079SemanticModel semanticModel, CancellationToken cancellationToken) 1146private static bool IsFieldOrArrayElement(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 1153ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 1167SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1220SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1254SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel) 1285SemanticModel originalSemanticModel, 1286SemanticModel rewrittenSemanticModel, 1394SemanticModel originalSemanticModel, 1395SemanticModel rewrittenSemanticModel, 1434SemanticModel semanticModel, 1472MemberAccessExpressionSyntax memberAccessExpression, SemanticModel semanticModel, 1528SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1550private static (SemanticModel? rewrittenSemanticModel, ExpressionSyntax? rewrittenExpression) GetSemanticModelWithCastRemoved( 1553SemanticModel 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, 58protected override bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 69protected override bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken) 98TypeSyntax typeName, SemanticModel semanticModel, 166SemanticModel semanticModel, 196var newSemanticModel = semanticModel.Compilation.ReplaceSyntaxTree(tree, newTree).GetSemanticModel(newTree); 205private static bool IsSafeToSwitchToVarWithoutNeedingSpeculation(DeclarationExpressionSyntax declarationExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 257SemanticModel semanticModel,
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)
51SemanticModel semanticModel, 180public static CSharpSyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 184Document 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, 3013public 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)
23protected override AbstractTypeInferrer CreateTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (24)
30SemanticModel semanticModel, 101var typeInfo = SemanticModel.GetTypeInfo(node, CancellationToken); 102var symbolInfo = SemanticModel.GetSymbolInfo(node, CancellationToken); 192var syntaxTree = SemanticModel.SyntaxTree; 391var info = SemanticModel.GetSymbolInfo(initializer, CancellationToken); 438var info = SemanticModel.GetTypeInfo(creation, CancellationToken); 459var info = SemanticModel.GetTypeInfo(primaryConstructorBaseType.Type, CancellationToken); 475var info = SemanticModel.GetSymbolInfo(invocation, CancellationToken); 487SemanticModel.GetMemberGroup(invocation.Expression, CancellationToken) 499var typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken); 558var info = SemanticModel.GetSymbolInfo(attribute, CancellationToken); 566var info = SemanticModel.GetTypeInfo(elementAccess.Expression, CancellationToken); 1221SemanticModel.GetDeclaredSymbol(equalsValue.Parent, CancellationToken) is IParameterSymbol parameter) 1233var typeInfo = SemanticModel.GetTypeInfo(propertyDeclaration.Type); 1311var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(initializerExpression).GetAllSymbols(); 1329var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expressionOpt).GetAllSymbols(); 1420var addMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expressionOpt).GetAllSymbols(); 1536_ when SemanticModel.GetOperation(pattern, CancellationToken) is IPatternOperation patternOperation => 1553var typeInfo = SemanticModel.GetTypeInfo(recursivePattern); 1826SemanticModel.GetSymbolInfo(identifierName.Identifier).Symbol?.Kind == SymbolKind.Parameter) 2053var currentSemanticModel = SemanticModel; 2178var symbol = SemanticModel.GetDeclaredSymbol(variableDeclarator); 2224var descendantSymbol = SemanticModel.GetSymbolInfo(descendant, CancellationToken).GetAnySymbol(); 2253var symbol = SemanticModel.GetRequiredDeclaredSymbol(designation, CancellationToken);
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 (3)
Navigation\AbstractDefinitionLocationService.cs (2)
60Document document, SemanticModel semanticModel) 73Document document, SemanticModel semanticModel)
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)
649var 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 (437)
AddImport\AbstractAddImportFeatureService.cs (9)
51protected abstract ISet<INamespaceSymbol> GetImportNamespacesInScope(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 52protected abstract ITypeSymbol GetDeconstructInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 53protected abstract ITypeSymbol GetQueryClauseInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 54protected abstract bool IsViableExtensionMethod(IMethodSymbol method, SyntaxNode expression, SemanticModel semanticModel, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken); 59protected abstract bool IsAddMethodContext(SyntaxNode node, SemanticModel semanticModel); 62protected abstract (string description, bool hasExistingImport) GetDescription(Document document, AddImportPlacementOptions options, INamespaceOrTypeSymbol symbol, SemanticModel semanticModel, SyntaxNode root, CancellationToken cancellationToken); 133SemanticModel semanticModel, 630private static ITypeSymbol? GetAwaitInfo(SemanticModel semanticModel, ISyntaxFacts syntaxFactsService, SyntaxNode node) 642private 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)
79var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 126SemanticModel semanticModel, CancellationToken cancellationToken)
AddImport\SymbolReferenceFinder.cs (2)
33private readonly SemanticModel _semanticModel; 52SemanticModel semanticModel,
BraceMatching\IEmbeddedLanguageBraceMatcher.cs (1)
14SemanticModel semanticModel,
ChangeSignature\AbstractChangeSignatureService.cs (3)
926var semanticModel = document.SemanticModel; 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)
288var 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)
183var semanticModel = state.SemanticDocument.SemanticModel; 206SemanticModel semanticModel, 229SemanticModel semanticModel, 251TTypeDeclarationSyntax 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 (3)
86SolutionServices workspaceServices, SemanticModel semanticModel, int position, ISymbol symbol, int overloadCount, SymbolDescriptionOptions options, SupportedPlatformData? supportedPlatforms, CancellationToken cancellationToken) 151SolutionServices workspaceServices, SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SupportedPlatformData? supportedPlatforms, CancellationToken cancellationToken) 174List<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 (3)
59protected abstract TextChange? GetReturnTypeChange(SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken); 63protected abstract ITypeSymbol? GetTypeSymbolOfExpression(SemanticModel semanticModel, SyntaxNode potentialAwaitableExpression, CancellationToken cancellationToken); 265var 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)
19protected abstract Tuple<ITypeSymbol, Location>? GetInitializedType(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken);
Completion\Providers\AbstractOverrideCompletionProvider.cs (1)
64SemanticModel semanticModel,
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (2)
70ISymbol symbol, SemanticModel semanticModel, 89SemanticModel semanticModel,
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (2)
37protected abstract string GetDisplayText(IMethodSymbol method, SemanticModel semanticModel, int position); 105private CompletionItem CreateItem(IMethodSymbol method, int line, TextSpan span, SemanticModel semanticModel, DeclarationModifiers modifiers, SyntaxToken token)
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (1)
66var 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)
358CompletionItem item, ImmutableArray<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)
269SemanticModel semanticModel, 286SemanticModel 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)
189SemanticModel? oldModel, 190SemanticModel newModel, 203SemanticModel? oldModel, 204SemanticModel newModel, 211SemanticModel? oldModel, 212SemanticModel newModel, 256protected abstract IEnumerable<SyntaxNode> GetVariableUseSites(IEnumerable<SyntaxNode> roots, ISymbol localOrParameter, SemanticModel model, CancellationToken cancellationToken); 421SemanticModel oldModel, 424SemanticModel newModel, 446internal abstract IMethodSymbol GetLambdaExpressionSymbol(SemanticModel model, SyntaxNode lambdaExpression, CancellationToken cancellationToken); 448internal abstract bool QueryClauseLambdasTypeEquivalent(SemanticModel oldModel, SyntaxNode oldNode, SemanticModel newModel, SyntaxNode newNode, CancellationToken cancellationToken); 926SemanticModel? oldModel, 927SemanticModel newModel, 1819SemanticModel oldModel, 1822SemanticModel newModel, 1887SemanticModel oldModel, 1889SemanticModel 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)
39protected override bool TryGetOptions(SemanticModel semanticModel, ITypeSymbol exprType, SyntaxNode expr, CancellationToken cancellationToken, out DateAndTimeOptions options) 53protected override bool IsEmbeddedLanguageInterpolatedStringTextToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 69SemanticModel semanticModel,
EmbeddedLanguages\EmbeddedLanguageDetector.cs (10)
34SemanticModel semanticModel, 48SemanticModel semanticModel, 61SemanticModel semanticModel, 156SemanticModel semanticModel, 208SemanticModel semanticModel, 279SemanticModel semanticModel, 334SemanticModel semanticModel, 395SemanticModel semanticModel, 411SemanticModel semanticModel, 425SemanticModel 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,
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 (3)
34protected SemanticModel SemanticModel => SemanticDocument.SemanticModel; 71var model = this.SemanticModel; 287var semanticModel = this.SemanticModel;
ExtractMethod\MethodExtractor.cs (1)
224SemanticModel semanticModel, ITypeSymbol type)
ExtractMethod\UniqueNameGenerator.cs (2)
14private readonly SemanticModel _semanticModel; 16public UniqueNameGenerator(SemanticModel semanticModel)
FullyQualify\AbstractFullyQualifyService.cs (5)
121SemanticModel semanticModel, 154SemanticModel semanticModel, 185SemanticModel semanticModel, 230SemanticModel semanticModel, int arity, bool inAttributeContext, 289private 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)
136SemanticModel semanticModel, INamedTypeSymbol containingType,
GenerateType\AbstractGenerateTypeService.cs (10)
41protected abstract ImmutableArray<ITypeParameterSymbol> GetTypeParameters(State state, SemanticModel semanticModel, CancellationToken cancellationToken); 42protected abstract Accessibility GetAccessibility(State state, SemanticModel semanticModel, bool intoNamespace, CancellationToken cancellationToken); 43protected abstract IList<ParameterName> GenerateParameterNames(SemanticModel semanticModel, IList<TArgumentSyntax> arguments, CancellationToken cancellationToken); 45protected abstract INamedTypeSymbol DetermineTypeToGenerateIn(SemanticModel semanticModel, TSimpleNameSyntax simpleName, CancellationToken cancellationToken); 46protected abstract ITypeSymbol DetermineArgumentType(SemanticModel semanticModel, TArgumentSyntax argument, CancellationToken cancellationToken); 51protected abstract bool IsInValueTypeConstraintContext(SemanticModel semanticModel, TExpressionSyntax expression, CancellationToken cancellationToken); 183SemanticModel semanticModel, 235SemanticModel semanticModel, 261SemanticModel semanticModel, 275var 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)
120var semanticModel = semanticDocument.SemanticModel; 261private bool GenerateStruct(TService service, SemanticModel semanticModel, CancellationToken cancellationToken) 336SemanticModel semanticModel, 375SemanticModel semanticModel,
GoToDefinition\AbstractGoToDefinitionSymbolService.cs (3)
20protected abstract int? GetTargetPositionIfControlFlow(SemanticModel semanticModel, SyntaxToken token); 23Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 65Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
GoToDefinition\IGoToDefinitionSymbolService.cs (2)
15Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken); 22Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken);
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, 385private TStatementSyntax CreateNullCheckStatement(SemanticModel semanticModel, SyntaxGenerator generator, IParameterSymbol parameter, TSimplifierOptions options) 408SemanticModel semanticModel, 454SemanticModel semanticModel,
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (3)
129SemanticModel semanticModel, 140SyntaxNode functionDeclaration, SemanticModel semanticModel, ISyntaxFactsService syntaxFacts, 180SemanticModel semanticModel,
InlineHints\AbstractInlineParameterNameHintsService.cs (1)
28SemanticModel semanticModel,
InlineHints\AbstractInlineTypeHintsService.cs (2)
24SemanticModel semanticModel, SyntaxNode node, 109SemanticModel semanticModel,
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (2)
427SemanticModel semanticModel, 573SemanticModel 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)
317SemanticModel semanticModel, 346SemanticModel semanticModel, 433SemanticModel semanticModel,
IntroduceVariable\AbstractIntroduceVariableService.cs (8)
266var semanticModel = semanticDocument.SemanticModel; 284var semanticModel = semanticDocument.SemanticModel; 303var originalSemanticModel = originalDocument.SemanticModel; 304var currentSemanticModel = currentDocument.SemanticModel; 315SemanticModel originalSemanticModel, 316SemanticModel currentSemanticModel, 407var semanticModel = document.SemanticModel; 437var 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)
80private readonly SemanticModel _semanticModel; 91SemanticModel semanticModel, 111protected abstract ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format); 118protected SemanticModel GetSemanticModel(SyntaxTree tree) 240var 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)
179var 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)
140SemanticModel linkedModel, 156SemanticModel semanticModel, 189protected virtual NullableFlowState GetNullabilityAnalysis(SemanticModel semanticModel, ISymbol symbol, SyntaxNode node, CancellationToken cancellationToken) => NullableFlowState.None; 192SolutionServices 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)
116CodeRefactoringContext context, SemanticModel semanticModel, SyntaxToken token, TextSpan replacementSpan, CancellationToken cancellationToken) 132private 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)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Shared\Extensions\ISymbolExtensions_2.cs (2)
183public static ImmutableArray<TaggedText> GetDocumentationParts(this ISymbol symbol, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formatter, CancellationToken cancellationToken) 233this 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\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)
678SemanticModel? 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)
183private static bool IsType<T>(INamedTypeSymbol type, SemanticModel semanticModel) 186private 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)
88protected abstract TExpression? GetSetterExpression(SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken); 91SemanticModel semanticModel, IMethodSymbol accessor, HashSet<string> fieldNames, HashSet<IFieldSymbol> result, CancellationToken cancellationToken); 94HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 224SemanticModel semanticModel, 256SemanticModel semanticModel, 275SemanticModel semanticModel, IMethodSymbol setMethod, HashSet<string> fieldNames, CancellationToken cancellationToken) 291SemanticModel semanticModel, 333var semanticModel = context.SemanticModel; 496SemanticModel semanticModel,
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
53var 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, 130var 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, 99SyntaxNode expr, SemanticModel semanticModel, bool isTopLevel, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
55var semanticModel = ifOperation.SemanticModel;
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)
149var semanticModel = context.SemanticModel; 318var semanticModel = context.SemanticModel; 346SemanticModel semanticModel, 370ISyntaxFacts 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)
46protected abstract ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken); 56SemanticModel semanticModel, 125SemanticModel semanticModel, 146SemanticModel semanticModel, 194SemanticModel semanticModel, 432SemanticModel 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); 52SemanticModel semanticModel,
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<TExpressionSyntax> 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); 155protected string GenerateNameForArgument(SemanticModel semanticModel, Argument<TExpressionSyntax> argument, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (2)
287var semanticModel = _document.SemanticModel; 293private static ITypeSymbol FixType(ITypeSymbol typeSymbol, SemanticModel semanticModel, IEnumerable<ITypeParameterSymbol> allTypeParameters)
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (2)
41var semanticModel = document.SemanticModel; 82SemanticModel semanticModel,
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
90var 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)
30protected abstract bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (3)
206var semanticModel = _document.SemanticModel; 262var semanticModel = _document.SemanticModel; 391private static IMethodSymbol FindContainingMethodSymbol(int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
31protected 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)
19SemanticModel model) 31public SemanticModel Model { get; } = model; 45SemanticModel 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)
121protected virtual SyntaxNode? TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel) => null; 348SemanticModel semanticModel, 385SemanticModel semanticModel, 444SemanticModel semanticModel, 931SemanticModel semanticModel, 936private readonly SemanticModel _semanticModel = semanticModel;
src\Analyzers\Core\CodeFixes\SimplifyBooleanExpression\SimplifyConditionalCodeFixProvider.cs (1)
59SyntaxNode 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)
103SemanticModel 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)
177var oldModel = oldDocument.GetSemanticModelAsync().Result; 178var 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 2761Protected 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)
19Private ReadOnly _semanticModel As SemanticModel 21Public 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)
872Public Function ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String 876Public Function ToMinimalDisplayParts(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) 1333Private Function ISymbol_ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String Implements ISymbol.ToMinimalDisplayString 1337Private 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 (93)
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)
43semanticModel As SemanticModel, 109Protected Overrides Function GetSetterExpression(semanticModel As SemanticModel, setMethod As IMethodSymbol, cancellationToken As CancellationToken) As ExpressionSyntax 142Protected 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)
44semanticModel As SemanticModel,
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 (9)
15Public Function LookupTypeRegardlessOfArity(semanticModel As SemanticModel, 30Public Function LookupName(semanticModel As SemanticModel, name As SyntaxToken, 42Public Function LookupName(semanticModel As SemanticModel, 72Public Function GetImportNamespacesInScope(semanticModel As SemanticModel, location As SyntaxNode) As ISet(Of INamespaceSymbol) 86Public Function GetAliasInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IAliasSymbol 96Public Function DetermineAccessibilityConstraint(semanticModel As SemanticModel, 168Public Iterator Function GetAliasSymbols(semanticModel As SemanticModel) As IEnumerable(Of IAliasSymbol) 185Public Function GenerateNameForExpression(semanticModel As SemanticModel, 230Private 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 (27)
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 271Public Function IsInsideNameOfExpression(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInsideNameOfExpression 279Public Function IsInExpressionTree(semanticModel As SemanticModel, node As SyntaxNode, expressionTypeOpt As INamedTypeSymbol, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInExpressionTree 283Public Function GenerateNameForExpression(semanticModel As SemanticModel, 291Public Function GetPreprocessingSymbol(model As SemanticModel, node As SyntaxNode) As IPreprocessingSymbol Implements ISemanticFacts.GetPreprocessingSymbol 307Private Shared Function CreatePreprocessingSymbol(model As SemanticModel, token As SyntaxToken) As IPreprocessingSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
504Public Function IsBindableToken(semanticModel As SemanticModel, token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsBindableToken
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)
55Protected 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)
33Protected Overrides Function GetSymbolTypeExpression(semanticModel As SemanticModel, node As MemberAccessExpressionSyntax, cancellationToken As CancellationToken) As SyntaxNode
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\VisualBasicGenerateConstructorService.vb (4)
39Protected Overrides Function GenerateNameForExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As String 44semanticModel As SemanticModel, 168Protected Overrides Function GetCurrentConstructor(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As IMethodSymbol 173Protected 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, 162Public 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)
16Public Function GenerateParameterNames(semanticModel As SemanticModel, 30Public Function GenerateParameterNames(semanticModel As SemanticModel, 42Public Function GenerateParameterNames(semanticModel As SemanticModel, 63Public Function GenerateParameterNames(semanticModel As SemanticModel, 85Public Function GenerateNameForArgument(semanticModel As SemanticModel, 92Private 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)
17Public Sub New(semanticModel As SemanticModel, cancellationToken As CancellationToken) 28Dim info = SemanticModel.GetTypeInfo(node, CancellationToken) 39Dim symbol = SemanticModel.GetSymbolInfo(unaryExpression.Operand, CancellationToken).GetAnySymbol() 108Dim typeSymbol = SemanticModel.GetTypeInfo(expressionType, CancellationToken).Type 249Dim info = SemanticModel.GetSymbolInfo(invocation, CancellationToken) 260Dim typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken) 279Dim expressionType = SemanticModel.GetTypeInfo(targetExpression, CancellationToken) 292Dim info = SemanticModel.GetSymbolInfo(creation.Type, CancellationToken) 333Dim info = SemanticModel.GetSymbolInfo(attribute, CancellationToken) 609Dim symbol = SemanticModel.GetDeclaredSymbol(name, CancellationToken) 627Dim propertySymbol = SemanticModel.GetDeclaredSymbol(propertySyntax) 782Private Function GetDeclaredMemberSymbolFromOriginalSemanticModel(currentSemanticModel As SemanticModel, declarationInCurrentTree As DeclarationStatementSyntax) As ISymbol 985SemanticModel.GetSymbolInfo(identifier.Identifier, CancellationToken).Symbol?.Kind = SymbolKind.Parameter Then 1003Dim right = SemanticModel.GetTypeInfo(initializer.Name, CancellationToken).Type 1008Return CreateResult(SemanticModel.GetTypeInfo(initializer.Expression, CancellationToken).Type) 1036Dim expressionAddMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expression).GetAllSymbols().OfType(Of IMethodSymbol) 1048Dim 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 (5)
EndConstructGeneration\EndConstructState.vb (3)
10Private ReadOnly _semanticModel As AsyncLazy(Of SemanticModel) 15Public Sub New(caretPosition As Integer, semanticModel As AsyncLazy(Of SemanticModel), syntaxTree As SyntaxTree, tokenToLeft As SyntaxToken, newLineCharacter As String) 31Public Function GetSemanticModelAsync(cancellationToken As CancellationToken) As Task(Of SemanticModel)
EndConstructGeneration\EndConstructStatementVisitor.vb (2)
28Private ReadOnly _semanticModel As SemanticModel 34semanticModel As SemanticModel,
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
Attributes\AttributeTests.vb (4)
2294Dim speculativeModel As SemanticModel = Nothing 2338Dim speculativeModel As SemanticModel = Nothing 2381Dim speculativeModel As SemanticModel = Nothing 2425Dim 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 (180)
AddImport\VisualBasicAddImportFeatureService.vb (6)
193semanticModel As SemanticModel, 219Protected Overrides Function GetImportNamespacesInScope(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISet(Of INamespaceSymbol) 223Protected Overrides Function GetDeconstructInfo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ITypeSymbol 228semanticModel As SemanticModel, 330semanticModel As SemanticModel, 355Protected Overrides Function IsAddMethodContext(node As SyntaxNode, semanticModel As SemanticModel) As Boolean
ChangeSignature\VisualBasicChangeSignatureService.vb (2)
203Private Shared Function TryGetDeclaredSymbol(semanticModel As SemanticModel, 523Private 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 (2)
46Protected Overrides Function GetReturnTypeChange(semanticModel As SemanticModel, declaration As SyntaxNode, cancellationToken As CancellationToken) As TextChange? 55Protected 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)
55semanticModel 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)
101Protected Overrides Function GetVariableUseSites(roots As IEnumerable(Of SyntaxNode), localOrParameter As ISymbol, model As SemanticModel, cancellationToken As CancellationToken) As IEnumerable(Of SyntaxNode) 624Protected Overrides Function GetDeclaredSymbol(model As SemanticModel, declaration As SyntaxNode, cancellationToken As CancellationToken) As ISymbol 696oldModel As SemanticModel, 697newModel As SemanticModel, 739oldModel As SemanticModel, 740newModel As SemanticModel, 883model As SemanticModel, 930Private Function GetParameterContainingMemberOrType(node As SyntaxNode, otherNode As SyntaxNode, model As SemanticModel, fromOtherMap As IReadOnlyDictionary(Of SyntaxNode, SyntaxNode), cancellationToken As CancellationToken) As ISymbol 987Friend Overrides Function GetLambdaExpressionSymbol(model As SemanticModel, lambdaExpression As SyntaxNode, cancellationToken As CancellationToken) As IMethodSymbol 998Friend Overrides Function QueryClauseLambdasTypeEquivalent(oldModel As SemanticModel, oldNode As SyntaxNode, newModel As SemanticModel, newNode As SyntaxNode, cancellationToken As CancellationToken) As Boolean 2275oldModel As SemanticModel, 2278newModel As SemanticModel, 2313oldModel As SemanticModel, 2316newModel As SemanticModel,
ExtractMethod\Extensions.vb (1)
117Public Function IsArgumentForByRefParameter(node As SyntaxNode, model As SemanticModel, cancellationToken As CancellationToken) As Boolean
ExtractMethod\VisualBasicMethodExtractor.PostProcessor.vb (2)
14Private ReadOnly _semanticModel As SemanticModel 17Public Sub New(semanticModel As SemanticModel, contextPosition As Integer)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.SingleStatementCodeGenerator.vb (1)
27Dim semanticModel = CType(SemanticDocument.SemanticModel, SemanticModel)
ExtractMethod\VisualBasicSelectionValidator.Validator.vb (2)
12Public Shared Function Check(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean 22Private Shared Function CheckExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean
ExtractMethod\VisualBasicSelectionValidator.vb (3)
95semanticModel As SemanticModel, 168semanticModel As SemanticModel, 211semanticModel 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)
33Protected Overrides Function GenerateParameterNames(semanticModel As SemanticModel, arguments As IList(Of ArgumentSyntax), cancellationToken As CancellationToken) As IList(Of ParameterName) 68Protected Overrides Function IsInValueTypeConstraintContext(semanticModel As SemanticModel, expression As Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax, cancellationToken As System.Threading.CancellationToken) As Boolean 352Private Shared Function GetMemberGroupIfPresent(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IMethodSymbol 370semanticModel As SemanticModel, 387Protected Overrides Function DetermineTypeToGenerateIn(semanticModel As SemanticModel, 397Protected Overrides Function GetAccessibility(state As State, semanticModel As SemanticModel, intoNamespace As Boolean, cancellationToken As CancellationToken) As Accessibility 412Protected Overrides Function DetermineArgumentType(semanticModel As SemanticModel, argument As ArgumentSyntax, cancellationToken As CancellationToken) As ITypeSymbol 672semanticModel As SemanticModel, 700semanticModel 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\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)
43semanticModel As SemanticModel, 109Protected Overrides Function GetSetterExpression(semanticModel As SemanticModel, setMethod As IMethodSymbol, cancellationToken As CancellationToken) As ExpressionSyntax 142Protected 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)
44semanticModel As SemanticModel,
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)
55Protected 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)
33Protected Overrides Function GetSymbolTypeExpression(semanticModel As SemanticModel, node As MemberAccessExpressionSyntax, cancellationToken As CancellationToken) As SyntaxNode
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\VisualBasicGenerateConstructorService.vb (4)
39Protected Overrides Function GenerateNameForExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As String 44semanticModel As SemanticModel, 168Protected Overrides Function GetCurrentConstructor(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As IMethodSymbol 173Protected 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)
6059Dim semanticModel As SemanticModel = comp.GetSemanticModel(tree) 6068Dim 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 (239)
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)
24semanticModel As SemanticModel,
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\LocalConflictVisitor.vb (2)
14Private ReadOnly _semanticModel As SemanticModel 17Public Sub New(tokenBeingRenamed As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken)
Rename\VisualBasicRenameRewriterLanguageService.vb (5)
47Private ReadOnly _semanticModel As SemanticModel 91Private _speculativeModel As SemanticModel 909semanticModel As SemanticModel, 1027Public 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)
17Private Shared ReadOnly s_simplifyCast As Func(Of CastExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyCast 29semanticModel As SemanticModel, 41Private Shared ReadOnly s_simplifyPredefinedCast As Func(Of PredefinedCastExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyPredefinedCast 45semanticModel 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 (9)
15Public Function LookupTypeRegardlessOfArity(semanticModel As SemanticModel, 30Public Function LookupName(semanticModel As SemanticModel, name As SyntaxToken, 42Public Function LookupName(semanticModel As SemanticModel, 72Public Function GetImportNamespacesInScope(semanticModel As SemanticModel, location As SyntaxNode) As ISet(Of INamespaceSymbol) 86Public Function GetAliasInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IAliasSymbol 96Public Function DetermineAccessibilityConstraint(semanticModel As SemanticModel, 168Public Iterator Function GetAliasSymbols(semanticModel As SemanticModel) As IEnumerable(Of IAliasSymbol) 185Public Function GenerateNameForExpression(semanticModel As SemanticModel, 230Private 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 (27)
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 271Public Function IsInsideNameOfExpression(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInsideNameOfExpression 279Public Function IsInExpressionTree(semanticModel As SemanticModel, node As SyntaxNode, expressionTypeOpt As INamedTypeSymbol, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInExpressionTree 283Public Function GenerateNameForExpression(semanticModel As SemanticModel, 291Public Function GetPreprocessingSymbol(model As SemanticModel, node As SyntaxNode) As IPreprocessingSymbol Implements ISemanticFacts.GetPreprocessingSymbol 307Private Shared Function CreatePreprocessingSymbol(model As SemanticModel, token As SyntaxToken) As IPreprocessingSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
504Public Function IsBindableToken(semanticModel As SemanticModel, token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsBindableToken
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, 162Public 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)
16Public Function GenerateParameterNames(semanticModel As SemanticModel, 30Public Function GenerateParameterNames(semanticModel As SemanticModel, 42Public Function GenerateParameterNames(semanticModel As SemanticModel, 63Public Function GenerateParameterNames(semanticModel As SemanticModel, 85Public Function GenerateNameForArgument(semanticModel As SemanticModel, 92Private 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)
17Public Sub New(semanticModel As SemanticModel, cancellationToken As CancellationToken) 28Dim info = SemanticModel.GetTypeInfo(node, CancellationToken) 39Dim symbol = SemanticModel.GetSymbolInfo(unaryExpression.Operand, CancellationToken).GetAnySymbol() 108Dim typeSymbol = SemanticModel.GetTypeInfo(expressionType, CancellationToken).Type 249Dim info = SemanticModel.GetSymbolInfo(invocation, CancellationToken) 260Dim typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken) 279Dim expressionType = SemanticModel.GetTypeInfo(targetExpression, CancellationToken) 292Dim info = SemanticModel.GetSymbolInfo(creation.Type, CancellationToken) 333Dim info = SemanticModel.GetSymbolInfo(attribute, CancellationToken) 609Dim symbol = SemanticModel.GetDeclaredSymbol(name, CancellationToken) 627Dim propertySymbol = SemanticModel.GetDeclaredSymbol(propertySyntax) 782Private Function GetDeclaredMemberSymbolFromOriginalSemanticModel(currentSemanticModel As SemanticModel, declarationInCurrentTree As DeclarationStatementSyntax) As ISymbol 985SemanticModel.GetSymbolInfo(identifier.Identifier, CancellationToken).Symbol?.Kind = SymbolKind.Parameter Then 1003Dim right = SemanticModel.GetTypeInfo(initializer.Name, CancellationToken).Type 1008Return CreateResult(SemanticModel.GetTypeInfo(initializer.Expression, CancellationToken).Type) 1036Dim expressionAddMethodSymbols = SemanticModel.GetCollectionInitializerSymbolInfo(expression).GetAllSymbols().OfType(Of IMethodSymbol) 1048Dim 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 (391)
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)
104public async Task<AnalysisResultPair?> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken)
Diagnostics\Extensions.cs (2)
355var model = await ((Document)documentAnalysisScope.TextDocument).GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 427var 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)
295var model = await newDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 483var 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 (9)
23/// Obsolete. Use <see cref="FindSymbolAtPositionAsync(SemanticModel, int, Workspace, CancellationToken)"/>. 27SemanticModel semanticModel, 43SemanticModel semanticModel, 61SemanticModel semanticModel, 77SemanticModel semanticModel, 94SemanticModel semanticModel, 111SemanticModel semanticModel, 131var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 221var 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\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)
354SemanticModel? newDocumentSemanticModel = null; 652private ImmutableArray<ISymbol> GetSymbolsInNewSolution(Document newDocument, SemanticModel newDocumentSemanticModel, RenameActionAnnotation conflictAnnotation, SyntaxNodeOrToken tokenOrNode) 791var semanticModel = await document.GetRequiredSemanticModelAsync(_cancellationToken).ConfigureAwait(false);
Rename\IRenameRewriterLanguageService.cs (2)
87SemanticModel semanticModel, 126public 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)
30protected abstract SemanticModel? TryGetSpeculativeSemanticModelWorker(SemanticModel previousSemanticModel, SyntaxNode previousBodyNode, SyntaxNode currentBodyNode); 43public 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)
19public static SemanticMap GetSemanticMap(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 71this 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)
636public static bool IsAwaitableNonDynamic([NotNullWhen(true)] this ISymbol? symbol, SemanticModel semanticModel, int position)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (7)
15public static bool AreEquivalent(SemanticModel semanticModel, SyntaxNode node1, SyntaxNode node2) 19SemanticModel semanticModel1, 20SemanticModel semanticModel2, 49SemanticModel semanticModel1, 50SemanticModel semanticModel2, 130SemanticModel semanticModel1, 131SemanticModel semanticModel2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (18)
33public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 36public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode statementOrExpression) 39public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 42public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode statement) 45public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 48public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken) 54public static IOperation GetRequiredOperation(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 60public static ISymbol GetRequiredEnclosingSymbol(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 66public static TSymbol? GetEnclosingSymbol<TSymbol>(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 82public static ISymbol GetEnclosingNamedTypeOrAssembly(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 88public static INamedTypeSymbol? GetEnclosingNamedType(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 91public static INamespaceSymbol? GetEnclosingNamespace(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 94public static SemanticModel GetOriginalSemanticModel(this SemanticModel semanticModel) 108this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null) 137public static string GenerateNameFromType(this SemanticModel semanticModel, ITypeSymbol type, ISyntaxFacts syntaxFacts, bool capitalize) 168private static bool ShouldPluralize(this SemanticModel semanticModel, ITypeSymbol type) 219this SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (2)
64SemanticModel? semanticModel, 66Func<SemanticModel?, SyntaxToken, bool> predicate,
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 (25)
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); 122IPreprocessingSymbol? GetPreprocessingSymbol(SemanticModel semanticModel, SyntaxNode node);
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\Services\SyntaxFacts\ISyntaxFacts.cs (1)
384bool IsBindableToken(SemanticModel? semanticModel, SyntaxToken token);
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)
728var 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); 976SemanticModel speculativeSemanticModel) 1030private bool IsReceiverNonUniquePossibleValueTypeParam(TExpressionSyntax invocation, SemanticModel semanticModel) 1048private 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)
64public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 67public 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)
14SemanticModel semanticModel, 48public SemanticModel SemanticModel { get; } = 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)
345SemanticModel semanticModel, 396SemanticModel semanticModel, 458SemanticModel semanticModel, 468this 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\InitializeParameter\AbstractInitializerParameterService.cs (3)
38SemanticModel semanticModel, 119var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 208var semanticModel = compilation.GetSemanticModel(group.Key);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\IInitializeParameterService.cs (1)
26SemanticModel 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 (31)
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) 257public IPreprocessingSymbol GetPreprocessingSymbol(SemanticModel semanticModel, SyntaxNode node)
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)
41protected abstract SemanticModel GetSpeculativeSemanticModel(ref SyntaxNode nodeToSpeculate, SemanticModel originalSemanticModel, SyntaxNode originalNode); 51public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 52public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 69var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 165var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 191var semanticModelForReduce = semanticModel; 291var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 312protected 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\NullableHelpers.cs (2)
25SemanticModel semanticModel, 53SemanticModel semanticModel,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (3)
13internal sealed class SemanticDocument(Document document, SourceText text, SyntaxNode root, SemanticModel semanticModel) 16public readonly SemanticModel SemanticModel = semanticModel; 22var 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 (2)
21private ImmutableArray<(DocumentId documentId, SemanticModel semanticModel)> _activeSemanticModels = []; 24DocumentId documentId, SemanticModel semanticModel)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (6)
NetCoreTests.cs (6)
92var semanticModel = await document.GetSemanticModelAsync(); 117var semanticModel = await document.GetSemanticModelAsync(); 157var semanticModel = await document.GetSemanticModelAsync(); 217var semanticModel = await document.GetSemanticModelAsync(); 341var semanticModel = await document.GetSemanticModelAsync(); 508var 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(); 3505var 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 (2)
LoggerMessageGenerator.Parser.cs (2)
78SemanticModel sm = _compilation.GetSemanticModel(syntaxTree); 627private (string? loggerField, bool multipleLoggerFields) FindLoggerField(SemanticModel sm, TypeDeclarationSyntax classDec, ITypeSymbol loggerSymbol)
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.MetadataExtractor (6)
src\Generators\Microsoft.Gen.ComplianceReports\Parser.cs (2)
38SemanticModel? sm = null; 105SemanticModel sm)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (4)
70SemanticModel? semanticModel = null; 278SemanticModel semanticModel) 368SemanticModel semanticModel, 398SemanticModel semanticModel)
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.Maui.Controls.BindingSourceGen (3)
BindingSourceGenerator.cs (3)
166 private static Result<ITypeSymbol> GetLambdaReturnType(LambdaExpressionSyntax lambda, SemanticModel semanticModel, CancellationToken t) 182 private static Result<ITypeSymbol> GetLambdaParameterType(LambdaExpressionSyntax lambda, SemanticModel semanticModel, CancellationToken t) 204 private static SetterOptions DeriveSetterOptions(ExpressionSyntax? lambdaBodyExpression, SemanticModel semanticModel, bool enabledNullable)
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 (8)
CallHierarchy\CallHierarchyCommandHandler.cs (1)
88var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
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; 513var symbol = SemanticModel.GetSymbolInfo(identifierName).Symbol; 564var type = SemanticModel.GetTypeInfo(typeOfExpression.Type).Type; 604public static string Generate(MethodDeclarationSyntax methodDeclaration, SemanticModel semanticModel)
LanguageService\CSharpHelpContextService.cs (2)
91private string? TryGetText(SyntaxToken token, SemanticModel semanticModel, Document document, CancellationToken cancellationToken) 153SyntaxToken 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 (2)
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)
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.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\ImplementITypedDataObjectInAdditionToIDataObject\ImplementITypedDataObjectInAdditionToIDataObjectAnalyzer.cs (1)
36var semanticModel = context.SemanticModel;
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))