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)
37Inherits SemanticModel
7215 references to SemanticModel
Microsoft.CodeAnalysis (277)
Compilation\Compilation.cs (6)
301/// Gets a new <see cref="SemanticModel"/> for the specified syntax tree. 307public SemanticModel GetSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility = false) 311/// Gets a <see cref="SemanticModel"/> for the given <paramref name="syntaxTree"/>. 318protected abstract SemanticModel CommonGetSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility); 321/// Creates a new <see cref="SemanticModel"/> for the given <paramref name="syntaxTree"/>. 328internal abstract SemanticModel CreateSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility);
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)
258public SemanticModel? ParentModel 267protected abstract SemanticModel? ParentModelCore 276internal abstract SemanticModel ContainingPublicModelOrSelf
Compilation\SemanticModelProvider.cs (2)
14/// Gets a <see cref="SemanticModel"/> for the given <paramref name="tree"/> that belongs to the given <paramref name="compilation"/>. 16public abstract SemanticModel GetSemanticModel(SyntaxTree tree, Compilation compilation, bool ignoreAccessibility = false);
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)
DiagnosticAnalyzer\AnalysisContextInfo.cs (1)
27public AnalysisContextInfo(SemanticModel model) :
DiagnosticAnalyzer\AnalyzerDriver.cs (11)
930private SemanticModel GetOrCreateSemanticModel(SyntaxTree tree) 933protected SemanticModel GetOrCreateSemanticModel(SyntaxTree tree, Compilation compilation) 1187var model = compilation.GetSemanticModel(location.SourceTree); 1249var model = compilation.GetSemanticModel(tree); 1795var model = compilation.GetSemanticModel(syntaxReference.SyntaxTree); 1812var semanticModel = GetOrCreateSemanticModel(completedEvent.CompilationUnit, completedEvent.Compilation); 2436SemanticModel semanticModel, 2453private static void ComputeDeclarationsInNode(SemanticModel semanticModel, ISymbol declaredSymbol, SyntaxNode declaringReferenceSyntax, SyntaxNode topmostNodeForAnalysis, ArrayBuilder<DeclarationInfo> builder, CancellationToken cancellationToken) 2482var semanticModel = symbolEvent.SemanticModelWithCachedBoundNodes ?? 2718SemanticModel semanticModel, 2794SemanticModel semanticModel,
DiagnosticAnalyzer\AnalyzerExecutor.cs (14)
45private readonly Func<SyntaxTree, SemanticModel>? _getSemanticModel; 116Func<SyntaxTree, SemanticModel> getSemanticModel, 184Func<SyntaxTree, SemanticModel>? getSemanticModel, 555SemanticModel semanticModel, 668SemanticModel semanticModel, 691SemanticModel semanticModel, 719SemanticModel semanticModel, 755SemanticModel semanticModel, 773SemanticModel semanticModel, 891SemanticModel semanticModel, 967SemanticModel model, 992SemanticModel model, 1057SemanticModel model, 1080SemanticModel model,
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (5)
34public override SemanticModel GetSemanticModel(SyntaxTree tree, Compilation compilation, bool ignoreAccessibility = false) 53private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _semanticModelsMap; 57private readonly Func<SyntaxTree, SemanticModel> _createSemanticModel; 62_semanticModelsMap = new ConcurrentDictionary<SyntaxTree, SemanticModel>(); 66public SemanticModel GetSemanticModel(SyntaxTree tree, bool ignoreAccessibility)
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (8)
192private void VerifyModel(SemanticModel model) 505public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, TextSpan? filterSpan, CancellationToken cancellationToken) 520public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 535public Task<AnalysisResult> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, CancellationToken cancellationToken) 550public Task<AnalysisResult> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 558private async Task<AnalysisResult> GetAnalysisResultCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 565private async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 987var mappedModel = compilation.GetSemanticModel(analysisScope.FilterFileOpt!.Value.SourceTree!);
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
34var semanticModel = _compilation.GetSemanticModel(context.Tree);
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (32)
63/// which will operate on the <see cref="SemanticModel"/> of the document. A semantic model action 66/// <param name="action">Action to be executed for a document's <see cref="SemanticModel"/>.</param> 337/// which will operate on the <see cref="SemanticModel"/> of the document. A semantic model action 340/// <param name="action">Action to be executed for a document's <see cref="SemanticModel"/>.</param> 627/// 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. 631private readonly SemanticModel _semanticModel; 638/// <see cref="CodeAnalysis.SemanticModel"/> that is the subject of the analysis. 640public SemanticModel SemanticModel { get { return _semanticModel; } } 658/// Indicates if the underlying <see cref="SemanticModel.SyntaxTree"/> is generated code. 663public SemanticModelAnalysisContext(SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 669SemanticModel semanticModel, 687/// Report a <see cref="Diagnostic"/> about a <see cref="CodeAnalysis.SemanticModel"/>. 924private readonly SemanticModel _semanticModel; 939/// <see cref="CodeAnalysis.SemanticModel"/> that can provide semantic information about the <see cref="SyntaxNode"/>s in the code block. 941public SemanticModel SemanticModel { get { return _semanticModel; } } 959protected CodeBlockStartAnalysisContext(SyntaxNode codeBlock, ISymbol owningSymbol, SemanticModel semanticModel, AnalyzerOptions options, CancellationToken cancellationToken) 967SemanticModel semanticModel, 1017private readonly SemanticModel _semanticModel; 1034/// <see cref="CodeAnalysis.SemanticModel"/> that can provide semantic information about the <see cref="SyntaxNode"/>s in the code block. 1036public SemanticModel SemanticModel { get { return _semanticModel; } } 1054public CodeBlockAnalysisContext(SyntaxNode codeBlock, ISymbol owningSymbol, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1062SemanticModel semanticModel, 1482private readonly SemanticModel _semanticModel; 1499/// <see cref="CodeAnalysis.SemanticModel"/> that can provide semantic information about the <see cref="SyntaxNode"/>. 1501public SemanticModel SemanticModel => _semanticModel; 1524public SyntaxNodeAnalysisContext(SyntaxNode node, ISymbol? containingSymbol, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1530public SyntaxNodeAnalysisContext(SyntaxNode node, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1538SemanticModel semanticModel, 1675private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 1710Func<SyntaxTree, SemanticModel> getSemanticModel, 1751/// Gets a <see cref="SemanticModel"/> for the given <see cref="SyntaxTree"/>, which is shared across all analyzers. 1753public SemanticModel GetSemanticModel(SyntaxTree syntaxTree) => _getSemanticModel(syntaxTree);
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (1)
297SemanticModel semanticModel,
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
159var model = _compilation.GetSemanticModel(location.SourceTree);
DiagnosticAnalyzer\SymbolDeclaredCompilationEvent.cs (2)
19public SymbolDeclaredCompilationEvent(Compilation compilation, ISymbol symbol, SemanticModel? semanticModelWithCachedBoundNodes = null) 28public SemanticModel? SemanticModelWithCachedBoundNodes { get; }
Generated\Operations.Generated.cs (131)
3628internal BlockOperation(ImmutableArray<IOperation> operations, ImmutableArray<ILocalSymbol> locals, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 3685internal VariableDeclarationGroupOperation(ImmutableArray<IVariableDeclarationOperation> declarations, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 3740internal SwitchOperation(ImmutableArray<ILocalSymbol> locals, IOperation value, ImmutableArray<ISwitchCaseOperation> cases, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 3810protected BaseLoopOperation(IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 3826internal 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) 3916internal 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) 4008internal 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) 4120internal WhileLoopOperation(IOperation? condition, bool conditionIsTop, bool conditionIsUntil, IOperation? ignoredCondition, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4144internal LabeledOperation(ILabelSymbol label, IOperation? operation, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4197internal BranchOperation(ILabelSymbol target, BranchKind branchKind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4217internal EmptyOperation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4231internal ReturnOperation(IOperation? returnedValue, OperationKind kind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4283internal LockOperation(IOperation lockedValue, IOperation body, ILocalSymbol? lockTakenSymbol, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4347internal TryOperation(IBlockOperation body, ImmutableArray<ICatchClauseOperation> catches, IBlockOperation? @finally, ILabelSymbol? exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4426internal UsingOperation(IOperation resources, IOperation body, ImmutableArray<ILocalSymbol> locals, bool isAsynchronous, DisposeOperationInfo disposeInfo, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4494internal ExpressionStatementOperation(IOperation operation, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4545internal LocalFunctionOperation(IMethodSymbol symbol, IBlockOperation? body, IBlockOperation? ignoredBody, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4609internal StopOperation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4623internal EndOperation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4637internal RaiseEventOperation(IEventReferenceOperation eventReference, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4703internal LiteralOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 4721internal ConversionOperation(IOperation operand, IConvertibleConversion conversion, bool isTryCast, bool isChecked, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 4781internal InvocationOperation(IMethodSymbol targetMethod, ITypeSymbol? constrainedToType, IOperation? instance, bool isVirtual, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 4854internal ArrayElementReferenceOperation(IOperation arrayReference, ImmutableArray<IOperation> indices, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 4921internal LocalReferenceOperation(ILocalSymbol local, bool isDeclaration, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 4943internal ParameterReferenceOperation(IParameterSymbol parameter, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 4962protected BaseMemberReferenceOperation(IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4972internal FieldReferenceOperation(IFieldSymbol field, bool isDeclaration, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5027internal MethodReferenceOperation(IMethodSymbol method, ITypeSymbol? constrainedToType, bool isVirtual, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5083internal PropertyReferenceOperation(IPropertySymbol property, ITypeSymbol? constrainedToType, ImmutableArray<IArgumentOperation> arguments, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5152internal EventReferenceOperation(IEventSymbol @event, ITypeSymbol? constrainedToType, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5206internal UnaryOperation(UnaryOperatorKind operatorKind, IOperation operand, bool isLifted, bool isChecked, IMethodSymbol? operatorMethod, ITypeSymbol? constrainedToType, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5269internal 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) 5347internal ConditionalOperation(IOperation condition, IOperation whenTrue, IOperation? whenFalse, bool isRef, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5424internal CoalesceOperation(IOperation value, IOperation whenNull, IConvertibleConversion valueConversion, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5491internal AnonymousFunctionOperation(IMethodSymbol symbol, IBlockOperation body, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 5544internal ObjectCreationOperation(IMethodSymbol? constructor, IObjectOrCollectionInitializerOperation? initializer, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5614internal TypeParameterObjectCreationOperation(IObjectOrCollectionInitializerOperation? initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5666internal ArrayCreationOperation(ImmutableArray<IOperation> dimensionSizes, IArrayInitializerOperation? initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5733internal InstanceReferenceOperation(InstanceReferenceKind referenceKind, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5752internal IsTypeOperation(IOperation valueOperand, ITypeSymbol typeOperand, bool isNegated, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5808internal AwaitOperation(IOperation operation, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5860protected BaseAssignmentOperation(IOperation target, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 5871internal SimpleAssignmentOperation(bool isRef, IOperation target, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5933internal 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) 6008internal ParenthesizedOperation(IOperation operand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 6061internal EventAssignmentOperation(IOperation eventReference, IOperation handlerValue, bool adds, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6126internal ConditionalAccessOperation(IOperation operation, IOperation whenNotNull, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6189internal ConditionalAccessInstanceOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6206internal InterpolatedStringOperation(ImmutableArray<IInterpolatedStringContentOperation> parts, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 6263internal AnonymousObjectCreationOperation(ImmutableArray<IOperation> initializers, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6319internal ObjectOrCollectionInitializerOperation(ImmutableArray<IOperation> initializers, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6375internal MemberInitializerOperation(IOperation initializedMember, IObjectOrCollectionInitializerOperation initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6438internal NameOfOperation(IOperation argument, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 6491internal TupleOperation(ImmutableArray<IOperation> elements, ITypeSymbol? naturalType, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6549internal DynamicMemberReferenceOperation(IOperation? instance, string memberName, ImmutableArray<ITypeSymbol> typeArguments, ITypeSymbol? containingType, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6607internal TranslatedQueryOperation(IOperation operation, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6659internal DelegateCreationOperation(IOperation target, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6711internal DefaultValueOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 6729internal TypeOfOperation(ITypeSymbol typeOperand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6748internal SizeOfOperation(ITypeSymbol typeOperand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 6768internal AddressOfOperation(IOperation reference, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6820internal IsPatternOperation(IOperation value, IPatternOperation pattern, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6883internal IncrementOrDecrementOperation(bool isPostfix, bool isLifted, bool isChecked, IOperation target, IMethodSymbol? operatorMethod, ITypeSymbol? constrainedToType, OperationKind kind, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6946internal ThrowOperation(IOperation? exception, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6998internal DeconstructionAssignmentOperation(IOperation target, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7057internal DeclarationExpressionOperation(IOperation expression, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7109internal OmittedArgumentOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 7126protected BaseSymbolInitializerOperation(ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7137internal FieldInitializerOperation(ImmutableArray<IFieldSymbol> initializedFields, ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7188internal VariableInitializerOperation(ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7235internal PropertyInitializerOperation(ImmutableArray<IPropertySymbol> initializedProperties, ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7286internal ParameterInitializerOperation(IParameterSymbol parameter, ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7337internal ArrayInitializerOperation(ImmutableArray<IOperation> elementValues, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7392internal VariableDeclaratorOperation(ILocalSymbol symbol, IVariableInitializerOperation? initializer, ImmutableArray<IOperation> ignoredArguments, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7460internal VariableDeclarationOperation(ImmutableArray<IVariableDeclaratorOperation> declarators, IVariableInitializerOperation? initializer, ImmutableArray<IOperation> ignoredDimensions, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7541internal ArgumentOperation(ArgumentKind argumentKind, IParameterSymbol? parameter, IOperation value, IConvertibleConversion inConversion, IConvertibleConversion outConversion, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7602internal CatchClauseOperation(IOperation? exceptionDeclarationOrExpression, ITypeSymbol exceptionType, ImmutableArray<ILocalSymbol> locals, IOperation? filter, IBlockOperation handler, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7679internal SwitchCaseOperation(ImmutableArray<ICaseClauseOperation> clauses, ImmutableArray<IOperation> body, ImmutableArray<ILocalSymbol> locals, IOperation? condition, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7753protected BaseCaseClauseOperation(ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7763internal DefaultCaseClauseOperation(ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7777internal PatternCaseClauseOperation(ILabelSymbol label, IPatternOperation pattern, IOperation? guard, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7840internal RangeCaseClauseOperation(IOperation minimumValue, IOperation maximumValue, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7902internal RelationalCaseClauseOperation(IOperation value, BinaryOperatorKind relation, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7955internal SingleValueCaseClauseOperation(IOperation value, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8006protected BaseInterpolatedStringContentOperation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8011internal InterpolatedStringTextOperation(IOperation text, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8062internal InterpolationOperation(IOperation expression, IOperation? alignment, IOperation? formatString, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8135protected BasePatternOperation(ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8146internal ConstantPatternOperation(IOperation value, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8197internal DeclarationPatternOperation(ITypeSymbol? matchedType, bool matchesNull, ISymbol? declaredSymbol, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8219internal TupleBinaryOperation(BinaryOperatorKind operatorKind, IOperation leftOperand, IOperation rightOperand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8284protected BaseMethodBodyBaseOperation(IBlockOperation? blockBody, IBlockOperation? expressionBody, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8295internal MethodBodyOperation(IBlockOperation? blockBody, IBlockOperation? expressionBody, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8351internal ConstructorBodyOperation(ImmutableArray<ILocalSymbol> locals, IOperation? initializer, IBlockOperation? blockBody, IBlockOperation? expressionBody, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8422internal DiscardOperation(IDiscardSymbol discardSymbol, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8441internal FlowCaptureOperation(CaptureId id, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8494internal FlowCaptureReferenceOperation(CaptureId id, bool isInitialization, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 8516internal IsNullOperation(IOperation operand, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 8569internal CaughtExceptionOperation(SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8586internal StaticLocalInitializationSemaphoreOperation(ILocalSymbol local, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8605internal CoalesceAssignmentOperation(IOperation target, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8664internal RangeOperation(IOperation? leftOperand, IOperation? rightOperand, bool isLifted, IMethodSymbol? method, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 8731internal ReDimOperation(ImmutableArray<IReDimClauseOperation> clauses, bool preserve, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8788internal ReDimClauseOperation(IOperation operand, ImmutableArray<IOperation> dimensionSizes, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8854internal RecursivePatternOperation(ITypeSymbol matchedType, ISymbol? deconstructSymbol, ImmutableArray<IPatternOperation> deconstructionSubpatterns, ImmutableArray<IPropertySubpatternOperation> propertySubpatterns, ISymbol? declaredSymbol, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8930internal DiscardPatternOperation(ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8944internal SwitchExpressionOperation(IOperation value, ImmutableArray<ISwitchExpressionArmOperation> arms, bool isExhaustive, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9013internal SwitchExpressionArmOperation(IPatternOperation pattern, IOperation? guard, IOperation value, ImmutableArray<ILocalSymbol> locals, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9088internal PropertySubpatternOperation(IOperation member, IPatternOperation pattern, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9150internal AggregateQueryOperation(IOperation group, IOperation aggregation, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9213internal FixedOperation(ImmutableArray<ILocalSymbol> locals, IVariableDeclarationGroupOperation variables, IOperation body, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9277internal NoPiaObjectCreationOperation(IObjectOrCollectionInitializerOperation? initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9329internal PlaceholderOperation(PlaceholderKind placeholderKind, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9348internal WithStatementOperation(IOperation body, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9410internal UsingDeclarationOperation(IVariableDeclarationGroupOperation declarationGroup, bool isAsynchronous, DisposeOperationInfo disposeInfo, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9465internal NegatedPatternOperation(IPatternOperation pattern, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9516internal BinaryPatternOperation(BinaryOperatorKind operatorKind, IPatternOperation leftPattern, IPatternOperation rightPattern, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9580internal TypePatternOperation(ITypeSymbol matchedType, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9598internal RelationalPatternOperation(BinaryOperatorKind operatorKind, IOperation value, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9651internal WithOperation(IOperation operand, IMethodSymbol? cloneMethod, IObjectOrCollectionInitializerOperation initializer, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9716internal InterpolatedStringHandlerCreationOperation(IOperation handlerCreation, bool handlerCreationHasSuccessParameter, bool handlerAppendCallsReturnBool, IOperation content, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9783internal InterpolatedStringAdditionOperation(IOperation left, IOperation right, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9845internal InterpolatedStringAppendOperation(IOperation appendCall, OperationKind kind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9897internal InterpolatedStringHandlerArgumentPlaceholderOperation(int argumentIndex, InterpolatedStringArgumentPlaceholderKind placeholderKind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9917internal FunctionPointerInvocationOperation(IOperation target, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9984internal ListPatternOperation(ISymbol? lengthSymbol, ISymbol? indexerSymbol, ImmutableArray<IPatternOperation> patterns, ISymbol? declaredSymbol, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 10045internal SlicePatternOperation(ISymbol? sliceSymbol, IPatternOperation? pattern, ITypeSymbol inputType, ITypeSymbol narrowedType, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 10098internal ImplicitIndexerReferenceOperation(IOperation instance, IOperation argument, ISymbol lengthSymbol, ISymbol indexerSymbol, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 10165internal Utf8StringOperation(string value, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 10184internal AttributeOperation(IOperation operation, 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)
22private readonly SemanticModel? _owningSemanticModelOpt; 28protected Operation(SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 124SemanticModel? IOperation.SemanticModel => _owningSemanticModelOpt?.ContainingPublicModelOrSelf; 129/// is the semantic model on which <see cref="SemanticModel.GetOperation(SyntaxNode, CancellationToken)"/> was invoked 132internal 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)
223private readonly Lazy<SemanticModel>? _semanticModel; 225internal GeneratorSyntaxContext(SyntaxNode node, Lazy<SemanticModel>? semanticModel, ISyntaxHelper syntaxHelper) 238/// The <see cref="CodeAnalysis.SemanticModel" /> that can be queried to obtain information about <see cref="Node"/>. 240public SemanticModel SemanticModel => _semanticModel!.Value;
SourceGeneration\GeneratorSyntaxWalker.cs (2)
15private Lazy<SemanticModel>? _semanticModel; 25public 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;
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (2)
21protected readonly SemanticModel semanticModelOpt; 31SemanticModel semanticModelOpt,
Symbols\ISymbol.cs (2)
258SemanticModel semanticModel, 273SemanticModel semanticModel,
Symbols\ITypeSymbol.cs (2)
162SemanticModel semanticModel, 178SemanticModel semanticModel,
Microsoft.CodeAnalysis.CodeStyle (142)
AbstractForEachCastDiagnosticAnalyzer.cs (2)
41protected abstract (CommonConversion conversion, ITypeSymbol? collectionElementType) GetForEachInfo(SemanticModel semanticModel, TForEachStatementSyntax node); 61var semanticModel = context.SemanticModel;
AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
34protected abstract bool IsWrittenTo(SemanticModel semanticModel, TThisExpression expression, CancellationToken cancellationToken);
AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
91private bool IsFixSupported(SemanticModel semanticModel, TNamespaceSyntax namespaceDeclaration, CancellationToken cancellationToken) 168protected bool ContainsPartialTypeWithMultipleDeclarations(TNamespaceSyntax namespaceDeclaration, SemanticModel semanticModel)
AbstractObjectCreationExpressionAnalyzer.cs (2)
27protected SemanticModel _semanticModel; 41SemanticModel semanticModel,
AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
76public void AnalyzeAssemblyOrModuleAttribute(SyntaxNode attributeSyntax, SemanticModel model, Action<Diagnostic> reportDiagnostic, CancellationToken cancellationToken)
AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (2)
32protected abstract bool IsUnnecessaryCast(SemanticModel model, TCastExpression node, CancellationToken cancellationToken); 53private Diagnostic? TryRemoveCastExpression(SemanticModel model, TCastExpression node, CancellationToken cancellationToken)
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
44TParenthesizedExpressionSyntax parenthesizedExpression, SemanticModel semanticModel, CancellationToken cancellationToken,
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (3)
83SemanticModel semanticModel, 390SemanticModel semanticModel, 731SemanticModel semanticModel,
AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
541SemanticModel lazyModel = null;
AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
52protected abstract CommonConversion GetConversion(SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken); 73var semanticModel = context.SemanticModel;
AbstractSimplifyInterpolationHelpers.cs (2)
171private static bool IsType<T>(INamedTypeSymbol type, SemanticModel semanticModel) 174private static INamedTypeSymbol? FindType<T>(SemanticModel semanticModel)
AbstractSpeculationAnalyzer.cs (19)
47private readonly SemanticModel _semanticModel; 56private SemanticModel? _lazySpeculativeSemanticModel; 76SemanticModel semanticModel, 126public SemanticModel OriginalSemanticModel => _semanticModel; 161public SemanticModel SpeculativeSemanticModel 197protected abstract void ValidateSpeculativeSemanticModel(SemanticModel speculativeSemanticModel, SyntaxNode nodeToSpeculate); 210protected abstract SemanticModel CreateSpeculativeSemanticModel(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel); 278protected abstract bool ConversionsAreCompatible(SemanticModel model1, TExpressionSyntax expression1, SemanticModel model2, TExpressionSyntax expression2); 721protected abstract bool IsForEachTypeInferred(TForEachStatementSyntax forEachStatement, SemanticModel semanticModel); 758protected abstract bool ForEachConversionsAreCompatible(SemanticModel originalModel, TForEachStatementSyntax originalForEach, SemanticModel newModel, TForEachStatementSyntax newForEach); 760protected abstract void GetForEachSymbols(SemanticModel model, TForEachStatementSyntax forEach, out IMethodSymbol getEnumeratorMethod, out ITypeSymbol elementType); 942SemanticModel speculativeSemanticModel) 996private bool IsReceiverNonUniquePossibleValueTypeParam(TExpressionSyntax invocation, SemanticModel semanticModel) 1014private static bool IsReceiverUniqueInstance(TExpressionSyntax receiver, SemanticModel semanticModel) 1198protected abstract TConversion ClassifyConversion(SemanticModel model, TExpressionSyntax expression, ITypeSymbol targetType); 1199protected abstract TConversion ClassifyConversion(SemanticModel model, ITypeSymbol originalType, ITypeSymbol targetType);
AbstractUnnecessaryImportsProvider.cs (2)
19SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 21public ImmutableArray<TSyntaxNode> GetUnnecessaryImports(SemanticModel model, CancellationToken cancellationToken)
AbstractUseAutoPropertyAnalyzer.cs (7)
76protected abstract TExpression? GetSetterExpression(IMethodSymbol setMethod, SemanticModel semanticModel, CancellationToken cancellationToken); 80HashSet<string> fieldNames, ConcurrentSet<IFieldSymbol> ineligibleFields, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 83HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 151var semanticModel = context.SemanticModel; 269private IFieldSymbol? GetSetterField(SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken) 272private IFieldSymbol? GetGetterField(SemanticModel semanticModel, IMethodSymbol getMethod, CancellationToken cancellationToken) 275private static IFieldSymbol? CheckFieldAccessExpression(SemanticModel semanticModel, TExpression? expression, CancellationToken cancellationToken)
AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
62var semanticModel = context.SemanticModel;
AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
111var semanticModel = context.SemanticModel;
AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (2)
38protected abstract bool IsTargetTyped(SemanticModel semanticModel, TConditionalExpressionSyntax conditional, System.Threading.CancellationToken cancellationToken); 100var semanticModel = context.SemanticModel;
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
88var semanticModel = context.SemanticModel;
AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
134var semanticModel = context.SemanticModel;
AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
60var semanticModel = context.SemanticModel; 148private static ITypeParameterSymbol? GetGenericParameterSymbol(ISyntaxFacts syntaxFacts, SemanticModel semanticModel, SyntaxNode node1, SyntaxNode node2, CancellationToken cancellationToken)
AbstractUseNullPropagationDiagnosticAnalyzer.cs (5)
71protected abstract bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol? expressionTypeOpt, CancellationToken cancellationToken); 141var semanticModel = context.SemanticModel; 301var semanticModel = context.SemanticModel; 329SemanticModel semanticModel, 353ISyntaxFacts syntaxFacts, SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken)
AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
56var semanticModel = context.SemanticModel;
AbstractUseThrowExpressionDiagnosticAnalyzer.cs (4)
79var semanticModel = context.Operation.SemanticModel; 138private static bool ValueIsAccessed(SemanticModel semanticModel, IConditionalOperation ifOperation, IBlockOperation containingBlock, ISymbol localOrParameter, IExpressionStatementOperation expressionStatement, IAssignmentOperation assignmentExpression) 166protected abstract bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol? expressionTypeOpt, CancellationToken cancellationToken); 271SemanticModel semanticModel, IThrowOperation throwOperation,
AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
181SemanticModel semanticModel, 191SemanticModel semanticModel,
AliasSymbolCache.cs (2)
28SemanticModel semanticModel, 49public static void AddAliasSymbols(SemanticModel semanticModel, int namespaceId, IEnumerable<IAliasSymbol> aliasSymbols)
DiagnosticAnalyzerCategory.cs (1)
22/// <see cref="SemanticModel"/> is needed, use <see cref="SemanticSpanAnalysis"/> or
IPragmaSuppressionsAnalyzer.cs (1)
23SemanticModel semanticModel,
ISemanticFacts.cs (24)
51bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 58bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 59bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 60bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 61bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 63bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken); 65ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken); 72bool TryGetSpeculativeSemanticModel(SemanticModel oldSemanticModel, SyntaxNode oldNode, SyntaxNode newNode, [NotNullWhen(true)] out SemanticModel? speculativeModel); 77ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken); 79ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement); 80SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 82IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node); 84ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node); 86ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node); 90IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken); 92IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 93IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 95ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken); 96ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken); 98ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken); 100bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 107bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken); 109string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken);
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)
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; }
ISymbolExtensions.cs (1)
576public static bool IsAwaitableNonDynamic([NotNullWhen(true)] this ISymbol? symbol, SemanticModel semanticModel, int position)
IUnnecessaryImportsProvider.cs (2)
14ImmutableArray<TSyntaxNode> GetUnnecessaryImports(SemanticModel model, CancellationToken cancellationToken); 17SemanticModel model,
SemanticModelExtensions.cs (20)
32public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 35public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode statementOrExpression) 38public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 41public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode statement) 44public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 47public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken) 53public static IOperation GetRequiredOperation(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 59public static ISymbol GetRequiredEnclosingSymbol(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 65public static TSymbol? GetEnclosingSymbol<TSymbol>(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 81public static ISymbol GetEnclosingNamedTypeOrAssembly(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 87public static INamedTypeSymbol? GetEnclosingNamedType(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 90public static INamespaceSymbol? GetEnclosingNamespace(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 94this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null) 102public static SemanticModel GetOriginalSemanticModel(this SemanticModel semanticModel) 116this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? filter = null) 128SemanticModel semanticModel, SyntaxNode node, 153public static string GenerateNameFromType(this SemanticModel semanticModel, ITypeSymbol type, ISyntaxFacts syntaxFacts, bool capitalize) 184private static bool ShouldPluralize(this SemanticModel semanticModel, ITypeSymbol type) 235this SemanticModel semanticModel,
SimplifyTypeNamesDiagnosticAnalyzerBase.cs (3)
75SemanticModel model, SyntaxNode node, TSimplifierOptions options, 113public bool TrySimplify(SemanticModel model, SyntaxNode node, [NotNullWhen(true)] out Diagnostic? diagnostic, TSimplifierOptions options, CancellationToken cancellationToken) 134internal static Diagnostic CreateDiagnostic(SemanticModel model, TSimplifierOptions options, TextSpan issueSpan, string diagnosticId, bool inDeclaration)
SuppressMessageAttributeState.cs (1)
53SemanticModel model,
SymbolKey.AliasSymbolKey.cs (2)
43var semanticModel = reader.Compilation.GetSemanticModel(syntaxTree); 58SemanticModel semanticModel, SyntaxNode syntaxNode, string name, ISymbol target,
SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs (1)
53var semanticModel = reader.Compilation.GetSemanticModel(syntaxTree);
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)
SymbolKey.SymbolKeyReader.cs (1)
745var semanticModel = Compilation.GetSemanticModel(location.SourceTree);
UseCollectionInitializerAnalyzer.cs (1)
40SemanticModel semanticModel,
UseCompoundAssignmentUtilities.cs (3)
41ISyntaxFacts syntaxFacts, SyntaxNode expr, SemanticModel semanticModel, CancellationToken cancellationToken) 47ISyntaxFacts syntaxFacts, SyntaxNode expr, SemanticModel semanticModel, 100SyntaxNode expr, SemanticModel semanticModel, bool isTopLevel, CancellationToken cancellationToken)
UseNamedMemberInitializerAnalyzer.cs (1)
36SemanticModel semanticModel,
Microsoft.CodeAnalysis.CodeStyle.Fixes (197)
AbstractAddAccessibilityModifiersCodeFixProvider.cs (1)
47var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (2)
91var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 101Document document, SemanticModel semanticModel, Diagnostic diagnostic,
AbstractAddExplicitCastCodeFixProvider.cs (5)
52Document document, SemanticModel semanticModel, SyntaxNode root, 63var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 105SemanticModel semanticModel, 142private static string GetSubItemName(SemanticModel semanticModel, int position, ITypeSymbol conversionType) 151SemanticModel semanticModel,
AbstractAddParameterCodeFixProvider.cs (9)
37protected abstract ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken); 46SemanticModel semanticModel, 60var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 115SemanticModel semanticModel, 136SemanticModel semanticModel, 184SemanticModel semanticModel, 394var semanticModel = await invocationDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 412var semanticModel = await invocationDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 429SemanticModel semanticModel,
AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
42var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
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);
AbstractConvertTypeOfToNameOfCodeFixProvider.cs (3)
22protected abstract SyntaxNode GetSymbolTypeExpression(SemanticModel model, TMemberAccessExpressionSyntax node, CancellationToken cancellationToken); 38var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 51public void ConvertTypeOfToNameOf(SemanticModel semanticModel, SyntaxEditor editor, TMemberAccessExpressionSyntax nodeToReplace, CancellationToken cancellationToken)
AbstractForEachCastCodeFixProvider.cs (3)
25protected abstract ITypeSymbol GetForEachElementType(SemanticModel semanticModel, TForEachStatementSyntax forEachStatement); 48var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 59SemanticModel semanticModel,
AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
76var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
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);
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);
AbstractMakeTypePartialCodeFixProvider.cs (1)
33var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractMoveDeclarationNearReferenceService.State.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractPopulateSwitchCodeFixProvider.cs (3)
50Document document, SyntaxEditor editor, SemanticModel semanticModel, 149var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 159SyntaxEditor editor, SemanticModel semanticModel,
AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
30Document document, SyntaxEditor editor, SemanticModel semanticModel,
AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
31Document document, SyntaxEditor editor, SemanticModel semanticModel,
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)
AbstractRemoveUnnecessaryImportsService.cs (2)
31var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 38var currentModel = await current.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractRemoveUnnecessaryParenthesesCodeFixProvider.cs (1)
26TParenthesizedExpressionSyntax current, SemanticModel semanticModel, CancellationToken cancellationToken);
AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
50var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractRemoveUnusedValuesCodeFixProvider.cs (8)
123protected virtual SyntaxNode? TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel) => null; 290var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 337SemanticModel semanticModel, 374SemanticModel semanticModel, 433SemanticModel semanticModel, 909var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 922private readonly SemanticModel _semanticModel; 929SemanticModel semanticModel,
AbstractSemanticFactsService.cs (30)
39SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 47SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 55SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 63SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 71SemanticModel semanticModel, 90protected virtual IEnumerable<ISymbol> GetCollidableSymbols(SemanticModel semanticModel, SyntaxNode location, SyntaxNode container, CancellationToken cancellationToken) 133public bool IsWrittenTo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 136public bool IsOnlyWrittenTo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 139public bool IsInOutContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 142public bool IsInRefContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 145public bool IsInInContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 148public bool CanReplaceWithRValue(SemanticModel semanticModel, SyntaxNode expression, CancellationToken cancellationToken) 151public ISymbol GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 157public bool TryGetSpeculativeSemanticModel(SemanticModel oldSemanticModel, SyntaxNode oldNode, SyntaxNode newNode, out SemanticModel speculativeModel) 160public ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken) 163public ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement) 166public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 169public IMethodSymbol GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 172public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 175public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 181public IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 184public IParameterSymbol FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 187public IParameterSymbol FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 190public ISymbol FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, CancellationToken cancellationToken) 193public ISymbol FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, CancellationToken cancellationToken) 196public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 199public bool IsInsideNameOfExpression(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 205public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol expressionTypeOpt, CancellationToken cancellationToken) 208public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken)
AbstractSimplifyInterpolationCodeFixProvider.cs (1)
53var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
21protected readonly SemanticModel SemanticModel; 29protected AbstractTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
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,
AbstractUnsealClassCodeFixProvider.cs (1)
35var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseCollectionInitializerCodeFixProvider.cs (1)
79var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseConditionalExpressionCodeFixProvider.cs (1)
105var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
67var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
53var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseNullPropagationCodeFixProvider.cs (2)
72var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 92SemanticModel semanticModel,
AbstractUseObjectInitializerCodeFixProvider.cs (1)
78var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeGenerationSymbol.cs (2)
204public string ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null) 207public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null)
CodeGenerationTypeSymbol.cs (2)
70public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 73public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
DocumentExtensions.cs (6)
34public static async ValueTask<SemanticModel> GetRequiredSemanticModelAsync(this Document document, CancellationToken cancellationToken) 36if (document.TryGetSemanticModel(out var semanticModel)) 97public static ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, int position, CancellationToken cancellationToken) 114public static async ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, TextSpan span, CancellationToken cancellationToken) 139public static ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, SyntaxNode? node, CancellationToken cancellationToken) 164var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Fixer.cs (4)
27protected abstract SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, TArgumentListSyntax newArgumentList); 40SemanticModel semanticModel, 110SemanticModel semanticModel, 204private bool IsInvocationExpressionWithNewArgumentsApplicable(SemanticModel semanticModel,
InheritanceDistanceComparer.cs (2)
37private readonly SemanticModel _semanticModel; 39public InheritanceDistanceComparer(SemanticModel semanticModel)
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);
ISemanticModelReuseWorkspaceService.cs (1)
21ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
ISyntaxContextService.cs (1)
13SyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken);
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);
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,
LanguageServices\SemanticModelWorkspaceService\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (1)
20public ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
NamingStyleCodeFixProvider.cs (1)
76var model = await document.GetRequiredSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
RemoveRedundantEqualityCodeFixProvider.cs (1)
47var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SemanticDocument.cs (3)
15public readonly SemanticModel SemanticModel; 17private SemanticDocument(Document document, SourceText text, SyntaxNode root, SemanticModel semanticModel) 27var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SimplificationHelpers.cs (2)
64public static ISymbol? GetOriginalSymbolInfo(SemanticModel semanticModel, SyntaxNode expression) 100public static bool IsNamespaceOrTypeOrThisParameter(SyntaxNode expression, SemanticModel semanticModel)
SimplifyConditionalCodeFixProvider.cs (1)
66SyntaxNode SimplifyConditional(SemanticModel semanticModel, Diagnostic diagnostic, SyntaxNode expr)
SyntaxContext.cs (2)
15public SemanticModel SemanticModel { get; } 58SemanticModel semanticModel,
SyntaxEditorBasedCodeFixProvider.cs (5)
36var model = await document.GetRequiredSemanticModelAsync(fixAllContext.CancellationToken).ConfigureAwait(false); 106/// This overload differs from <see cref="IncludeDiagnosticDuringFixAll(Diagnostic, Document, SemanticModel, string, CancellationToken)"/> 107/// in that it also passes along the <see cref="SemanticModel"/>. 116protected virtual bool IncludeDiagnosticDuringFixAll(Diagnostic diagnostic, Document document, SemanticModel model, string? equivalenceKey, CancellationToken cancellationToken) 133/// cref="IncludeDiagnosticDuringFixAll(Diagnostic, Document, SemanticModel, string, CancellationToken)"/>
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);
SyntaxGeneratorExtensions_Negate.cs (7)
38SemanticModel semanticModel, 48SemanticModel semanticModel, 59SemanticModel semanticModel, 143SemanticModel semanticModel, 208SemanticModel semanticModel, 234private static SyntaxNode GetNegationOfIsPatternExpression(SyntaxNode isExpression, SyntaxGenerator generator, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, CancellationToken cancellationToken) 446SemanticModel semanticModel)
UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
45var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (2)
46var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62SyntaxEditor editor, SemanticModel semanticModel, INamedTypeSymbol? expressionTypeOpt,
UseSystemHashCodeCodeFixProvider.cs (1)
51var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp (151)
Compilation\CSharpCompilation.cs (5)
785var model = GetSemanticModel(tree); 2257public new SemanticModel GetSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility) 2269SemanticModel? model = null; 2279internal override SemanticModel CreateSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility) 3632protected override SemanticModel CommonGetSemanticModel(SyntaxTree syntaxTree, bool ignoreAccessibility)
Compilation\CSharpSemanticModel.cs (21)
2500/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2502public bool TryGetSpeculativeSemanticModelForMethodBody(int position, BaseMethodDeclarationSyntax method, out SemanticModel speculativeModel) 2527/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2529public bool TryGetSpeculativeSemanticModelForMethodBody(int position, AccessorDeclarationSyntax accessor, out SemanticModel speculativeModel) 2556/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2558public bool TryGetSpeculativeSemanticModel(int position, TypeSyntax type, out SemanticModel speculativeModel, SpeculativeBindingOption bindingOption = SpeculativeBindingOption.BindAsExpression) 2582/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2584public bool TryGetSpeculativeSemanticModel(int position, StatementSyntax statement, out SemanticModel speculativeModel) 2609/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2611public bool TryGetSpeculativeSemanticModel(int position, EqualsValueClauseSyntax initializer, out SemanticModel speculativeModel) 2636/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2638public bool TryGetSpeculativeSemanticModel(int position, ArrowExpressionClauseSyntax expressionBody, out SemanticModel speculativeModel) 2666/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2668public bool TryGetSpeculativeSemanticModel(int position, ConstructorInitializerSyntax constructorInitializer, out SemanticModel speculativeModel) 2695/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2697public bool TryGetSpeculativeSemanticModel(int position, PrimaryConstructorBaseTypeSyntax constructorInitializer, out SemanticModel speculativeModel) 2725/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2727public bool TryGetSpeculativeSemanticModel(int position, CrefSyntax crefSyntax, out SemanticModel speculativeModel) 2751/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2753public bool TryGetSpeculativeSemanticModel(int position, AttributeSyntax attribute, out SemanticModel speculativeModel) 4907protected sealed override SemanticModel ParentModelCore
Compilation\MemberSemanticModel.cs (1)
127internal 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;
CSharpDeclarationComputer.cs (4)
23SemanticModel model, 35SemanticModel model, 57SemanticModel model, 361SemanticModel model,
CSharpExtensions.cs (93)
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)) 855public static Conversion GetSpeculativeConversion(this SemanticModel? semanticModel, int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption) 868public static ForEachStatementInfo GetForEachStatementInfo(this SemanticModel? semanticModel, ForEachStatementSyntax forEachStatement) 881public static ForEachStatementInfo GetForEachStatementInfo(this SemanticModel? semanticModel, CommonForEachStatementSyntax forEachStatement) 894public static DeconstructionInfo GetDeconstructionInfo(this SemanticModel? semanticModel, AssignmentExpressionSyntax assignment) 899public static DeconstructionInfo GetDeconstructionInfo(this SemanticModel? semanticModel, ForEachVariableStatementSyntax @foreach) 904public static AwaitExpressionInfo GetAwaitExpressionInfo(this SemanticModel? semanticModel, AwaitExpressionSyntax awaitExpression) 917public static ImmutableArray<ISymbol> GetMemberGroup(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 930public static ImmutableArray<ISymbol> GetMemberGroup(this SemanticModel? semanticModel, AttributeSyntax attribute, CancellationToken cancellationToken = default(CancellationToken)) 943public static ImmutableArray<ISymbol> GetMemberGroup(this SemanticModel? semanticModel, ConstructorInitializerSyntax initializer, CancellationToken cancellationToken = default(CancellationToken)) 959public static ImmutableArray<IPropertySymbol> GetIndexerGroup(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 972public static Optional<object> GetConstantValue(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 988public static QueryClauseInfo GetQueryClauseInfo(this SemanticModel? semanticModel, QueryClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken)) 1005public static IAliasSymbol? GetAliasInfo(this SemanticModel? semanticModel, IdentifierNameSyntax nameSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1015public static IAliasSymbol? GetSpeculativeAliasInfo(this SemanticModel? semanticModel, int position, IdentifierNameSyntax nameSyntax, SpeculativeBindingOption bindingOption) 1024public static ControlFlowAnalysis? AnalyzeControlFlow(this SemanticModel? semanticModel, StatementSyntax firstStatement, StatementSyntax lastStatement) 1033public static ControlFlowAnalysis? AnalyzeControlFlow(this SemanticModel? semanticModel, StatementSyntax statement) 1042public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, ConstructorInitializerSyntax constructorInitializer) 1051public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, PrimaryConstructorBaseTypeSyntax primaryConstructorBaseType) 1060public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, ExpressionSyntax expression) 1069public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, StatementSyntax firstStatement, StatementSyntax lastStatement) 1078public static DataFlowAnalysis? AnalyzeDataFlow(this SemanticModel? semanticModel, StatementSyntax statement) 1089public static bool TryGetSpeculativeSemanticModelForMethodBody([NotNullWhen(true)] this SemanticModel? semanticModel, int position, BaseMethodDeclarationSyntax method, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1108public static bool TryGetSpeculativeSemanticModelForMethodBody([NotNullWhen(true)] this SemanticModel? semanticModel, int position, AccessorDeclarationSyntax accessor, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1127public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, TypeSyntax type, [NotNullWhen(true)] out SemanticModel? speculativeModel, SpeculativeBindingOption bindingOption = SpeculativeBindingOption.BindAsExpression) 1146public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, CrefSyntax crefSyntax, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1165public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, StatementSyntax statement, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1184public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, EqualsValueClauseSyntax initializer, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1203public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, ArrowExpressionClauseSyntax expressionBody, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1224public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, ConstructorInitializerSyntax constructorInitializer, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1245public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, PrimaryConstructorBaseTypeSyntax constructorInitializer, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1264public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, AttributeSyntax attribute, [NotNullWhen(true)] out SemanticModel? speculativeModel) 1283public static Conversion ClassifyConversion(this SemanticModel? semanticModel, ExpressionSyntax expression, ITypeSymbol destination, bool isExplicitInSource = false) 1303public static Conversion ClassifyConversion(this SemanticModel? semanticModel, int position, ExpressionSyntax expression, ITypeSymbol destination, bool isExplicitInSource = false) 1319public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, MemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1328public static IMethodSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, CompilationUnitSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1338public static INamespaceSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, NamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1349public static INamespaceSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, FileScopedNamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1359public static INamedTypeSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, BaseTypeDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1368public static INamedTypeSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, DelegateDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1377public static IFieldSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, EnumMemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1386public static IMethodSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, BaseMethodDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1395public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, BasePropertyDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1404public static IPropertySymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, PropertyDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1413public static IPropertySymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, IndexerDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1422public static IEventSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, EventDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1431public static IPropertySymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, AnonymousObjectMemberDeclaratorSyntax declaratorSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1440public static INamedTypeSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, AnonymousObjectCreationExpressionSyntax declaratorSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1449public static INamedTypeSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, TupleExpressionSyntax declaratorSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1458public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ArgumentSyntax declaratorSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1467public static IMethodSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, AccessorDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1476public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, SingleVariableDesignationSyntax designationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1485public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, VariableDeclaratorSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1494public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, TupleElementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1503public static ILabelSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1512public static ILabelSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1521public static IAliasSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, UsingDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1530public static IAliasSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ExternAliasDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1539public static IParameterSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ParameterSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1548public static ITypeParameterSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, TypeParameterSyntax typeParameter, CancellationToken cancellationToken = default(CancellationToken)) 1558public static ILocalSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ForEachStatementSyntax forEachStatement, CancellationToken cancellationToken = default(CancellationToken)) 1569public static ILocalSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, CatchDeclarationSyntax catchDeclaration, CancellationToken cancellationToken = default(CancellationToken)) 1576public static IRangeVariableSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, QueryClauseSyntax queryClause, CancellationToken cancellationToken = default(CancellationToken)) 1585public static IRangeVariableSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, JoinIntoClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken)) 1594public static IRangeVariableSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, QueryContinuationSyntax node, CancellationToken cancellationToken = default(CancellationToken))
Errors\ErrorFacts.cs (1)
542/// <see cref="SemanticModel.GetDiagnostics(Text.TextSpan?, System.Threading.CancellationToken)"/> API.
Operations\CSharpOperationFactory.cs (2)
20private readonly SemanticModel _semanticModel; 22public CSharpOperationFactory(SemanticModel semanticModel)
SymbolDisplay\SymbolDisplay.cs (8)
70SemanticModel semanticModel, 81SemanticModel semanticModel, 91SemanticModel semanticModel, 158SemanticModel semanticModel, 171SemanticModel semanticModel, 182SemanticModel semanticModel, 194SemanticModel? semanticModelOpt, 204SemanticModel? semanticModelOpt,
SymbolDisplay\SymbolDisplayVisitor.cs (2)
25SemanticModel semanticModelOpt, 35SemanticModel semanticModelOpt,
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
175SemanticModel 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)
1328SemanticModel semanticModel, 1336SemanticModel semanticModel,
Symbols\TypeSymbol.cs (2)
672SemanticModel semanticModel, 681SemanticModel semanticModel,
Microsoft.CodeAnalysis.CSharp.CodeStyle (226)
AnalyzedPattern.cs (1)
60if (operation.SemanticModel.TryGetSpeculativeSemanticModel(typeSyntax.SpanStart, dummyStatement, out var speculativeModel))
ArgumentSyntaxExtensions.cs (1)
41SemanticModel semanticModel,
AttributeArgumentSyntaxExtensions.cs (1)
24SemanticModel semanticModel,
CastSimplifier.cs (34)
45public static bool IsUnnecessaryCast(ExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 53public static bool IsUnnecessaryAsCast(BinaryExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 60public static bool IsUnnecessaryCast(CastExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 114SemanticModel semanticModel, 146SemanticModel semanticModel, 171SemanticModel originalSemanticModel, CancellationToken cancellationToken) 242SemanticModel originalSemanticModel, IDelegateCreationOperation originalDelegateCreationOperation, 271SemanticModel originalSemanticModel, IConversionOperation originalConversionOperation, 524ExpressionSyntax castNode, ExpressionSyntax castedExpressionNode, SemanticModel semanticModel, CancellationToken cancellationToken) 611ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, 678ExpressionSyntax castNode, SemanticModel originalSemanticModel, 679ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, CancellationToken cancellationToken) 759SemanticModel semanticModel, 835SemanticModel semanticModel, 894SemanticModel semanticModel, CancellationToken cancellationToken) 961private static bool IsFieldOrArrayElement(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 968ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 982SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1006SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1040SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel) 1071SemanticModel originalSemanticModel, 1072SemanticModel rewrittenSemanticModel, 1180SemanticModel originalSemanticModel, 1181SemanticModel rewrittenSemanticModel, 1220SemanticModel semanticModel, 1258MemberAccessExpressionSyntax memberAccessExpression, SemanticModel semanticModel, 1314SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1336private static (SemanticModel? rewrittenSemanticModel, ExpressionSyntax? rewrittenExpression) GetSemanticModelWithCastRemoved( 1339SemanticModel originalSemanticModel, 1345var rewrittenSemanticModel = analyzer.SpeculativeSemanticModel;
ConvertProgramAnalysis_TopLevelStatements.cs (1)
45SemanticModel semanticModel,
ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (2)
33SemanticModel semanticModel, 82private (VariableDeclaratorSyntax, ISymbol)? TryGetVariableDeclaratorAndSymbol(SemanticModel semanticModel)
ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
56var semanticModel = context.SemanticModel;
CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
64var semanticModel = context.SemanticModel;
CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (3)
18private readonly SemanticModel _semanticModel; 27SemanticModel semanticModel, 52SemanticModel semanticModel,
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
81var semanticModel = syntaxContext.SemanticModel; 268SemanticModel semanticModel, 316SemanticModel semanticModel,
CSharpForEachCastDiagnosticAnalyzer.cs (1)
27SemanticModel semanticModel, CommonForEachStatementSyntax node)
CSharpInlineDeclarationDiagnosticAnalyzer.cs (3)
124var semanticModel = context.SemanticModel; 244SemanticModel semanticModel, 322SemanticModel semanticModel,
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
101var semanticModel = syntaxContext.SemanticModel;
CSharpMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
21protected override bool IsWrittenTo(SemanticModel semanticModel, ThisExpressionSyntax expression, CancellationToken cancellationToken)
CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
127var semanticModel = blockOperation.SemanticModel; 154SemanticModel semanticModel,
CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
49var semanticModel = context.SemanticModel;
CSharpRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
26protected override bool IsUnnecessaryCast(SemanticModel model, ExpressionSyntax cast, CancellationToken cancellationToken)
CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
47var semanticModel = context.SemanticModel;
CSharpRemoveUnnecessaryExpressionParenthesesDiagnosticAnalyzer.cs (2)
29SemanticModel semanticModel, CancellationToken cancellationToken, 38ParenthesizedExpressionSyntax parenthesizedExpression, SemanticModel semanticModel, CancellationToken cancellationToken,
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (4)
63var semanticModel = context.SemanticModel; 185var rewrittenSemanticModel = analyzer.SpeculativeSemanticModel; 219SemanticModel semanticModel1, 221SemanticModel semanticModel2,
CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
311private SyntaxTreeState GetOrCreateSyntaxTreeState(SyntaxTree tree, bool defaultCompleted, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpRemoveUnnecessaryPatternParenthesesDiagnosticAnalyzer.cs (1)
29SemanticModel semanticModel, CancellationToken cancellationToken,
CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
42var semanticModel = context.SemanticModel;
CSharpSemanticFacts.cs (29)
38public bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 41public bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 44public bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 47public bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 50public bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 53public bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken) 56public ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 109SemanticModel oldSemanticModel, 112[NotNullWhen(true)] out SemanticModel? speculativeModel) 116var model = oldSemanticModel; 126public ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken) 128var original = model.GetOriginalSemanticModel(); 167public ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement) 185public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 188public IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 199public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 211public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 244SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 262public IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 265public IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 269public ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 272public ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 277public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken) 292/// cref="ModelExtensions.GetSymbolInfo(SemanticModel, SyntaxNode, CancellationToken)"/>, but sometimes employs 296private static ImmutableArray<ISymbol> GetSymbolInfo(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 365public bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 373var semanticModel = compilation.GetSemanticModel(syntaxReference.SyntaxTree); 389public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken) 392public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken)
CSharpSimplifyConditionalDiagnosticAnalyzer.cs (1)
25protected override CommonConversion GetConversion(SemanticModel semanticModel, ExpressionSyntax node, CancellationToken cancellationToken)
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
55var semanticModel = context.SemanticModel;
CSharpTypeStyleHelper.cs (8)
18private readonly SemanticModel _semanticModel; 37public TypeStyleResult(CSharpTypeStyleHelper helper, TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, bool isStylePreferred, ReportDiagnostic severity, CancellationToken cancellationToken) : this() 58TypeSyntax typeName, SemanticModel semanticModel, 76TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken); 79SyntaxToken identifier, TypeSyntax typeName, ExpressionSyntax initializer, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken); 81internal TypeSyntax? FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 114protected virtual bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 117protected virtual bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpTypeStyleHelper.State.cs (4)
30SyntaxNode declaration, SemanticModel semanticModel, 64private static bool IsTypeApparentInDeclaration(VariableDeclarationSyntax variableDeclaration, SemanticModel semanticModel, UseVarPreference stylePreferences, CancellationToken cancellationToken) 91private static bool IsPredefinedTypeInDeclaration(SyntaxNode declarationStatement, SemanticModel semanticModel) 130private static bool IsInferredPredefinedType(SyntaxNode declarationStatement, SemanticModel semanticModel)
CSharpUnnecessaryImportsProvider.cs (1)
24SemanticModel model,
CSharpUseAutoPropertyAnalyzer.cs (4)
46HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken) 54SemanticModel semanticModel, 100SemanticModel semanticModel, MemberAccessExpressionSyntax memberAccess, ConcurrentSet<IFieldSymbol> ineligibleFields, CancellationToken cancellationToken) 188IMethodSymbol setMethod, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
25protected override bool IsTargetTyped(SemanticModel semanticModel, ConditionalExpressionSyntax conditional, CancellationToken cancellationToken)
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (3)
57var semanticModel = context.SemanticModel; 122var semanticModel = context.SemanticModel; 185SemanticModel semanticModel,
CSharpUseDeconstructionDiagnosticAnalyzer.cs (6)
88SemanticModel semanticModel, 118SemanticModel semanticModel, 133SemanticModel semanticModel, 200SemanticModel semanticModel, INamedTypeSymbol tupleType, 245SemanticModel semanticModel, SyntaxNode searchScope, ILocalSymbol local, 286SemanticModel semanticModel, SyntaxNode container, CancellationToken cancellationToken)
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,
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
64var semanticModel = context.SemanticModel;
CSharpUseImplicitTypeHelper.cs (8)
30TypeSyntax typeName, SemanticModel semanticModel, 60protected override bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 92TypeSyntax typeName, SemanticModel semanticModel, 172SemanticModel semanticModel, 202var newSemanticModel = semanticModel.Compilation.ReplaceSyntaxTree(tree, newTree).GetSemanticModel(newTree); 211private static bool IsSafeToSwitchToVarWithoutNeedingSpeculation(DeclarationExpressionSyntax declarationExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 274SemanticModel semanticModel, 346protected override bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
198var semanticModel = instance.SemanticModel;
CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (2)
53var semanticModel = context.SemanticModel; 71SemanticModel semanticModel, ExpressionSyntax left, ExpressionSyntax right)
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
82var semanticModel = syntaxContext.SemanticModel; 202SemanticModel semanticModel, INamedTypeSymbol? expressionTypeOpt, ISymbol local, BlockSyntax block, 356SemanticModel semanticModel,
CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
56var semanticModel = context.SemanticModel;
CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
88var semanticModel = operation.SemanticModel;
CSharpUseNullPropagationDiagnosticAnalyzer.cs (1)
39protected override bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol? expressionTypeOpt, CancellationToken cancellationToken)
CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
72var semanticModel = context.SemanticModel;
CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
84var semanticModel = operation.SemanticModel;
CSharpUseThrowExpressionDiagnosticAnalyzer.cs (1)
30protected override bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol? expressionTypeOpt, CancellationToken cancellationToken)
CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
110var semanticModel = syntaxContext.SemanticModel;
DefaultExpressionSyntaxExtensions.cs (3)
22SemanticModel semanticModel, 38DefaultExpressionSyntax defaultExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 83DefaultExpressionSyntax defaultExpression, SemanticModel semanticModel, CancellationToken cancellationToken)
ExpressionSyntaxExtensions.cs (5)
321SemanticModel semanticModel, 410[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 440[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 451this ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 635SemanticModel semanticModel,
ForEachStatementSyntaxExtensions.cs (1)
13public static bool IsTypeInferred(this CommonForEachStatementSyntax forEachStatement, SemanticModel semanticModel)
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
293var semanticModel = syntaxContext.SemanticModel;
MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
50var semanticModel = context.SemanticModel;
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)
NullableImpactingSpanWalker.cs (2)
19private readonly SemanticModel _semanticModel; 42SemanticModel semanticModel,
ParenthesizedExpressionSyntaxExtensions.cs (3)
21this ParenthesizedExpressionSyntax node, SemanticModel semanticModel, CancellationToken cancellationToken) 304SemanticModel semanticModel, CancellationToken cancellationToken) 379ParenthesizedExpressionSyntax node, ExpressionSyntax parentExpression, SemanticModel semanticModel)
SemanticModelExtensions.cs (10)
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, 317this SemanticModel semanticModel, 351this SemanticModel semanticModel, ExpressionSyntax expression, 424SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 454public static INamedTypeSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, BaseTypeDeclarationSyntax declarationSyntax, CancellationToken cancellationToken)
SpeculationAnalyzer.cs (17)
57SemanticModel semanticModel, 94protected override void ValidateSpeculativeSemanticModel(SemanticModel speculativeSemanticModel, SyntaxNode nodeToSpeculate) 104protected override SemanticModel CreateSpeculativeSemanticModel(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel) 107public static SemanticModel CreateSpeculativeSemanticModelForNode(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel) 114public static SemanticModel CreateSpeculativeSemanticModelForNode(SyntaxNode nodeToSpeculate, SemanticModel semanticModel, int position, bool isInNamespaceOrTypeContext) 125SemanticModel speculativeModel; 641protected override bool IsForEachTypeInferred(CommonForEachStatementSyntax forEachStatement, SemanticModel semanticModel) 740protected override bool ConversionsAreCompatible(SemanticModel originalModel, ExpressionSyntax originalExpression, SemanticModel newModel, ExpressionSyntax newExpression) 804protected override bool ForEachConversionsAreCompatible(SemanticModel originalModel, CommonForEachStatementSyntax originalForEach, SemanticModel newModel, CommonForEachStatementSyntax newForEach) 812protected override void GetForEachSymbols(SemanticModel model, CommonForEachStatementSyntax forEach, out IMethodSymbol getEnumeratorMethod, out ITypeSymbol elementType) 822protected override Conversion ClassifyConversion(SemanticModel model, ExpressionSyntax expression, ITypeSymbol targetType) 825protected override Conversion ClassifyConversion(SemanticModel model, ITypeSymbol originalType, ITypeSymbol targetType)
SyntaxNodeExtensions.cs (1)
971SemanticModel semanticModel,
TypeStyleHelper.cs (2)
32SemanticModel semanticModel, 120SemanticModel semanticModel,
TypeSyntaxExtensions.cs (1)
26public static bool IsTypeInferred(this TypeSyntax typeSyntax, SemanticModel semanticModel)
UseExpressionBodyForAccessorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, AccessorDeclarationSyntax declaration)
UseExpressionBodyForConstructorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConstructorDeclarationSyntax declaration) => false;
UseExpressionBodyForConversionOperatorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConversionOperatorDeclarationSyntax declaration)
UseExpressionBodyForIndexersHelper.cs (2)
63protected override IndexerDeclarationSyntax WithGenerateBody(SemanticModel semanticModel, IndexerDeclarationSyntax declaration) 66protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, IndexerDeclarationSyntax declaration) => true;
UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
68SemanticModel semanticModel, CodeStyleOption2<ExpressionBodyPreference> option,
UseExpressionBodyForLambdaHelpers.cs (1)
20SemanticModel semanticModel, ExpressionBodyPreference preference,
UseExpressionBodyForLocalFunctionHelper.cs (1)
54SemanticModel semanticModel, LocalFunctionStatementSyntax statement)
UseExpressionBodyForMethodsHelper.cs (1)
54SemanticModel semanticModel, MethodDeclarationSyntax declaration)
UseExpressionBodyForOperatorsHelper.cs (1)
52protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, OperatorDeclarationSyntax declaration)
UseExpressionBodyForPropertiesHelper.cs (2)
63protected override PropertyDeclarationSyntax WithGenerateBody(SemanticModel semanticModel, PropertyDeclarationSyntax declaration) 66protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, PropertyDeclarationSyntax declaration) => true;
UseExpressionBodyHelper.cs (1)
30public abstract SyntaxNode Update(SemanticModel semanticModel, SyntaxNode declaration, bool useExpressionBody);
UseExpressionBodyHelper`1.cs (5)
75public sealed override SyntaxNode Update(SemanticModel semanticModel, SyntaxNode declaration, bool useExpressionBody) 224public TDeclaration Update(SemanticModel semanticModel, TDeclaration declaration, bool useExpressionBody) 255protected abstract bool CreateReturnStatementForExpression(SemanticModel semanticModel, TDeclaration declaration); 263protected virtual TDeclaration WithGenerateBody(SemanticModel semanticModel, TDeclaration declaration) 278protected TDeclaration WithAccessorList(SemanticModel semanticModel, TDeclaration declaration)
UseSimpleUsingStatementDiagnosticAnalyzer.cs (4)
80var semanticModel = context.SemanticModel; 129SemanticModel semanticModel, BlockSyntax parentBlock, 155SemanticModel semanticModel, 205SemanticModel semanticModel,
UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
86var semanticModel = context.Operation.SemanticModel;
VariableDeclaratorExtensions.cs (1)
23public static bool IsTypeInferred(this VariableDeclaratorSyntax variable, SemanticModel semanticModel)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (124)
AbstractAssignOutParametersCodeFixProvider.cs (2)
38var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 99var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AddInheritdocCodeFixProvider.cs (1)
56SemanticModel? semanticModel = null;
ArgumentFixer.cs (1)
29protected override SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, ArgumentListSyntax newArgumentList)
AttributeArgumentFixer.cs (1)
29protected override SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, AttributeArgumentListSyntax newArgumentList)
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
78var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (3)
23private readonly SemanticModel _semanticModel; 29private Rewriter(SemanticModel semanticModel, bool isAllThrowStatements, CancellationToken cancellationToken) 38SemanticModel model,
ConvertToRecordEngine.cs (2)
37var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 85var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpAddExplicitCastCodeFixProvider.cs (1)
58SemanticModel semanticModel,
CSharpAddParameterCodeFixProvider.cs (2)
53protected override ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken) 57SemanticModel semanticModel,
CSharpAddYieldCodeFixProvider.cs (6)
56var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 92SemanticModel model, ExpressionSyntax? expression, [NotNullWhen(true)] out ITypeSymbol? returnExpressionType) 106SyntaxNode node, SemanticModel model, CancellationToken cancellationToken, 120private bool IsCorrectTypeForYieldReturn(ITypeSymbol typeArgument, ITypeSymbol returnExpressionType, ITypeSymbol methodReturnType, SemanticModel model) 154private bool CanConvertTypes(ITypeSymbol typeArgument, ITypeSymbol returnExpressionType, SemanticModel model) 193private static bool IsCorrectTypeForYieldReturn(ITypeSymbol methodReturnType, SemanticModel model)
CSharpAsAndNullCheckCodeFixProvider.cs (2)
48var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 85SemanticModel semanticModel,
CSharpChangeToIEnumerableCodeFixProvider.cs (2)
44var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 119SemanticModel model,
CSharpConvertToAsyncMethodCodeFixProvider.cs (3)
37SemanticModel semanticModel, 49SemanticModel semanticModel, 66SemanticModel semanticModel,
CSharpConvertTypeOfToNameOfCodeFixProvider.cs (1)
30protected override SyntaxNode GetSymbolTypeExpression(SemanticModel model, MemberAccessExpressionSyntax node, CancellationToken cancellationToken)
CSharpDeclareAsNullableCodeFixProvider.cs (7)
51var model = await context.Document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 61private static string GetEquivalenceKey(SyntaxNode node, SemanticModel model) 69static bool IsRemoteApiUsage(SyntaxNode node, SemanticModel model) 106var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 115protected override bool IncludeDiagnosticDuringFixAll(Diagnostic diagnostic, Document document, SemanticModel model, string? equivalenceKey, CancellationToken cancellationToken) 122SyntaxEditor editor, SemanticModel model, SyntaxNode node, HashSet<TypeSyntax> alreadyHandled, CancellationToken cancellationToken) 133SemanticModel model, SyntaxNode node, CancellationToken cancellationToken)
CSharpDisambiguateSameVariableCodeFixProvider.cs (3)
49var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 57SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken, 143var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpFixReturnTypeCodeFixProvider.cs (2)
80var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 159private static ITypeSymbol? InferTupleType(TupleExpressionSyntax tuple, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpForEachCastCodeFixProvider.cs (1)
27SemanticModel semanticModel, CommonForEachStatementSyntax forEachStatement)
CSharpInlineDeclarationCodeFixProvider.cs (5)
109CSharpCodeFixOptionsProvider options, SemanticModel semanticModel, 336SemanticModel semanticModel, 367topmostContainer.SpanStart, updatedTopmostContainer, out var speculativeModel)) 396SemanticModel semanticModel, 398out SemanticModel speculativeModel)
CSharpMakeMemberRequiredCodeFixProvider.cs (1)
59var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
65var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpRemoveUnnecessaryParenthesesCodeFixProvider.cs (1)
26protected override bool CanRemoveParentheses(SyntaxNode current, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
95protected override SyntaxNode TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel)
CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
52var semanticModel = await context.Document.GetRequiredSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 83SemanticModel semanticModel,
CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
42var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
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)
CSharpSyntaxContext.cs (3)
52SemanticModel semanticModel, 177public static CSharpSyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 181Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
CSharpSyntaxContextService.cs (1)
22public SyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
CSharpTypeInferenceService.cs (1)
27protected override AbstractTypeInferrer CreateTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpTypeInferenceService.TypeInferrer.cs (3)
30SemanticModel semanticModel, 2098var currentSemanticModel = SemanticModel; 2099var originalSemanticModel = currentSemanticModel.GetOriginalSemanticModel();
CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
48var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpUseDeconstructionCodeFixProvider.cs (1)
63SemanticModel semanticModel,
CSharpUseLocalFunctionCodeFixProvider.cs (2)
58var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 132SemanticModel semanticModel,
CSharpUseNotPatternCodeFixProvider.cs (2)
43var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 52SemanticModel semanticModel,
CSharpUsePatternCombinatorsCodeFixProvider.cs (2)
82var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 117var semanticModel = p.Target.SemanticModel;
CSharpUseRangeOperatorCodeFixProvider.cs (1)
67SemanticModel semanticModel, SyntaxNode currentRoot,
ExpressionSyntaxExtensions.cs (3)
103SemanticModel semanticModel, 132var speculativeSemanticModel = specAnalyzer.SpeculativeSemanticModel; 166SemanticModel semanticModel,
InternalExtensions.cs (2)
18SemanticModel semanticModel, 24public static ITypeSymbol DetermineParameterType(ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken)
ITypeSymbolExtensions.cs (1)
112public static async Task<ISymbol?> FindApplicableAliasAsync(this ITypeSymbol type, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
682public static bool IsNumericTypeContext(this SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (9)
617SemanticModel? semanticModel = null) 716this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, SemanticModel? semanticModel = null) 963SemanticModel? semanticModelOpt = null) 1697SemanticModel? semanticModelOpt = null) 1990public static bool IsInstanceContext(this SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken) 2160SemanticModel? semanticModel = null) 2739public static bool IsNameOfContext(this SyntaxTree syntaxTree, int position, SemanticModel? semanticModelOpt = null, CancellationToken cancellationToken = default) 2807SemanticModel semanticModel, 3003public static bool IsEnumTypeMemberAccessContext(this SyntaxTree syntaxTree, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
MakeLocalFunctionStaticCodeFixHelper.cs (1)
50var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
MakeRefStructCodeFixProvider.cs (1)
54var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
NullableHelpers.cs (3)
18/// <see cref="IsSymbolAssignedPossiblyNullValue(SemanticModel, IOperation, ISymbol)"/>. Note 22public static bool IsDeclaredSymbolAssignedPossiblyNullValue(SemanticModel semanticModel, SyntaxNode declarationSyntax, CancellationToken cancellationToken) 45public static bool? IsSymbolAssignedPossiblyNullValue(SemanticModel semanticModel, IOperation operation, ISymbol symbol)
PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
89var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
PositionalParameterInfo.cs (1)
38SemanticModel semanticModel,
TypeDeclarationSyntaxExtensions.cs (1)
69public static IEnumerable<BaseTypeSyntax> GetAllBaseListTypes(this TypeDeclarationSyntax typeNode, SemanticModel model, CancellationToken cancellationToken)
TypeSyntaxExtensions.cs (1)
16public static bool IsPotentialTypeName([NotNullWhen(true)] this TypeSyntax? typeSyntax, SemanticModel? semanticModelOpt, CancellationToken cancellationToken)
UseExplicitTypeCodeFixProvider.cs (4)
90var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 135var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 149SemanticModel semanticModel, 221private static ITypeSymbol GetConvertedType(SemanticModel semanticModel, SyntaxNode typeSyntax, CancellationToken cancellationToken)
UseExplicitTypeForConstCodeFixProvider.cs (1)
49var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
UseExpressionBodyCodeFixProvider.cs (2)
59var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 78SemanticModel semanticModel, SyntaxEditor editor, Diagnostic diagnostic,
UseExpressionBodyForLambdaCodeActionHelpers.cs (4)
18internal static LambdaExpressionSyntax Update(SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration) 22SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration) 51SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration, ExpressionSyntax expressionBody) 74SemanticModel semanticModel, LambdaExpressionSyntax declaration)
UseExpressionBodyForLambdaCodeFixProvider.cs (2)
55var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 68SyntaxEditor editor, SemanticModel semanticModel,
UseUtf8StringLiteralCodeFixProvider.cs (2)
49var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 94private static IArrayCreationOperation GetArrayCreationOperation(SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
260var semanticModel = semanticDocument.SemanticModel;
EventHookup\EventHookupSessionManager_EventHookupSession.cs (4)
177var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 217private IEventSymbol GetEventSymbol(SemanticModel semanticModel, SyntaxToken plusEqualsToken, CancellationToken cancellationToken) 235IEventSymbol eventSymbol, SyntaxToken plusEqualsToken, SemanticModel semanticModel, 256private 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)
49var semanticModel = await newDocument.GetSemanticModelAsync(); 79var semanticModel = await document.GetSemanticModelAsync(); 87out var speculativeModel));
Semantics\SpeculationAnalyzerTests.cs (1)
524protected override bool ReplacementChangesSemantics(SyntaxNode initialNode, SyntaxNode replacementNode, SemanticModel initialModel)
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (4)
156var model = bindingtuples.Item2; 252var model = comp40.GetSemanticModel(comp40.SyntaxTrees.First()); 340var model = bindingtuples.Item2; 422var 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)
291var semanticModel = bodyCompilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
74var semanticModel = compilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (272)
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); 3386var model = comp.GetSemanticModel(tree); 3892var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8164var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8240var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8318var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8379var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8450var 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\CodeGenForEachTests.cs (1)
1751var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
CodeGen\CodeGenFunctionPointersTests.cs (17)
3052var model = comp.GetSemanticModel(syntaxTree); 3104var model = comp.GetSemanticModel(syntaxTree); 3329var model = comp.GetSemanticModel(syntaxTree); 3400var model = comp.GetSemanticModel(syntaxTree); 3447var model = comp.GetSemanticModel(syntaxTree); 3558var model = comp.GetSemanticModel(tree); 3610var model = comp.GetSemanticModel(tree); 3661var model = comp.GetSemanticModel(tree); 3700var model = comp.GetSemanticModel(tree); 4105var model = comp.GetSemanticModel(syntaxTree); 4907var model = comp.GetSemanticModel(syntaxTree); 7400var model = comp.GetSemanticModel(tree); 7502var model = comp.GetSemanticModel(tree); 7558var model = allInCoreLib.GetSemanticModel(tree); 7627var model = allInCoreLib.GetSemanticModel(tree); 7714var model = comp1.GetSemanticModel(tree); 10755var 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)
5251var model = result.Compilation.GetSemanticModel(tree); 5539var model = compilation.GetSemanticModel(tree); 5577var model = compilation.GetSemanticModel(tree);
CodeGen\CodeGenRefLocalTests.cs (3)
3255var model = comp.GetSemanticModel(tree); 3292var model = comp.GetSemanticModel(tree); 3326var model = comp.GetSemanticModel(tree);
CodeGen\CodeGenTupleEqualityTests.cs (36)
359var model = comp.Compilation.GetSemanticModel(tree); 701var model = comp.Compilation.GetSemanticModel(tree); 732var model = comp.Compilation.GetSemanticModel(tree); 789var model = comp.GetSemanticModel(tree); 811var model = comp.GetSemanticModel(tree); 873var model = comp.GetSemanticModel(tree); 921var model = comp.GetSemanticModel(tree); 970var model = comp.GetSemanticModel(tree); 1020var model = comp.GetSemanticModel(tree); 1074var model = comp.GetSemanticModel(tree); 1108var model = comp.GetSemanticModel(tree); 1140var model = comp.GetSemanticModel(tree); 1171var model = comp.GetSemanticModel(tree); 1231var model = comp.GetSemanticModel(tree); 1331var model = comp.GetSemanticModel(tree); 1417var model = comp.GetSemanticModel(tree); 1482var model = comp.GetSemanticModel(tree); 1515var model = comp.GetSemanticModel(tree); 1576var model = comp.GetSemanticModel(tree); 1613var model = comp.GetSemanticModel(tree); 1638var model = comp.GetSemanticModel(tree); 1693var model = comp.GetSemanticModel(tree); 1795var model = comp.GetSemanticModel(tree); 1937var model = comp.GetSemanticModel(tree); 2592var model = comp.GetSemanticModel(tree); 2660var model = comp.GetSemanticModel(tree); 3297var model = comp.GetSemanticModel(tree); 3703var model = comp.GetSemanticModel(tree); 3827var model = comp.GetSemanticModel(tree); 3930var model = comp.GetSemanticModel(tree); 4055var model = comp.GetSemanticModel(tree); 4102var model = comp.GetSemanticModel(tree); 4203var model = comp.GetSemanticModel(tree); 4296var model = comp.GetSemanticModel(tree); 5141var model = comp.GetSemanticModel(tree); 5177var 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); 3457var model = compilation.GetSemanticModel(tree); 3629var model = compilation.GetSemanticModel(tree); 3680var model = compilation.GetSemanticModel(tree); 3926var model = compilation.GetSemanticModel(tree); 3983var model = compilation.GetSemanticModel(tree); 4016var model = compilation.GetSemanticModel(tree); 4148var model = compilation.GetSemanticModel(tree); 4833var model = comp.GetSemanticModel(tree); 5069var model = comp.GetSemanticModel(tree); 5113var model = comp.GetSemanticModel(tree); 5154var model = comp.GetSemanticModel(tree); 5198var model = comp.GetSemanticModel(tree); 5467var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 7502var model = comp.GetSemanticModel(tree); 7535var model = comp.GetSemanticModel(tree); 7572var model = comp.GetSemanticModel(tree); 7635var model = comp.GetSemanticModel(tree); 8296var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8327var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8382var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8411var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8440var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8488var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8522var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8555var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8584var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8631var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8666var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8695var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8724var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8754var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8809var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8839var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8898var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8945var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9018var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9075var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9147var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9228var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9311var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 9859var model = comp.GetSemanticModel(tree); 9910var model = comp.GetSemanticModel(tree); 9952var model = comp.GetSemanticModel(tree); 9998var model = comp.GetSemanticModel(tree); 10064var model = comp.GetSemanticModel(tree); 10103var model = comp.GetSemanticModel(tree); 10137var model = comp.GetSemanticModel(tree); 12697var model = c.GetSemanticModel(tree); 13978var model = c.GetSemanticModel(tree); 14249var model = c.GetSemanticModel(tree); 14437var model = comp.GetSemanticModel(tree); 16544var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 16571var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 16608var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17215var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17276var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17335var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17373var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17406var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 17439var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 19067var model = comp.GetSemanticModel(tree); 19106var model = comp.GetSemanticModel(tree); 19145var model = comp.GetSemanticModel(tree); 19184var model = comp.GetSemanticModel(tree); 19234var model = comp.GetSemanticModel(tree); 19296var model = comp.GetSemanticModel(tree); 19399var model = comp.GetSemanticModel(tree); 19430var model = comp.GetSemanticModel(tree); 19484var model = comp.GetSemanticModel(tree); 19542var model = comp.GetSemanticModel(tree); 19665var model = comp.GetSemanticModel(tree); 19709var model = comp.GetSemanticModel(tree); 19740var model = comp.GetSemanticModel(tree); 20362var model = comp.GetSemanticModel(tree); 21351var model = comp.GetSemanticModel(tree); 22886var model = compilation.GetSemanticModel(tree); 24217var model = compilation.GetSemanticModel(tree); 24296var model = comp.GetSemanticModel(tree); 24359var model = comp.GetSemanticModel(tree); 24423var model = comp.GetSemanticModel(tree); 24496var model = comp.GetSemanticModel(tree); 24569var model = comp.GetSemanticModel(tree); 24643var model = comp.GetSemanticModel(tree); 25061var model = comp.GetSemanticModel(tree); 25089var model = comp.GetSemanticModel(tree); 25120var model = comp.GetSemanticModel(tree); 25740var model = comp.GetSemanticModel(tree); 25811var model = comp.GetSemanticModel(tree); 25876var model = comp.GetSemanticModel(tree); 25918var model = comp.GetSemanticModel(tree); 25948var model = comp.GetSemanticModel(tree); 26260var model = comp.GetSemanticModel(tree); 26332var model = comp.GetSemanticModel(tree); 26365var model = comp.GetSemanticModel(tree); 26398var model = comp.GetSemanticModel(tree); 26431var model = comp.GetSemanticModel(tree); 27604var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
CodeGen\GotoTest.cs (2)
1038var model = CreateCompilationWithMscorlib45(new[] { tree }).GetSemanticModel(tree, ignoreAccessibility: false); 1051var model = CreateCompilationWithMscorlib45(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); 3533var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
CodeGen\PatternTests.cs (3)
5011var model = compilation.GetSemanticModel(tree); 5137var model = compilation.GetSemanticModel(tree); 5286var model = compilation.GetSemanticModel(tree);
Emit\EntryPointTests.cs (1)
1597var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (444)
Attributes\AttributeTests.cs (14)
710var semanticModel = comp.GetSemanticModel(tree); 751var semanticModel = comp.GetSemanticModel(tree); 755Assert.True(semanticModel.TryGetSpeculativeSemanticModel(attrSyntax.ArgumentList.Position, newAttrSyntax, out var speculativeModel)); 816var semanticModel = comp.GetSemanticModel(tree); 820Assert.True(semanticModel.TryGetSpeculativeSemanticModel(interpolationSyntax.Position, newAttrSyntax, out var speculativeModel)); 857var semanticModel = comp.GetSemanticModel(tree); 861Assert.True(semanticModel.TryGetSpeculativeSemanticModel(attrSyntax.ArgumentList.Position, newAttrSyntax, out var speculativeModel)); 898var semanticModel = comp.GetSemanticModel(tree); 902Assert.True(semanticModel.TryGetSpeculativeSemanticModel(attrSyntax.ArgumentList.Position, newAttrSyntax, out var speculativeModel)); 937var semanticModel = comp.GetSemanticModel(tree); 941Assert.True(semanticModel.TryGetSpeculativeSemanticModel(attrSyntax.Position, newAttrSyntax, out var speculativeModel)); 5419var model = cm.GetSemanticModel(cm.SyntaxTrees[0]); 7239var semanticModel = compilation.GetSemanticModel(tree); 7280var semanticModel = compilation.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)
5677var model = compilation.GetSemanticModel(tree); 9462var model = comp.GetSemanticModel(tree); 9511var model = comp.GetSemanticModel(tree); 9567var model = comp2.GetSemanticModel(tree); 11260var model = comp.GetSemanticModel(tree); 11285var model = comp.GetSemanticModel(tree); 11316var model = comp.GetSemanticModel(tree);
Diagnostics\DiagnosticAnalyzerTests.cs (11)
3253var semanticModel1 = compilation.GetSemanticModel(tree1); 3510var model = compilation.GetSemanticModel(tree); 3591var semanticModel1 = compilation.GetSemanticModel(tree1); 3658var semanticModel = compilation.GetSemanticModel(tree); 3719var semanticModel = compilation.GetSemanticModel(tree); 3952var model = compilation.GetSemanticModel(tree); 3962private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _cache = new ConcurrentDictionary<SyntaxTree, SemanticModel>(); 3964public override SemanticModel GetSemanticModel(SyntaxTree tree, Compilation compilation, bool ignoreAccessibility = false) 3969public void VerifyCachedModel(SyntaxTree tree, SemanticModel model) 4102var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true);
Diagnostics\GetDiagnosticsTests.cs (11)
43var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 78var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 93var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 171var model = compilation.GetSemanticModel(tree1); 220var model = compilation.GetSemanticModel(tree1); 257var model = compilation.GetSemanticModel(tree); 610var model = compilation.GetSemanticModel(tree, true); 663var model = compilation.GetSemanticModel(tree, true); 718var semanticModel = compilation.GetSemanticModel(syntaxTree); 997var semanticModel = compilation.GetSemanticModel(syntaxTree); 1128var model1 = compilation.GetSemanticModel(tree1);
Emit\NumericIntPtrTests.cs (15)
698var model = comp.GetSemanticModel(tree); 1882var model = comp.GetSemanticModel(tree); 1934var model = comp.GetSemanticModel(tree); 5974var model = comp.GetSemanticModel(tree); 6210var model = comp.GetSemanticModel(tree); 6583var model = comp.GetSemanticModel(tree); 6817var model = comp.GetSemanticModel(tree); 8091var model = comp.GetSemanticModel(tree); 10512var model = comp.GetSemanticModel(tree); 10651var model = comp.GetSemanticModel(tree); 11142var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 11165var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 11193var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 11218var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 11263var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
FlowAnalysis\FlowTestBase.cs (10)
107protected T CompileAndGetModelAndConstructorInitializer<T>(string program, Func<SemanticModel, ConstructorInitializerSyntax, T> analysisDelegate, params MetadataReference[] references) 111var model = comp.GetSemanticModel(tree); 128protected T CompileAndGetModelAndPrimaryConstructorInitializer<T>(string program, Func<SemanticModel, PrimaryConstructorBaseTypeSyntax, T> analysisDelegate, params MetadataReference[] references) 132var model = comp.GetSemanticModel(tree); 149protected T CompileAndGetModelAndExpression<T>(string program, Func<SemanticModel, ExpressionSyntax, T> analysisDelegate, params MetadataReference[] references) 153var model = comp.GetSemanticModel(tree); 170protected T CompileAndGetModelAndStatements<T>(string program, Func<SemanticModel, StatementSyntax, StatementSyntax, T> analysisDelegate) 174var model = comp.GetSemanticModel(tree); 243protected IEnumerable<T> CompileAndGetModelAndMultipleExpressions<T>(string program, Func<SemanticModel, ExpressionSyntax, T> analysisDelegate, int treeindex = 0, int which = -1) 254protected 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 (16)
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);
Semantics\PatternMatchingTestBase.cs (15)
65protected static void VerifyModelForDeclarationOrVarSimplePattern(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 70protected static void VerifyModelForDeclarationOrVarSimplePatternWithoutDataFlow(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 76SemanticModel model, 131private static void AssertTypeInfo(SemanticModel model, TypeSyntax typeSyntax, ITypeSymbol expectedType) 140protected static void VerifyModelForDeclarationOrVarPatternDuplicateInSameScope(SemanticModel model, SingleVariableDesignationSyntax designation) 166protected static void VerifyModelForDuplicateVariableDeclarationInSameScope(SemanticModel model, VariableDeclaratorSyntax declarator) 178SemanticModel model, 191protected static void VerifyNotAPatternField(SemanticModel model, IdentifierNameSyntax reference) 201protected static void VerifyNotAPatternLocal(SemanticModel model, IdentifierNameSyntax reference) 215protected static void VerifyNotInScope(SemanticModel model, IdentifierNameSyntax reference) 223SemanticModel model, 231SemanticModel model, 239SemanticModel model, 362SemanticModel model, 406protected static void VerifyModelNotSupported(SemanticModel model, params IdentifierNameSyntax[] references)
Semantics\PatternMatchingTests.cs (53)
693var model = compilation.GetSemanticModel(tree); 737var model = compilation.GetSemanticModel(tree); 777var model = compilation.GetSemanticModel(tree); 843var model = compilation.GetSemanticModel(tree); 890var model = compilation.GetSemanticModel(tree); 1152var model = compilation.GetSemanticModel(tree); 1221var model = compilation.GetSemanticModel(tree); 1271var model = compilation.GetSemanticModel(tree); 1315var model = compilation.GetSemanticModel(tree); 1430var model = compilation.GetSemanticModel(tree); 1480var model = compilation.GetSemanticModel(tree); 1537var model = compilation.GetSemanticModel(tree); 1589var model = compilation.GetSemanticModel(tree); 1654var model = compilation.GetSemanticModel(tree); 1731var model = compilation.GetSemanticModel(tree); 1784var model = compilation.GetSemanticModel(tree); 1828var model = compilation.GetSemanticModel(tree); 1882var model = compilation.GetSemanticModel(tree); 1936var model = compilation.GetSemanticModel(tree); 1993var model = compilation.GetSemanticModel(tree); 2031var model = compilation.GetSemanticModel(tree); 2077var model = compilation.GetSemanticModel(tree); 2131var model = compilation.GetSemanticModel(tree); 2179var model = compilation.GetSemanticModel(tree); 2235var model = compilation.GetSemanticModel(tree); 2295var model = compilation.GetSemanticModel(tree); 2353var model = compilation.GetSemanticModel(tree); 2414var model = compilation.GetSemanticModel(tree); 2459var model = compilation.GetSemanticModel(tree); 2498var model = compilation.GetSemanticModel(tree); 2542var model = compilation.GetSemanticModel(tree); 2614var model = compilation.GetSemanticModel(tree); 2662var model = compilation.GetSemanticModel(tree); 2700var model = compilation.GetSemanticModel(tree); 2745var model = compilation.GetSemanticModel(tree); 2789var model = compilation.GetSemanticModel(tree); 2841var model = compilation.GetSemanticModel(tree); 2883var model = compilation.GetSemanticModel(tree); 3038var model = compilation.GetSemanticModel(tree); 3085var model = compilation.GetSemanticModel(tree); 3264var model = compilation.GetSemanticModel(tree); 3443var model1 = compilation.GetSemanticModel(tree); 3456var model2 = compilation.GetSemanticModel(tree); 3478var model = compilation.GetSemanticModel(tree); 4248var model = compilation.GetSemanticModel(tree); 4289var model = compilation.GetSemanticModel(tree); 4790var model = compilation.GetSemanticModel(tree); 4826var model = compilation.GetSemanticModel(tree); 6572var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 11360var model = comp.GetSemanticModel(tree); 11384var model = comp.GetSemanticModel(tree); 11405var model = comp.GetSemanticModel(tree); 11462var 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)
3320var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3646var model = compilation.GetSemanticModel(tree); 3691var model = compilation.GetSemanticModel(tree); 3721var model = compilation.GetSemanticModel(tree); 4087var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4174var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4251var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4365var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4407var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 4417var model = compilation.GetSemanticModel(tree); 4558var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false);
Semantics\PatternMatchingTests_Scope.cs (115)
203var model = compilation.GetSemanticModel(tree); 284var model = compilation.GetSemanticModel(tree); 330var model = compilation.GetSemanticModel(tree); 371var model = compilation.GetSemanticModel(tree); 401var model = compilation.GetSemanticModel(tree); 588var model = compilation.GetSemanticModel(tree); 676var model = compilation.GetSemanticModel(tree); 706var model = compilation.GetSemanticModel(tree); 858var model = compilation.GetSemanticModel(tree); 945var model = compilation.GetSemanticModel(tree); 975var model = compilation.GetSemanticModel(tree); 1156var model = compilation.GetSemanticModel(tree); 1249var model = compilation.GetSemanticModel(tree); 1279var model = compilation.GetSemanticModel(tree); 1519var model = compilation.GetSemanticModel(tree); 1819var model = compilation.GetSemanticModel(tree); 2070var model = compilation.GetSemanticModel(tree); 2216var model = compilation.GetSemanticModel(tree); 2352var model = compilation.GetSemanticModel(tree); 2417var model = compilation.GetSemanticModel(tree); 2480var model = compilation.GetSemanticModel(tree); 2550var model = compilation.GetSemanticModel(tree); 2706var model = compilation.GetSemanticModel(tree); 2789var model = compilation.GetSemanticModel(tree); 2985var model = compilation.GetSemanticModel(tree); 3154var model = compilation.GetSemanticModel(tree); 3269var model = compilation.GetSemanticModel(tree); 3358var model = compilation.GetSemanticModel(tree); 3446var model = compilation.GetSemanticModel(tree); 3533var model = compilation.GetSemanticModel(tree); 3609var model = compilation.GetSemanticModel(tree); 3706var model = compilation.GetSemanticModel(tree); 3797var model = compilation.GetSemanticModel(tree); 3887var model = compilation.GetSemanticModel(tree); 3979var model = compilation.GetSemanticModel(tree); 4075var model = compilation.GetSemanticModel(tree); 4221var model = compilation.GetSemanticModel(tree); 4503var model = compilation.GetSemanticModel(tree); 4903var model = compilation.GetSemanticModel(tree); 5212var model = compilation.GetSemanticModel(tree); 5305var model = compilation.GetSemanticModel(tree); 5335var model = compilation.GetSemanticModel(tree); 5500var model = compilation.GetSemanticModel(tree); 5707var model = compilation.GetSemanticModel(tree); 5914var model = compilation.GetSemanticModel(tree); 6023var model = compilation.GetSemanticModel(tree); 6104var model = compilation.GetSemanticModel(tree); 6187var model = compilation.GetSemanticModel(tree); 6274var model = compilation.GetSemanticModel(tree); 6348var model = compilation.GetSemanticModel(tree); 6418var model = compilation.GetSemanticModel(tree); 6465var model = compilation.GetSemanticModel(tree); 6518var model = compilation.GetSemanticModel(tree); 6588var model = compilation.GetSemanticModel(tree); 6677var model = compilation.GetSemanticModel(tree); 6753var model = compilation.GetSemanticModel(tree); 6828var model = compilation.GetSemanticModel(tree); 6878var model = compilation.GetSemanticModel(tree); 6928var model = compilation.GetSemanticModel(tree); 7085var model = compilation.GetSemanticModel(tree); 7175var model = compilation.GetSemanticModel(tree); 7205var model = compilation.GetSemanticModel(tree); 7407var model = compilation.GetSemanticModel(tree); 7498var model = compilation.GetSemanticModel(tree); 7528var model = compilation.GetSemanticModel(tree); 7722var model = compilation.GetSemanticModel(tree); 7951var model = compilation.GetSemanticModel(tree); 8201var model = compilation.GetSemanticModel(tree); 8441var model = compilation.GetSemanticModel(tree); 8673var model = compilation.GetSemanticModel(tree); 8989var model = compilation.GetSemanticModel(tree); 9132var model = compilation.GetSemanticModel(tree); 9304var model = compilation.GetSemanticModel(tree); 9513var model = compilation.GetSemanticModel(tree); 9604var model = compilation.GetSemanticModel(tree); 9634var model = compilation.GetSemanticModel(tree); 9799var model = compilation.GetSemanticModel(tree); 9928var model = compilation.GetSemanticModel(tree); 10076var model = compilation.GetSemanticModel(tree); 10164var model = compilation.GetSemanticModel(tree); 10197var model = compilation.GetSemanticModel(tree); 10366var model = compilation.GetSemanticModel(tree); 10587var model = compilation.GetSemanticModel(tree); 10683var model = compilation.GetSemanticModel(tree); 10713var model = compilation.GetSemanticModel(tree); 11000var model = compilation.GetSemanticModel(tree); 11130var model = compilation.GetSemanticModel(tree); 11178var model = compilation.GetSemanticModel(tree); 11228var model = compilation.GetSemanticModel(tree); 11271var model = compilation.GetSemanticModel(tree); 11314var model = compilation.GetSemanticModel(tree); 11360var model = compilation.GetSemanticModel(tree); 11403var model = compilation.GetSemanticModel(tree); 11805var model = compilation.GetSemanticModel(tree); 11902var model = compilation.GetSemanticModel(tree); 11991var model = compilation.GetSemanticModel(tree); 12089var model = compilation.GetSemanticModel(tree); 12140var model = compilation.GetSemanticModel(tree); 12202var model = compilation.GetSemanticModel(tree); 12246var model = compilation.GetSemanticModel(tree); 12441var model = compilation.GetSemanticModel(tree); 12594var model = compilation.GetSemanticModel(tree); 12784var model = compilation.GetSemanticModel(tree); 12905var model = compilation.GetSemanticModel(tree); 12997var model = compilation.GetSemanticModel(tree); 13179var model = compilation.GetSemanticModel(tree); 13322var model = compilation.GetSemanticModel(tree); 13396var model = compilation.GetSemanticModel(tree); 13484var model = compilation.GetSemanticModel(tree); 13561var model = compilation.GetSemanticModel(tree); 13640var model = compilation.GetSemanticModel(tree); 13707var model = compilation.GetSemanticModel(tree); 13737var model = compilation.GetSemanticModel(tree); 13772var model = comp.GetSemanticModel(tree); 13969var model = compilation.GetSemanticModel(tree);
Semantics\PatternMatchingTests2.cs (9)
726var model = compilation.GetSemanticModel(tree); 733var model = compilation.GetSemanticModel(tree); 2028var gotModel = model.TryGetSpeculativeSemanticModel(returnStatement.Location.SourceSpan.Start, modifiedReturnStatement, out var speculativeModel); 2069var gotModel = model.TryGetSpeculativeSemanticModel(returnStatement.Location.SourceSpan.Start, modifiedReturnStatement, out var speculativeModel); 2162var model = compilation.GetSemanticModel(tree); 2254var model = compilation.GetSemanticModel(tree); 2298var model = compilation.GetSemanticModel(tree); 2344var model = compilation.GetSemanticModel(tree); 2887var 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 (1)
1010var model = compilation.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)
1512var model = compilation.GetSemanticModel(tree); 1895var model = compilation.GetSemanticModel(tree); 1930var model = compilation.GetSemanticModel(tree); 3249var model = compilation.GetSemanticModel(tree); 3280var model = compilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Features (490)
AbstractAssignOutParametersCodeFixProvider.cs (2)
38var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 99var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AddImport\CSharpAddImportFeatureService.cs (12)
233SemanticModel semanticModel, 241SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 247SemanticModel semanticModel, 294SemanticModel semanticModel, 356var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 422SemanticModel semanticModel, 440SemanticModel semanticModel, 495SemanticModel semanticModel, 516SemanticModel semanticModel, 559SemanticModel semanticModel, 606protected override bool IsViableExtensionMethod(IMethodSymbol method, SyntaxNode expression, SemanticModel semanticModel, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken) 629protected override bool IsAddMethodContext(SyntaxNode node, SemanticModel semanticModel)
AddInheritdocCodeFixProvider.cs (1)
56SemanticModel? semanticModel = null;
AnalyzedPattern.cs (1)
60if (operation.SemanticModel.TryGetSpeculativeSemanticModel(typeSyntax.SpanStart, dummyStatement, out var speculativeModel))
ArgumentFixer.cs (1)
29protected override SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, ArgumentListSyntax newArgumentList)
AttributeArgumentFixer.cs (1)
29protected override SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, AttributeArgumentListSyntax newArgumentList)
BraceCompletion\LessAndGreaterThanBraceCompletionService.cs (1)
71var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false);
ChangeSignature\CSharpChangeSignatureService.cs (4)
144var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 404var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 571private static bool IsParamsArrayExpanded(SemanticModel semanticModel, SyntaxNode node, SymbolInfo symbolInfo, CancellationToken cancellationToken) 846var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
64var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
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 (3)
85var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 272private static List<string> GetReservedNames(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 305SemanticModel semanticModel,
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (2)
145var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 373var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (3)
29protected abstract TypeSyntax FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken); 30protected abstract TypeStyleResult AnalyzeTypeName(TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken); 48var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\UseExplicitOrImplicitType\UseExplicitTypeCodeRefactoringProvider.cs (2)
34protected override TypeSyntax FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 37protected override TypeStyleResult AnalyzeTypeName(TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken)
CodeRefactorings\UseExplicitOrImplicitType\UseImplicitTypeCodeRefactoringProvider.cs (2)
33protected override TypeSyntax FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 36protected override TypeStyleResult AnalyzeTypeName(TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (12)
60var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 73private static Func<SyntaxNode, SyntaxNode>? GetReplacementFunc(SyntaxNode? node, SemanticModel model) 95private static Func<SyntaxNode, SyntaxNode>? CombineLogicalAndOperands(BinaryExpressionSyntax logicalAnd, SemanticModel model) 144private static Func<SyntaxNode, SyntaxNode>? CombineWhenClauseCondition(PatternSyntax switchPattern, ExpressionSyntax condition, SemanticModel model) 288SemanticModel model) 312SemanticModel model, 351static (ExpressionSyntax Expression, ExpressionSyntax Constant, bool Flipped)? TryDetermineConstant(BinaryExpressionSyntax node, SemanticModel model) 401SemanticModel model) 429static bool TryGetInnermostReceiver(ExpressionSyntax node, ArrayBuilder<IdentifierNameSyntax> builder, [NotNullWhen(true)] out ExpressionSyntax? receiver, SemanticModel model) 455private static ExpressionSyntax? GetInnermostReceiver(ExpressionSyntax node, ArrayBuilder<IdentifierNameSyntax> builder, SemanticModel model) 459static bool CanConvertToSubpattern(IdentifierNameSyntax name, SemanticModel model) 552var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (5)
90var semanticModel = await document.ReuseExistingSpeculativeModelAsync(attributeSyntax, cancellationToken).ConfigureAwait(false); 154CompletionContext context, SemanticModel semanticModel, 177CompletionContext context, SemanticModel semanticModel, SyntaxToken token, AttributeSyntax attributeSyntax, ISet<string> existingNamedParameters) 219SemanticModel semanticModel, 235SemanticModel semanticModel,
Completion\CompletionProviders\AwaitCompletionProvider.cs (1)
98protected override ITypeSymbol? GetTypeSymbolOfExpression(SemanticModel semanticModel, SyntaxNode potentialAwaitableExpression, CancellationToken cancellationToken)
Completion\CompletionProviders\CrefCompletionProvider.cs (8)
93protected override async Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync( 110var semanticModel = await document.ReuseExistingSpeculativeModelAsync( 169SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 184SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 215QualifiedCrefSyntax parent, SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 241SemanticModel semanticModel, ImmutableArray<ISymbol> symbols, SyntaxToken token, int position, ImmutableDictionary<string, string> options) 266SemanticModel semanticModel, ISymbol symbol, SyntaxToken token, int position, StringBuilder builder, 283SemanticModel semanticModel,
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (2)
51var semanticModel = await document.ReuseExistingSpeculativeModelAsync(token.Parent, cancellationToken).ConfigureAwait(false); 113private static bool IsLambdaExpression(SemanticModel semanticModel, SyntaxTree tree, int position, SyntaxToken token, ITypeInferenceService typeInferrer, CancellationToken cancellationToken)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (19)
80var semanticModel = await document.ReuseExistingSpeculativeModelAsync(token.SpanStart, cancellationToken).ConfigureAwait(false); 107SyntaxToken token, SemanticModel semanticModel, 121SyntaxToken token, SemanticModel semanticModel, 145private static bool IsPossibleOutVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 178SyntaxToken token, SemanticModel semanticModel, 202private static bool IsPropertyDeclaration(SyntaxToken token, SemanticModel semanticModel, 216private static bool IsMethodDeclaration(SyntaxToken token, SemanticModel semanticModel, 232SemanticModel semanticModel, 281SemanticModel semanticModel, 292SemanticModel semanticModel, 321private static bool IsFieldDeclaration(SyntaxToken token, SemanticModel semanticModel, 332private static bool IsIncompleteMemberDeclaration(SyntaxToken token, SemanticModel semanticModel, 343private static bool IsLocalFunctionDeclaration(SyntaxToken token, SemanticModel semanticModel, 354private static bool IsLocalVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 399private static bool IsEmbeddedVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 412private static bool IsForEachVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 444private static bool IsPrimaryConstructorParameter(SyntaxToken token, SemanticModel semanticModel, 464private static bool IsParameterDeclaration(SyntaxToken token, SemanticModel semanticModel, 476private static bool IsPatternMatching(SyntaxToken token, SemanticModel semanticModel,
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (2)
70private ImmutableArray<ImmutableArray<string>> GetBaseNames(SemanticModel semanticModel, NameDeclarationInfo nameInfo) 284private static void AddNamesFromExistingOverloads(CSharpSyntaxContext context, SemanticModel semanticModel,
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (3)
74var semanticModel = syntaxContext.SemanticModel; 108CompletionContext context, SemanticModel semanticModel, SyntaxToken token, ITypeSymbol type, bool isParams, CancellationToken cancellationToken) 270SemanticModel semanticModel, SyntaxToken token,
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.cs (1)
73var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
108var semanticModel = context.SemanticModel;
Completion\CompletionProviders\FunctionPointerUnmanagedCallingConventionCompletionProvider.cs (2)
74var semanticModel = await document.ReuseExistingSpeculativeModelAsync(callingConventionList, cancellationToken).ConfigureAwait(false); 94private static void AddTypes(HashSet<CompletionItem> completionItems, int contextPosition, SemanticModel semanticModel, CancellationToken cancellationToken)
Completion\CompletionProviders\ImportCompletion\ImportCompletionProviderHelper.cs (1)
70var model = await globalUsingDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (7)
82var semanticModel = await document.ReuseExistingSpeculativeModelAsync(argumentList, cancellationToken).ConfigureAwait(false); 152SemanticModel semanticModel, 169SemanticModel semanticModel, 185SemanticModel semanticModel, 208SemanticModel semanticModel, 232SemanticModel semanticModel, 251SemanticModel semanticModel,
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (3)
85var semanticModel = await document.ReuseExistingSpeculativeModelAsync(expression, cancellationToken).ConfigureAwait(false); 109Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 146private static ITypeSymbol? GetInitializedType(SyntaxToken token, Document document, SemanticModel semanticModel, CancellationToken cancellationToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (2)
115var semanticModel = syntaxContext.SemanticModel; 124CompletionContext context, int position, SemanticModel semanticModel, ImmutableArray<ISymbol> unnamedSymbols, CancellationToken cancellationToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (1)
39private static void AddConversion(CompletionContext context, SemanticModel semanticModel, int position, IMethodSymbol conversion)
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
55public override bool TryDetermineReturnType(SyntaxToken startToken, SemanticModel semanticModel, CancellationToken cancellationToken, out ITypeSymbol? returnType, out SyntaxToken nextToken)
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
141protected override string GetDisplayText(IMethodSymbol method, SemanticModel semanticModel, int position)
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (4)
59var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false); 100static ITypeSymbol? GetMemberAccessType(ITypeSymbol? type, ExpressionSyntax? expression, Document document, SemanticModel semanticModel, int position) 119static ITypeSymbol? GetMemberType(ITypeSymbol? type, string name, Document document, SemanticModel semanticModel, int position) 136static ImmutableArray<ISymbol> GetCandidatePropertiesAndFields(Document document, SemanticModel semanticModel, int position, ITypeSymbol? type)
Completion\CompletionProviders\SnippetCompletionProvider.cs (2)
105var semanticModel = context.SemanticModel; 150CompletionContext context, SolutionServices services, SemanticModel semanticModel, bool isPreProcessorContext)
Completion\CompletionProviders\SpeculativeTCompletionProvider.cs (1)
113private static int WalkOutOfGenericType(SyntaxTree syntaxTree, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
Completion\CompletionProviders\TupleNameCompletionProvider.cs (1)
50var semanticModel = context.SemanticModel;
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
69var semanticModel = await document.ReuseExistingSpeculativeModelAsync(attachedToken.Parent, cancellationToken).ConfigureAwait(false);
Completion\Providers\ContextVariableArgumentProvider.cs (1)
28protected override bool IsInstanceContext(SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken)
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
56SemanticModel model, ForEachInfo foreachInfo, SyntaxEditor editor, CancellationToken cancellationToken)
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (1)
39public 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)
42SemanticModel semanticModel, 56private readonly SemanticModel _semanticModel; 62public Converter(SemanticModel semanticModel, ISemanticFactsService semanticFacts, QueryExpressionSyntax source, CancellationToken cancellationToken)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (5)
38var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 98SemanticModel semanticModel, 154SemanticModel semanticModel, 238SemanticModel semanticModel, 248SemanticModel semanticModel,
ConvertProgram\ConvertToTopLevelStatementsCodeRefactoringProvider.cs (1)
52var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertProgramAnalysis_TopLevelStatements.cs (1)
45SemanticModel semanticModel,
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
78var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (3)
23private readonly SemanticModel _semanticModel; 29private Rewriter(SemanticModel semanticModel, bool isAllThrowStatements, CancellationToken cancellationToken) 38SemanticModel model,
ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (2)
33SemanticModel semanticModel, 82private (VariableDeclaratorSyntax, ISymbol)? TryGetVariableDeclaratorAndSymbol(SemanticModel semanticModel)
ConvertToRecordEngine.cs (2)
37var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 85var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
56var semanticModel = context.SemanticModel;
CSharpAddExplicitCastCodeFixProvider.cs (1)
58SemanticModel semanticModel,
CSharpAddParameterCodeFixProvider.cs (2)
53protected override ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken) 57SemanticModel semanticModel,
CSharpAddYieldCodeFixProvider.cs (6)
56var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 92SemanticModel model, ExpressionSyntax? expression, [NotNullWhen(true)] out ITypeSymbol? returnExpressionType) 106SyntaxNode node, SemanticModel model, CancellationToken cancellationToken, 120private bool IsCorrectTypeForYieldReturn(ITypeSymbol typeArgument, ITypeSymbol returnExpressionType, ITypeSymbol methodReturnType, SemanticModel model) 154private bool CanConvertTypes(ITypeSymbol typeArgument, ITypeSymbol returnExpressionType, SemanticModel model) 193private static bool IsCorrectTypeForYieldReturn(ITypeSymbol methodReturnType, SemanticModel model)
CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
64var semanticModel = context.SemanticModel;
CSharpAsAndNullCheckCodeFixProvider.cs (2)
48var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 85SemanticModel semanticModel,
CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (3)
18private readonly SemanticModel _semanticModel; 27SemanticModel semanticModel, 52SemanticModel semanticModel,
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
81var semanticModel = syntaxContext.SemanticModel; 268SemanticModel semanticModel, 316SemanticModel semanticModel,
CSharpChangeToIEnumerableCodeFixProvider.cs (2)
44var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 119SemanticModel model,
CSharpConvertToAsyncMethodCodeFixProvider.cs (3)
37SemanticModel semanticModel, 49SemanticModel semanticModel, 66SemanticModel semanticModel,
CSharpConvertTypeOfToNameOfCodeFixProvider.cs (1)
30protected override SyntaxNode GetSymbolTypeExpression(SemanticModel model, MemberAccessExpressionSyntax node, CancellationToken cancellationToken)
CSharpDeclarationComputer.cs (4)
23SemanticModel model, 35SemanticModel model, 57SemanticModel model, 361SemanticModel model,
CSharpDeclareAsNullableCodeFixProvider.cs (7)
51var model = await context.Document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 61private static string GetEquivalenceKey(SyntaxNode node, SemanticModel model) 69static bool IsRemoteApiUsage(SyntaxNode node, SemanticModel model) 106var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 115protected override bool IncludeDiagnosticDuringFixAll(Diagnostic diagnostic, Document document, SemanticModel model, string? equivalenceKey, CancellationToken cancellationToken) 122SyntaxEditor editor, SemanticModel model, SyntaxNode node, HashSet<TypeSyntax> alreadyHandled, CancellationToken cancellationToken) 133SemanticModel model, SyntaxNode node, CancellationToken cancellationToken)
CSharpDisambiguateSameVariableCodeFixProvider.cs (3)
49var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 57SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken, 143var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpFixReturnTypeCodeFixProvider.cs (2)
80var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 159private static ITypeSymbol? InferTupleType(TupleExpressionSyntax tuple, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpForEachCastCodeFixProvider.cs (1)
27SemanticModel semanticModel, CommonForEachStatementSyntax forEachStatement)
CSharpForEachCastDiagnosticAnalyzer.cs (1)
27SemanticModel semanticModel, CommonForEachStatementSyntax node)
CSharpInlineDeclarationCodeFixProvider.cs (5)
109CSharpCodeFixOptionsProvider options, SemanticModel semanticModel, 336SemanticModel semanticModel, 367topmostContainer.SpanStart, updatedTopmostContainer, out var speculativeModel)) 396SemanticModel semanticModel, 398out SemanticModel speculativeModel)
CSharpInlineDeclarationDiagnosticAnalyzer.cs (3)
124var semanticModel = context.SemanticModel; 244SemanticModel semanticModel, 322SemanticModel semanticModel,
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
101var semanticModel = syntaxContext.SemanticModel;
CSharpMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
21protected override bool IsWrittenTo(SemanticModel semanticModel, ThisExpressionSyntax expression, CancellationToken cancellationToken)
CSharpMakeMemberRequiredCodeFixProvider.cs (1)
59var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
127var semanticModel = blockOperation.SemanticModel; 154SemanticModel semanticModel,
CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
49var semanticModel = context.SemanticModel;
CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
65var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
26protected override bool IsUnnecessaryCast(SemanticModel model, ExpressionSyntax cast, CancellationToken cancellationToken)
CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
47var semanticModel = context.SemanticModel;
CSharpRemoveUnnecessaryExpressionParenthesesDiagnosticAnalyzer.cs (2)
29SemanticModel semanticModel, CancellationToken cancellationToken, 38ParenthesizedExpressionSyntax parenthesizedExpression, SemanticModel semanticModel, CancellationToken cancellationToken,
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (4)
63var semanticModel = context.SemanticModel; 185var rewrittenSemanticModel = analyzer.SpeculativeSemanticModel; 219SemanticModel semanticModel1, 221SemanticModel semanticModel2,
CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
311private SyntaxTreeState GetOrCreateSyntaxTreeState(SyntaxTree tree, bool defaultCompleted, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpRemoveUnnecessaryParenthesesCodeFixProvider.cs (1)
26protected override bool CanRemoveParentheses(SyntaxNode current, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpRemoveUnnecessaryPatternParenthesesDiagnosticAnalyzer.cs (1)
29SemanticModel semanticModel, CancellationToken cancellationToken,
CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
42var semanticModel = context.SemanticModel;
CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
95protected override SyntaxNode TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel)
CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
52var semanticModel = await context.Document.GetRequiredSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 83SemanticModel semanticModel,
CSharpSimplifyConditionalDiagnosticAnalyzer.cs (1)
25protected override CommonConversion GetConversion(SemanticModel semanticModel, ExpressionSyntax node, CancellationToken cancellationToken)
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
55var semanticModel = context.SemanticModel;
CSharpUseAutoPropertyAnalyzer.cs (4)
46HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken) 54SemanticModel semanticModel, 100SemanticModel semanticModel, MemberAccessExpressionSyntax memberAccess, ConcurrentSet<IFieldSymbol> ineligibleFields, CancellationToken cancellationToken) 188IMethodSymbol setMethod, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
25protected override bool IsTargetTyped(SemanticModel semanticModel, ConditionalExpressionSyntax conditional, CancellationToken cancellationToken)
CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
48var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (3)
57var semanticModel = context.SemanticModel; 122var semanticModel = context.SemanticModel; 185SemanticModel semanticModel,
CSharpUseDeconstructionCodeFixProvider.cs (1)
63SemanticModel semanticModel,
CSharpUseDeconstructionDiagnosticAnalyzer.cs (6)
88SemanticModel semanticModel, 118SemanticModel semanticModel, 133SemanticModel semanticModel, 200SemanticModel semanticModel, INamedTypeSymbol tupleType, 245SemanticModel semanticModel, SyntaxNode searchScope, ILocalSymbol local, 286SemanticModel semanticModel, SyntaxNode container, CancellationToken cancellationToken)
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
64var semanticModel = context.SemanticModel;
CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
198var semanticModel = instance.SemanticModel;
CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (2)
53var semanticModel = context.SemanticModel; 71SemanticModel semanticModel, ExpressionSyntax left, ExpressionSyntax right)
CSharpUseLocalFunctionCodeFixProvider.cs (2)
58var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 132SemanticModel semanticModel,
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
82var semanticModel = syntaxContext.SemanticModel; 202SemanticModel semanticModel, INamedTypeSymbol? expressionTypeOpt, ISymbol local, BlockSyntax block, 356SemanticModel semanticModel,
CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
56var semanticModel = context.SemanticModel;
CSharpUseNotPatternCodeFixProvider.cs (2)
43var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 52SemanticModel semanticModel,
CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
88var semanticModel = operation.SemanticModel;
CSharpUseNullPropagationDiagnosticAnalyzer.cs (1)
39protected override bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol? expressionTypeOpt, CancellationToken cancellationToken)
CSharpUsePatternCombinatorsCodeFixProvider.cs (2)
82var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 117var semanticModel = p.Target.SemanticModel;
CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
72var semanticModel = context.SemanticModel;
CSharpUseRangeOperatorCodeFixProvider.cs (1)
67SemanticModel semanticModel, SyntaxNode currentRoot,
CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
84var semanticModel = operation.SemanticModel;
CSharpUseThrowExpressionDiagnosticAnalyzer.cs (1)
30protected override bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol? expressionTypeOpt, CancellationToken cancellationToken)
CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
110var semanticModel = syntaxContext.SemanticModel;
Debugging\CSharpProximityExpressionsService.cs (1)
63var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Debugging\DataTipInfoGetter.cs (1)
80var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\Analyzers\CSharpPreferFrameworkTypeDiagnosticAnalyzer.cs (1)
32protected override bool IsIdentifierNameReplaceableWithFrameworkType(SemanticModel semanticModel, IdentifierNameSyntax node)
Diagnostics\Analyzers\CSharpSimplifyTypeNamesDiagnosticAnalyzer.cs (3)
52var semanticModel = context.SemanticModel; 63var semanticModel = context.SemanticModel; 78SemanticModel model, SyntaxNode node, CSharpSimplifierOptions options,
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (2)
45private readonly SemanticModel _semanticModel; 75public TypeSyntaxSimplifierWalker(CSharpSimplifyTypeNamesDiagnosticAnalyzer analyzer, SemanticModel semanticModel, CSharpSimplifierOptions options, SimpleIntervalTree<TextSpan, TextSpanIntervalIntrospector>? ignoredSpans, CancellationToken cancellationToken)
Diagnostics\CSharpAnalyzerDriverService.cs (1)
27SemanticModel model,
DocumentHighlighting\CSharpDocumentHighlightsService.cs (2)
56var semanticModel = (SemanticModel?)null;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (8)
178protected override ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model, SyntaxNode memberBody) 198protected override IEnumerable<SyntaxNode> GetVariableUseSites(IEnumerable<SyntaxNode> roots, ISymbol localOrParameter, SemanticModel model, CancellationToken cancellationToken) 1248SemanticModel? oldModel, 1249SemanticModel newModel, 1430SemanticModel model, 1488internal override IMethodSymbol GetLambdaExpressionSymbol(SemanticModel model, SyntaxNode lambdaExpression, CancellationToken cancellationToken) 1497internal override bool QueryClauseLambdasTypeEquivalent(SemanticModel oldModel, SyntaxNode oldNode, SemanticModel newModel, SyntaxNode newNode, CancellationToken cancellationToken)
EncapsulateField\CSharpEncapsulateFieldService.cs (2)
90var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 130var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ExternalAccess\Pythia\Api\IPythiaDeclarationNameRecommenderImplmentation.cs (1)
30public 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)
25SemanticModel semanticModel,
ExternalAccess\Pythia\PythiaSignatureHelpProvider.cs (1)
37SemanticModel semanticModel,
ExtractMethod\CSharpMethodExtractor.Analyzer.cs (2)
93protected override ITypeSymbol GetRangeVariableType(SemanticModel model, IRangeVariableSymbol symbol) 135protected override ITypeSymbol GetSymbolType(SemanticModel semanticModel, ISymbol symbol)
ExtractMethod\CSharpMethodExtractor.cs (1)
189var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (4)
164var semanticModel = SemanticDocument.SemanticModel; 550var semanticModel = SemanticDocument.SemanticModel; 795var semanticModel = originalDocument.SemanticModel; 839var semanticModel = SemanticDocument.SemanticModel;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
50var semanticModel = SemanticDocument.SemanticModel;
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (2)
21private readonly SemanticModel _semanticModel; 24public PostProcessor(SemanticModel semanticModel, int contextPosition)
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (2)
60var model = SemanticDocument.SemanticModel; 94private static ITypeSymbol? GetRegularExpressionType(SemanticModel semanticModel, ExpressionSyntax node)
ExtractMethod\CSharpSelectionResult.StatementResult.cs (1)
74var semanticModel = SemanticDocument.SemanticModel;
ExtractMethod\CSharpSelectionValidator.cs (2)
46var model = SemanticDocument.SemanticModel; 163SemanticModel semanticModel,
ExtractMethod\CSharpSelectionValidator.Validator.cs (2)
15public static bool Check(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 42private static bool CheckExpression(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken)
Formatting\CSharpAccessibilityModifiersNewDocumentFormattingProvider.cs (1)
39var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateConstructor\CSharpGenerateConstructorService.cs (5)
58var semanticModel = document.SemanticModel; 176protected override string GenerateNameForExpression(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 179protected override ITypeSymbol GetArgumentType(SemanticModel semanticModel, Argument argument, CancellationToken cancellationToken) 185protected override IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 188protected override IMethodSymbol GetDelegatedConstructor(SemanticModel semanticModel, IMethodSymbol constructor, CancellationToken cancellationToken)
GenerateMember\GenerateParameterizedMember\CSharpGenerateConversionService.cs (2)
53protected override bool AreSpecialOptionsActive(SemanticModel semanticModel) 56protected override bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel)
GenerateMember\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (3)
38protected override bool AreSpecialOptionsActive(SemanticModel semanticModel) 41protected override bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel) 44public override ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken)
GenerateMember\GenerateParameterizedMember\CSharpGenerateMethodService.cs (4)
45protected override bool AreSpecialOptionsActive(SemanticModel semanticModel) 48protected override bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel) 66var semanticModel = document.SemanticModel; 156SemanticModel semanticModel,
GenerateMember\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (2)
61var semanticModel = Document.SemanticModel; 80var semanticModel = Document.SemanticModel;
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (2)
70var semanticModel = document.SemanticModel; 196protected override bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot)
GenerateType\CSharpGenerateTypeService.cs (13)
57SemanticModel semanticModel, 196var semanticModel = document.SemanticModel; 446private static IMethodSymbol GetMethodSymbolIfPresent(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 476SemanticModel semanticModel, 485SemanticModel semanticModel, 494SemanticModel semanticModel, 522SemanticModel semanticModel, IList<ArgumentSyntax> arguments, CancellationToken cancellationToken) 533protected override INamedTypeSymbol DetermineTypeToGenerateIn(SemanticModel semanticModel, SimpleNameSyntax simpleName, CancellationToken cancellationToken) 536protected override Accessibility GetAccessibility(State state, SemanticModel semanticModel, bool intoNamespace, CancellationToken cancellationToken) 561protected override ITypeSymbol DetermineArgumentType(SemanticModel semanticModel, ArgumentSyntax argument, CancellationToken cancellationToken) 571var semanticModel = await selectedDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 813SemanticModel semanticModel, 856SemanticModel semanticModel,
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
26protected override int? GetTargetPositionIfControlFlow(SemanticModel semanticModel, SyntaxToken token)
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (2)
58var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 243var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (2)
72var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 94SemanticModel semanticModel, INamedTypeSymbol interfaceType,
ImplementInterface\CSharpImplementInterfaceCodeFixProvider.cs (1)
54var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ImplementInterface\CSharpImplementInterfaceService.cs (1)
38Document document, SemanticModel model, SyntaxNode node, CancellationToken cancellationToken,
InlineHints\CSharpInlineParameterNameHintsService.cs (3)
34SemanticModel semanticModel, 51SemanticModel semanticModel, 69SemanticModel semanticModel,
InlineHints\CSharpInlineTypeHintsService.cs (1)
28SemanticModel semanticModel,
IntroduceVariable\CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
98var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
293var semanticModel = syntaxContext.SemanticModel;
LanguageServices\CSharpStructuralTypeDisplayService.cs (1)
33INamedTypeSymbol anonymousType, SemanticModel semanticModel, int position)
LanguageServices\CSharpSymbolDisplayService.cs (1)
18protected override AbstractSymbolDescriptionBuilder CreateDescriptionBuilder(SemanticModel semanticModel, int position, SymbolDescriptionOptions options, CancellationToken cancellationToken)
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (3)
42SemanticModel semanticModel, 116protected override ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format) 193var semanticModel = GetSemanticModel(equalsValue.SyntaxTree);
MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeRefactoringProvider.cs (1)
40var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
MakeLocalFunctionStaticCodeFixHelper.cs (1)
50var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
50var semanticModel = context.SemanticModel;
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)
MakeRefStructCodeFixProvider.cs (1)
54var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
NavigationBar\CSharpNavigationBarItemService.cs (3)
117var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 122private static IEnumerable<INamedTypeSymbol> GetTypesInFile(SemanticModel semanticModel, CancellationToken cancellationToken) 166private static ISymbol? GetType(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken)
NullableImpactingSpanWalker.cs (2)
19private readonly SemanticModel _semanticModel; 42SemanticModel semanticModel,
Organizing\CSharpOrganizingService.Rewriter.cs (2)
20private readonly SemanticModel _semanticModel; 23public Rewriter(CSharpOrganizingService treeOrganizer, IEnumerable<ISyntaxOrganizer> organizers, SemanticModel semanticModel, CancellationToken cancellationToken)
PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
89var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
PositionalParameterInfo.cs (1)
38SemanticModel semanticModel,
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
126var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
78protected 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)
41SemanticModel semanticModel, 61SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods, 114SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods, 231SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods, 239SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods) 279private static TNode ReplaceReferencesToParameterWithValue<TNode>(SemanticModel semanticModel, IParameterSymbol parameter, TNode node) 288private readonly SemanticModel _semanticModel; 291public Rewriter(SemanticModel semanticModel, IParameterSymbol parameter)
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (2)
68var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 86SemanticModel semanticModel, VariableDeclaratorSyntax variable,
SignatureHelp\AbstractCSharpSignatureHelpProvider.cs (2)
61SemanticModel semanticModel, 78protected IList<TaggedText> GetAwaitableUsage(IMethodSymbol method, SemanticModel semanticModel, int position)
SignatureHelp\AbstractCSharpSignatureHelpProvider.LightweightOverloadResolution.cs (3)
25SemanticModel semanticModel, 51SemanticModel semanticModel, 76SemanticModel semanticModel,
SignatureHelp\AbstractOrdinaryMethodSignatureHelpProvider.cs (3)
21SemanticModel semanticModel) 30SemanticModel semanticModel, 50SemanticModel semanticModel,
SignatureHelp\AttributeSignatureHelpProvider.cs (4)
81var semanticModel = await document.ReuseExistingSpeculativeModelAsync(attribute, cancellationToken).ConfigureAwait(false); 131SemanticModel semanticModel, 158SemanticModel semanticModel, 216SemanticModel semanticModel,
SignatureHelp\ConstructorInitializerSignatureHelpProvider.cs (3)
80var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 144SemanticModel semanticModel, 163SemanticModel semanticModel,
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (5)
60var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 181SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken, 199int position, SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken, 227SemanticModel semanticModel, 246SemanticModel semanticModel)
SignatureHelp\GenericNameSignatureHelpProvider.cs (4)
93var semanticModel = await document.ReuseExistingSpeculativeModelAsync(simpleName, cancellationToken).ConfigureAwait(false); 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)
14SemanticModel semanticModel,
SignatureHelp\InitializerExpressionSignatureHelpProvider.cs (1)
72var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (2)
80var semanticModel = await document.ReuseExistingSpeculativeModelAsync(invocationExpression, cancellationToken).ConfigureAwait(false); 136var semanticModel = await document.ReuseExistingSpeculativeModelAsync(invocationExpression, cancellationToken).ConfigureAwait(false);
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (4)
20InvocationExpressionSyntax invocationExpression, SemanticModel semanticModel, ISymbol within, 40private static IList<SignatureHelpItem> GetDelegateOrFunctionPointerInvokeItems(InvocationExpressionSyntax invocationExpression, IMethodSymbol invokeMethod, SemanticModel semanticModel, IStructuralTypeDisplayService structuralTypeDisplayService, IDocumentationCommentFormattingService documentationCommentFormattingService, out int? selectedItem, CancellationToken cancellationToken) 59private static IList<SymbolDisplayPart> GetDelegateOrFunctionPointerInvokePreambleParts(IMethodSymbol invokeMethod, SemanticModel semanticModel, int position) 81IMethodSymbol invokeMethod, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formattingService, CancellationToken cancellationToken)
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs (2)
24SemanticModel semanticModel, 37SemanticModel semanticModel,
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (2)
78var semanticModel = await document.ReuseExistingSpeculativeModelAsync(objectCreationExpression, cancellationToken).ConfigureAwait(false); 125var semanticModel = await document.ReuseExistingSpeculativeModelAsync(objectCreationExpression, cancellationToken).ConfigureAwait(false);
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider_DelegateType.cs (3)
19SemanticModel semanticModel, 37private static IList<SymbolDisplayPart> GetDelegateTypePreambleParts(IMethodSymbol invokeMethod, SemanticModel semanticModel, int position) 47private static IList<SignatureHelpSymbolParameter> GetDelegateTypeParameters(IMethodSymbol invokeMethod, SemanticModel semanticModel, int position)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider_NormalType.cs (2)
22SemanticModel semanticModel, 42SemanticModel semanticModel,
SignatureHelp\PrimaryConstructorBaseTypeSignatureHelpProvider.cs (3)
80var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 123SemanticModel semanticModel, 141SemanticModel semanticModel,
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (5)
110var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 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\AbstractCSharpAutoPropertySnippetProvider.cs (1)
44var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Snippets\AbstractCSharpTypeSnippetProvider.cs (1)
47var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false);
Snippets\CSharpClassSnippetProvider.cs (1)
35var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Snippets\CSharpConstructorSnippetProvider.cs (1)
37var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false);
Snippets\CSharpElseSnippetProvider.cs (1)
36var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false);
Snippets\CSharpEnumSnippetProvider.cs (1)
34var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
40var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Snippets\CSharpInterfaceSnippetProvider.cs (1)
37var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Snippets\CSharpSnippetFunctionService.cs (1)
45var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Snippets\CSharpStructSnippetProvider.cs (1)
35var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
UseExplicitTypeCodeFixProvider.cs (4)
90var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 135var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 149SemanticModel semanticModel, 221private static ITypeSymbol GetConvertedType(SemanticModel semanticModel, SyntaxNode typeSyntax, CancellationToken cancellationToken)
UseExplicitTypeForConstCodeFixProvider.cs (1)
49var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (3)
170var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 176SemanticModel semanticModel, SyntaxNode root, SyntaxNode declaration, 256var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
UseExpressionBodyCodeFixProvider.cs (2)
59var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 78SemanticModel semanticModel, SyntaxEditor editor, Diagnostic diagnostic,
UseExpressionBodyForAccessorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, AccessorDeclarationSyntax declaration)
UseExpressionBodyForConstructorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConstructorDeclarationSyntax declaration) => false;
UseExpressionBodyForConversionOperatorsHelper.cs (1)
50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConversionOperatorDeclarationSyntax declaration)
UseExpressionBodyForIndexersHelper.cs (2)
63protected override IndexerDeclarationSyntax WithGenerateBody(SemanticModel semanticModel, IndexerDeclarationSyntax declaration) 66protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, IndexerDeclarationSyntax declaration) => true;
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (2)
187var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 204var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
UseExpressionBodyForLambdaCodeActionHelpers.cs (4)
18internal static LambdaExpressionSyntax Update(SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration) 22SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration) 51SemanticModel semanticModel, LambdaExpressionSyntax originalDeclaration, LambdaExpressionSyntax currentDeclaration, ExpressionSyntax expressionBody) 74SemanticModel semanticModel, LambdaExpressionSyntax declaration)
UseExpressionBodyForLambdaCodeFixProvider.cs (2)
55var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 68SyntaxEditor editor, SemanticModel semanticModel,
UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
68SemanticModel semanticModel, CodeStyleOption2<ExpressionBodyPreference> option,
UseExpressionBodyForLambdaHelpers.cs (1)
20SemanticModel semanticModel, ExpressionBodyPreference preference,
UseExpressionBodyForLocalFunctionHelper.cs (1)
54SemanticModel semanticModel, LocalFunctionStatementSyntax statement)
UseExpressionBodyForMethodsHelper.cs (1)
54SemanticModel semanticModel, MethodDeclarationSyntax declaration)
UseExpressionBodyForOperatorsHelper.cs (1)
52protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, OperatorDeclarationSyntax declaration)
UseExpressionBodyForPropertiesHelper.cs (2)
63protected override PropertyDeclarationSyntax WithGenerateBody(SemanticModel semanticModel, PropertyDeclarationSyntax declaration) 66protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, PropertyDeclarationSyntax declaration) => true;
UseExpressionBodyHelper.cs (1)
30public abstract SyntaxNode Update(SemanticModel semanticModel, SyntaxNode declaration, bool useExpressionBody);
UseExpressionBodyHelper`1.cs (5)
75public sealed override SyntaxNode Update(SemanticModel semanticModel, SyntaxNode declaration, bool useExpressionBody) 224public TDeclaration Update(SemanticModel semanticModel, TDeclaration declaration, bool useExpressionBody) 255protected abstract bool CreateReturnStatementForExpression(SemanticModel semanticModel, TDeclaration declaration); 263protected virtual TDeclaration WithGenerateBody(SemanticModel semanticModel, TDeclaration declaration) 278protected TDeclaration WithAccessorList(SemanticModel semanticModel, TDeclaration declaration)
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
36protected override bool IsImplicitIndexOrRangeIndexer(ImmutableArray<IParameterSymbol> parameters, TSyntax argument, SemanticModel semanticModel)
UsePatternMatching\CSharpIsAndCastCheckWithoutNameCodeFixProvider.cs (2)
59var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 65var updatedSemanticModel = CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.ReplaceMatches(
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (6)
69var semanticModel = context.SemanticModel; 109SemanticModel semanticModel, 160var updatedSemanticModel = ReplaceMatches( 175SemanticModel updatedSemanticModel, CancellationToken cancellationToken) 185public static SemanticModel ReplaceMatches( 186SemanticModel semanticModel, BinaryExpressionSyntax isExpression,
UseSimpleUsingStatementDiagnosticAnalyzer.cs (4)
80var semanticModel = context.SemanticModel; 129SemanticModel semanticModel, BlockSyntax parentBlock, 155SemanticModel semanticModel, 205SemanticModel semanticModel,
UseUtf8StringLiteralCodeFixProvider.cs (2)
49var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 94private static IArrayCreationOperation GetArrayCreationOperation(SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken)
UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
86var semanticModel = context.Operation.SemanticModel;
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (34)
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 (5)
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);
IOperation\IOperationTests_IConversionExpression.cs (2)
5211var model = compilation.GetSemanticModel(tree); 5275var semanticModel = compilation.GetSemanticModel(finalSyntax.SyntaxTree);
IOperation\IOperationTests_IFieldReferenceExpression.cs (1)
705var model = comp.GetSemanticModel(syntaxTree);
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)
1179var semanticModel = compilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1479)
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)
1088var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 1165var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 1213var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 1266var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]);
Semantics\BindingAsyncTests.cs (2)
56var model = compilation.GetSemanticModel(tree); 85var model = compilation.GetSemanticModel(tree);
Semantics\BindingTests.cs (16)
2331var model = comp.GetSemanticModel(tree); 2350var model = comp.GetSemanticModel(tree); 2687var model = compilation.GetSemanticModel(tree); 2743var model = compilation.GetSemanticModel(tree); 2798var model = compilation.GetSemanticModel(tree); 2854var model = compilation.GetSemanticModel(tree); 2891var model = comp.GetSemanticModel(tree); 2933var model = comp.GetSemanticModel(tree); 3002var model = comp.GetSemanticModel(tree); 3082var model = comp.GetSemanticModel(tree); 3155var model = comp.GetSemanticModel(tree); 3240var model = comp.GetSemanticModel(tree); 3345var model = comp.GetSemanticModel(tree); 3470var model = comp.GetSemanticModel(tree); 3651var model = comp.GetSemanticModel(tree); 3677var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true);
Semantics\ColorColorTests.cs (19)
589var model = comp.GetSemanticModel(tree); 634var model = comp.GetSemanticModel(tree); 725var model = comp.GetSemanticModel(tree); 1063var model = comp.GetSemanticModel(tree); 1109var model = comp.GetSemanticModel(tree); 1155var model = comp.GetSemanticModel(tree); 1200var model = comp.GetSemanticModel(tree); 1241var model = comp.GetSemanticModel(tree); 1278var model = comp.GetSemanticModel(tree); 1814var semanticModel = comp.GetSemanticModel(syntaxTree, false); 1841var model = comp.GetSemanticModel(tree); 1880var model1 = compilation.GetSemanticModel(tree); 1890var model2 = compilation.GetSemanticModel(tree); 1937var model1 = compilation.GetSemanticModel(tree); 1947var model2 = compilation.GetSemanticModel(tree); 1994var model1 = compilation.GetSemanticModel(tree); 2004var model2 = compilation.GetSemanticModel(tree); 2044var model1 = compilation.GetSemanticModel(tree); 2053var model2 = compilation.GetSemanticModel(tree);
Semantics\ConditionalOperatorTests.cs (4)
1268var model = comp.GetSemanticModel(tree); 1325var model = compilation.GetSemanticModel(tree); 1381var model = compilation.GetSemanticModel(tree); 1426var model = compilation.GetSemanticModel(tree);
Semantics\ConstantTests.cs (1)
3501var 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); 4171var model = comp.GetSemanticModel(tree); 4239var model = comp.GetSemanticModel(tree); 4374var model = comp.GetSemanticModel(tree); 4508var model = comp.GetSemanticModel(tree); 4666var model = comp.GetSemanticModel(tree); 4724var model = comp1.GetSemanticModel(tree); 4760var model = comp.GetSemanticModel(tree); 4838var model = comp.GetSemanticModel(tree); 4943var model = comp.GetSemanticModel(tree); 4989var model = comp.GetSemanticModel(tree); 5047var model = comp.GetSemanticModel(tree); 5188var model = comp.GetSemanticModel(tree); 5332var model = comp.GetSemanticModel(tree); 5479var model = comp.GetSemanticModel(tree); 5656var model = comp.GetSemanticModel(tree); 5766var model = comp.GetSemanticModel(tree); 5879var model = comp.GetSemanticModel(tree); 5988var model = comp.GetSemanticModel(tree); 6031var model = comp.GetSemanticModel(tree); 6071var model = comp.GetSemanticModel(tree); 6113var model = comp.GetSemanticModel(tree); 6153var model = comp.GetSemanticModel(tree); 6556var model = comp.GetSemanticModel(tree);
Semantics\DelegateTypeTests.cs (23)
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); 1218var model = comp.GetSemanticModel(tree); 1313var model = comp.GetSemanticModel(tree); 1408var model = comp.GetSemanticModel(tree); 1822var model = comp.GetSemanticModel(tree); 5312var model = comp.GetSemanticModel(tree); 5335var model = comp.GetSemanticModel(tree); 7670var model = comp.GetSemanticModel(tree); 7680static (string?, string?, string?) getVariableInfo(SemanticModel model, VariableDeclaratorSyntax variable) 8368var model = comp.GetSemanticModel(tree); 8455var model = comp.GetSemanticModel(tree); 9369var model = comp.GetSemanticModel(syntaxTree); 9377static void speculate(SemanticModel? model, int position, string text, string expectedDelegateType) 11041private static void VerifyLocalDelegateType(SemanticModel model, VariableDeclaratorSyntax variable, string expectedInvokeMethod) 11059private static void VerifyExpressionType(SemanticModel model, ExpressionSyntax variable, string expectedSymbol, string expectedInvokeMethod) 11393var model = comp.GetSemanticModel(tree); 11440var model = comp.GetSemanticModel(tree); 11453static void verifyConversions(SemanticModel model, ExpressionSyntax expr, ITypeSymbol destination, ConversionKind expectedImplicitKind, ConversionKind expectedExplicitKind)
Semantics\DynamicTests.cs (5)
3548var model = verifier.Compilation.GetSemanticModel(tree); 3581var model = verifier.Compilation.GetSemanticModel(tree); 3609var model = verifier.Compilation.GetSemanticModel(tree); 3637var model = verifier.Compilation.GetSemanticModel(tree); 3688var model = verifier.Compilation.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 (4)
2126var model = comp.GetSemanticModel(tree); 2178var model = comp.GetSemanticModel(tree); 2882var model = comp.GetSemanticModel(tree); 3363var model = compilation.GetSemanticModel(tree);
Semantics\FunctionPointerTests.cs (47)
177var model = comp.GetSemanticModel(tree); 186static void assertResult(SemanticModel model, ExpressionSyntax initializer1, Compilation comp) 269var model = comp.GetSemanticModel(tree); 327var model = comp.GetSemanticModel(tree); 378var model = comp.GetSemanticModel(tree); 430var model = comp.GetSemanticModel(tree); 478var model = comp.GetSemanticModel(tree); 576var model = comp.GetSemanticModel(tree); 815var model = comp.GetSemanticModel(tree); 858var model = comp.GetSemanticModel(tree); 877private static void VerifyDeclarationConversion(CSharpCompilation comp, SemanticModel model, VariableDeclaratorSyntax decl, ConversionKind expectedConversionKind, bool expectedImplicit, string expectedOriginalType, string expectedConvertedType, string expectedOperationTree) 918var model = comp.GetSemanticModel(tree); 954var model = comp.GetSemanticModel(tree); 1022var model = comp.GetSemanticModel(tree); 1102var model = comp.GetSemanticModel(tree); 1247var model = comp.GetSemanticModel(tree); 1342var model = comp.GetSemanticModel(tree); 1483var model = comp.GetSemanticModel(tree); 1540var model = comp.GetSemanticModel(tree); 1591var model = comp.GetSemanticModel(tree); 1639var model = comp.GetSemanticModel(tree); 1672var model = comp.GetSemanticModel(tree); 1705var model = comp.GetSemanticModel(tree); 1751var model = comp.GetSemanticModel(tree); 1799var model = comp.GetSemanticModel(tree); 1832var model = comp.GetSemanticModel(tree); 1865var model = comp.GetSemanticModel(tree); 1912var model = comp.GetSemanticModel(tree); 2031var model = comp.GetSemanticModel(tree); 2064var model = comp.GetSemanticModel(tree); 2201var model = comp.GetSemanticModel(tree); 2258var model = comp.GetSemanticModel(tree); 2331var model = comp.GetSemanticModel(tree); 2405var model = comp.GetSemanticModel(tree); 2473var model = comp.GetSemanticModel(tree); 2570var model = comp.GetSemanticModel(tree); 2643var model = comp.GetSemanticModel(tree); 3155var model = comp.GetSemanticModel(tree); 3274var model = comp.GetSemanticModel(tree); 3353var model = comp.GetSemanticModel(syntaxTree); 3410var model = comp.GetSemanticModel(syntaxTree); 3452var model = comp.GetSemanticModel(syntaxTree); 3505var model = comp.GetSemanticModel(syntaxTree); 3559var model = comp.GetSemanticModel(syntaxTree); 3654var model = comp.GetSemanticModel(syntaxTree); 3782var model = comp.GetSemanticModel(syntaxTree); 3927var 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)
66var model = comp.GetSemanticModel(tree); 92var model = comp.GetSemanticModel(tree);
Semantics\ImplicitObjectCreationTests.cs (24)
55var model = comp.GetSemanticModel(tree); 130var model = comp.GetSemanticModel(tree); 177var model = comp.GetSemanticModel(tree); 227var model = comp.GetSemanticModel(tree); 841var model = comp.GetSemanticModel(tree); 882var model = comp.GetSemanticModel(tree); 1705var model = comp.GetSemanticModel(tree); 1865var model = comp.GetSemanticModel(tree); 1895var model = comp.GetSemanticModel(tree); 1925var model = comp.GetSemanticModel(tree); 1977var model = comp.GetSemanticModel(tree); 2035var model = comp.GetSemanticModel(tree); 2070var model = comp.GetSemanticModel(tree); 2124var model = comp.GetSemanticModel(tree); 2216var model = comp.GetSemanticModel(tree); 2513var model = comp.GetSemanticModel(tree); 2564var model = comp.GetSemanticModel(tree); 2921var model = comp.GetSemanticModel(tree); 3214var model = comp.GetSemanticModel(tree); 4156var model = comp.GetSemanticModel(tree); 4183var model = comp.GetSemanticModel(tree); 4190bool success = model.TryGetSpeculativeSemanticModel(nodeLocation, modifiedNode, out var speculativeModel); 4529var semanticModel = compilation.GetSemanticModel(tree); 4572var semanticModel = compilation.GetSemanticModel(tree);
Semantics\IndexAndRangeTests.cs (9)
895var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 915var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 936var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1119var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1248var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1281var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1314var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1338var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 1381var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true);
Semantics\InitOnlyMemberTests.cs (5)
2514var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 3133var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 3139SemanticModel speculativeModel; 3185var model = comp.GetSemanticModel(tree); 4130var 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\InterpolationTests.cs (2)
4571var model = comp.GetSemanticModel(tree); 4797var model = comp.GetSemanticModel(tree);
Semantics\IteratorTests.cs (3)
332var model = comp.GetSemanticModel(tree); 482var model = comp.GetSemanticModel(tree); 520var model = comp.GetSemanticModel(tree);
Semantics\LambdaDiscardParametersTests.cs (8)
69var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 110private static void VerifyDiscardParameterSymbol(ParameterSyntax underscore, string expectedType, CodeAnalysis.NullableAnnotation expectedAnnotation, SemanticModel model) 385var model = comp.GetSemanticModel(tree); 418var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 447var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 481var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 512var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 567var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
Semantics\LambdaTests.cs (61)
835var model = comp.GetSemanticModel(tree); 935var model = compilation.GetSemanticModel(tree); 1027var model = compilation.GetSemanticModel(tree); 1081var model = compilation.GetSemanticModel(tree); 1116var model = compilation.GetSemanticModel(tree); 1172var model = comp.GetSemanticModel(tree); 1200var model = comp.GetSemanticModel(tree); 1232var model = comp.GetSemanticModel(tree); 1513var semanticModel = compilation.GetSemanticModel(tree); 1548var semanticModel = compilation.GetSemanticModel(tree); 1582var semanticModel = compilation.GetSemanticModel(tree); 1614var semanticModel = compilation.GetSemanticModel(tree); 1973var model = compilation.GetSemanticModel(tree); 2115var sm = compilation.GetSemanticModel(tree); 2161var sm = compilation.GetSemanticModel(tree); 2207var sm = compilation.GetSemanticModel(tree); 2253var sm = compilation.GetSemanticModel(tree); 2299var sm = compilation.GetSemanticModel(tree); 2329var sm = compilation.GetSemanticModel(tree); 2356var sm = compilation.GetSemanticModel(tree); 2410var sm = compilation.GetSemanticModel(tree); 2456var sm = compilation.GetSemanticModel(tree); 2502var sm = compilation.GetSemanticModel(tree); 2535var sm = compilation.GetSemanticModel(tree); 2568var sm = compilation.GetSemanticModel(tree); 2605var sm = compilation.GetSemanticModel(tree); 2657var sm = compilation.GetSemanticModel(tree); 2995var model = comp.GetSemanticModel(tree); 3037var model = comp.GetSemanticModel(tree); 3607var model = comp.GetSemanticModel(tree); 3876var model = comp.GetSemanticModel(tree); 3920var model = comp.GetSemanticModel(tree); 3960var model = comp.GetSemanticModel(tree); 4076var model = comp.GetSemanticModel(tree); 4105var model = comp.GetSemanticModel(tree); 4140var model = comp.GetSemanticModel(tree); 4168var model = comp.GetSemanticModel(tree); 4195var model = comp.GetSemanticModel(tree); 4770var model = comp.GetSemanticModel(tree); 4855var model = comp.GetSemanticModel(tree); 4883var model = comp.GetSemanticModel(tree); 4910var model = comp.GetSemanticModel(tree); 4938var model = comp.GetSemanticModel(tree); 4984var model = comp.GetSemanticModel(tree); 5598var model = comp.GetSemanticModel(tree); 6184private static LambdaSymbol GetLambdaSymbol(SemanticModel model, LambdaExpressionSyntax syntax) 6471var model = comp.GetSemanticModel(tree); 6781var model = comp.GetSemanticModel(tree); 6810var model = comp.GetSemanticModel(tree); 6862var model = comp.GetSemanticModel(tree); 6978var model = comp.GetSemanticModel(syntaxTree); 7072var model = comp.GetSemanticModel(syntaxTree); 7601var model = comp.GetSemanticModel(tree); 7975var model = comp.GetSemanticModel(tree); 8023var model = comp.GetSemanticModel(tree); 8047var model = comp.GetSemanticModel(tree); 8052Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(m2Syntax.Body.SpanStart, newMethod, out var speculativeModel)); 8083var model = comp.GetSemanticModel(tree); 8195var model = comp.GetSemanticModel(tree); 8299var model = comp.GetSemanticModel(tree); 8324var model = comp.GetSemanticModel(tree);
Semantics\LocalFunctionTests.cs (52)
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); 2569var model = comp.GetSemanticModel(tree); 4603var model = compilation.GetSemanticModel(tree); 4641var model = compilation.GetSemanticModel(tree); 4878var model = compilation.GetSemanticModel(tree); 5021var model = comp.GetSemanticModel(tree); 6277var model = comp.GetSemanticModel(tree); 6298var model = comp.GetSemanticModel(tree); 6326var model = comp.GetSemanticModel(tree); 6362var model = comp.GetSemanticModel(tree); 6406var model = comp.GetSemanticModel(tree); 6453var model = comp.GetSemanticModel(tree); 6955var model = comp.GetSemanticModel(tree); 7015var model = comp.GetSemanticModel(tree); 7264var parentModel = comp.GetSemanticModel(tree); 7281static void VerifyTParameterSpeculation(SemanticModel parentModel, int localFuncPosition, AttributeSyntax attr1, bool found = true) 7283SemanticModel speculativeModel; 7349var parentModel = comp.GetSemanticModel(tree); 7414var parentModel = comp.GetSemanticModel(tree); 7488var parentModel = comp.GetSemanticModel(tree); 7556var model = comp.GetSemanticModel(tree); 8601var model = comp.GetSemanticModel(tree); 8654var model = comp.GetSemanticModel(tree); 8658Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 8696var model = comp.GetSemanticModel(tree); 8844var parentModel = comp.GetSemanticModel(tree); 8862static void VerifyParameterSpeculation(SemanticModel parentModel, int localFuncPosition, AttributeSyntax attr1, bool found = true) 8864SemanticModel speculativeModel; 9352var parentModel = comp.GetSemanticModel(tree); 9473var model = comp.GetSemanticModel(tree); 9670var parentModel = comp.GetSemanticModel(tree); 10093var model = comp.GetSemanticModel(tree);
Semantics\LockTests.cs (7)
43var model = compilation.GetSemanticModel(tree); 486var model = compilation.GetSemanticModel(tree); 548var model = compilation.GetSemanticModel(tree); 572var model = compilation.GetSemanticModel(tree); 602var model = compilation.GetSemanticModel(tree); 626var model = compilation.GetSemanticModel(tree); 696var 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)
699var model = comp.GetSemanticModel(tree); 754var model = comp.GetSemanticModel(tree); 800var model = comp.GetSemanticModel(tree); 838private static void CheckDiscard(SemanticModel model, DiscardDesignationSyntax discard, string type) 848private static void CheckDiscard(SemanticModel model, IdentifierNameSyntax discard, string type) 1044var model = comp.GetSemanticModel(tree); 1074var model = comp.GetSemanticModel(tree); 1116var model = compilation.GetSemanticModel(tree); 1157var model = compilation.GetSemanticModel(tree); 1198var model = compilation.GetSemanticModel(tree);
Semantics\NameOfTests.cs (9)
689var model = compilation.GetSemanticModel(tree); 715var model = compilation.GetSemanticModel(tree); 750var model = compilation.GetSemanticModel(tree); 797var model = compilation.GetSemanticModel(tree); 834var model = compilation.GetSemanticModel(tree); 870var model = compilation.GetSemanticModel(tree); 916var model = compilation.GetSemanticModel(tree); 949var model = compilation.GetSemanticModel(tree); 1117var model = compilation.GetSemanticModel(tree);
Semantics\NativeIntegerTests.cs (19)
1788var model = comp.GetSemanticModel(tree); 2345var model = comp.GetSemanticModel(tree); 2465var model = compB.GetSemanticModel(tree); 3635var model = comp.GetSemanticModel(tree); 4074var model = comp.GetSemanticModel(tree); 4117var model = comp.GetSemanticModel(tree); 6034var model = comp.GetSemanticModel(tree); 6082var model = comp.GetSemanticModel(tree); 9468var model = comp.GetSemanticModel(tree); 9703var model = comp.GetSemanticModel(tree); 10077var model = comp.GetSemanticModel(tree); 10304var model = comp.GetSemanticModel(tree); 12354var model = comp.GetSemanticModel(tree); 15294var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15315var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15338var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15366var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15389var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 15419var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
Semantics\NonTrailingNamedArgumentsTests.cs (15)
43var model = verifier.Compilation.GetSemanticModel(tree); 365var model = comp.GetSemanticModel(tree); 391var model = verifier.Compilation.GetSemanticModel(tree); 421var model = comp.GetSemanticModel(tree); 453var model = comp.GetSemanticModel(tree); 482var model = comp.GetSemanticModel(tree); 532var model = comp.GetSemanticModel(tree); 567var model = comp.GetSemanticModel(tree); 596var model = comp.GetSemanticModel(tree); 650var model = comp.GetSemanticModel(tree); 677var model = comp.GetSemanticModel(tree); 708var model = comp.GetSemanticModel(tree); 742var model = verifier.Compilation.GetSemanticModel(tree); 774var model = verifier.Compilation.GetSemanticModel(tree); 948var 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)
1740var model = comp.GetSemanticModel(tree); 1774var model = comp.GetSemanticModel(tree); 1786private static void VerifyTypeInfo(SemanticModel model, ExpressionSyntax expression, string expectedType, string expectedConvertedType) 1827var model = comp.GetSemanticModel(tree); 1854var model = comp.GetSemanticModel(tree); 1879var model = comp.GetSemanticModel(tree); 1949var model = comp.GetSemanticModel(tree); 2262var model = comp.GetSemanticModel(tree); 2301var model = comp.GetSemanticModel(tree); 2334var model = comp.GetSemanticModel(tree); 2367var model = comp.GetSemanticModel(tree); 2466var model = comp.GetSemanticModel(tree); 3321var sm = compilation.GetSemanticModel(tree); 3680var model = comp.GetSemanticModel(tree); 4513var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 4549var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 4581var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 5158var model = comp.GetSemanticModel(syntaxTree); 10521var model = compilation.GetSemanticModel(tree); 13498var model = compilation.GetSemanticModel(tree); 33044var model = compilation.GetSemanticModel(tree); 33061var model = compilation.GetSemanticModel(tree); 53895var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 53925var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 53958var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 53995var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54030var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54064var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54095var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54123var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54162var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54196var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54227var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54256var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54291var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54327var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54406var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 54438var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 56562var model = comp.GetSemanticModel(tree); 56596var model = comp.GetSemanticModel(tree); 56624var model = comp.GetSemanticModel(tree); 56656var model = comp.GetSemanticModel(tree); 56685var model = comp.GetSemanticModel(tree); 56718var model = comp.GetSemanticModel(tree); 56750var model = comp.GetSemanticModel(tree); 56783var model = comp.GetSemanticModel(tree); 56817var model = comp.GetSemanticModel(tree); 56843var model = comp.GetSemanticModel(tree); 56872var model = comp.GetSemanticModel(tree); 56901var model = comp.GetSemanticModel(tree); 60391var model = comp.GetSemanticModel(syntaxTree); 63423var model1 = comp1.GetSemanticModel(tree1); 63432Assert.True(model1.TryGetSpeculativeSemanticModel(function1.SpanStart, function2, out var model2)); 67834var model = comp.GetSemanticModel(tree); 67870var model = comp.GetSemanticModel(tree); 67911var model = comp.GetSemanticModel(tree); 67948var model = comp.GetSemanticModel(tree); 67985var model = comp.GetSemanticModel(tree); 68020var model = comp.GetSemanticModel(tree); 68053var model = comp.GetSemanticModel(tree); 68090var model = comp.GetSemanticModel(tree); 68364var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 68456var model = comp.GetSemanticModel(tree); 68503var model = comp.GetSemanticModel(tree); 68542var model = comp.GetSemanticModel(tree); 70333var model = comp.GetSemanticModel(tree); 77611var model = comp.GetSemanticModel(tree); 90552var model = comp.GetSemanticModel(syntaxTree); 94027var model = comp.GetSemanticModel(tree); 95356var model = comp.GetSemanticModel(tree); 108040var model = comp.GetSemanticModel(tree); 108094var model = comp.GetSemanticModel(tree); 109463var model = comp.GetSemanticModel(tree); 109864var model = comp.GetSemanticModel(tree); 109895var model = comp.GetSemanticModel(tree); 110073var model = comp.GetSemanticModel(tree); 110298var model = comp.GetSemanticModel(tree); 141089var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141130var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141170var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141208var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141246var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141284var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141317var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141350var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141389var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141664var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141695var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 141728var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 142012var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 142051var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 142091var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 142130var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 142164var model = comp.GetSemanticModel(tree); 142175out var speculativeModel)); 150438var model = comp.GetSemanticModel(tree); 150506var model = comp.GetSemanticModel(tree); 150517private static void VerifyVariableAnnotation(SemanticModel model, VariableDeclaratorSyntax syntax, string expectedDisplay, NullableAnnotation expectedAnnotation) 151640var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 152337var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153172var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153220var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153652var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153688var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153783var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153821var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153862var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153902var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153936var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 153973var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 154068var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 154116var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 154158var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 154195var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 154406var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 156278var model = comp.GetSemanticModel(tree); 156828var model = comp.GetSemanticModel(syntaxTree); 156874var 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 (12)
3450var semanticModel = compilation.GetSemanticModel(tree); 3498var semanticModel = compilation.GetSemanticModel(tree); 3555var semanticModel = compilation.GetSemanticModel(tree); 3591var semanticModel = compilation.GetSemanticModel(tree); 3628var semanticModel = compilation.GetSemanticModel(tree); 3669var semanticModel = compilation.GetSemanticModel(tree); 3719var semanticModel = compilation.GetSemanticModel(tree); 3763var semanticModel = compilation.GetSemanticModel(tree); 3843var semanticModel = compilation.GetSemanticModel(tree); 3925var semanticModel = compilation.GetSemanticModel(tree); 3967var semanticModel = compilation.GetSemanticModel(tree); 4045var semanticModel = compilation.GetSemanticModel(tree);
Semantics\OperatorTests.cs (17)
45var semanticModel = compilation.GetSemanticModel(tree); 2983var model = compilation.GetSemanticModel(tree); 6936var model = comp.GetSemanticModel(tree); 7053var model = comp.GetSemanticModel(tree); 7208var model = comp.GetSemanticModel(tree); 7485var semanticModel = compilation.GetSemanticModel(tree); 7531SemanticModel semanticModel, 7701var semanticModel = compilation.GetSemanticModel(tree); 7854var semanticModel = compilation.GetSemanticModel(tree); 8014var semanticModel = compilation.GetSemanticModel(tree); 8070SemanticModel semanticModel, 8551var semanticModel = compilation.GetSemanticModel(tree); 8586var semanticModel = compilation.GetSemanticModel(tree); 8630var semanticModel = compilation.GetSemanticModel(tree); 8680var semanticModel = compilation.GetSemanticModel(tree); 8754var semanticModel = compilation.GetSemanticModel(tree); 11415var 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); 19593var model = compilation.GetSemanticModel(tree); 19648var model = compilation.GetSemanticModel(tree); 19680var model = compilation.GetSemanticModel(tree); 19723var model = compilation.GetSemanticModel(tree); 19757var model = compilation.GetSemanticModel(tree); 19830var model = compilation.GetSemanticModel(tree); 19863var model = compilation.GetSemanticModel(tree); 19896var model = compilation.GetSemanticModel(tree); 19931var model = compilation.GetSemanticModel(tree); 19966var model = compilation.GetSemanticModel(tree); 20004var model = compilation.GetSemanticModel(tree); 20036var model = compilation.GetSemanticModel(tree); 20210var model = compilation.GetSemanticModel(tree); 20238var model = compilation.GetSemanticModel(tree); 20346var model = compilation.GetSemanticModel(tree); 20603var model = compilation.GetSemanticModel(tree); 20646var model = compilation.GetSemanticModel(tree); 20763var model = compilation.GetSemanticModel(tree); 20816var model = compilation.GetSemanticModel(tree); 20907var model = compilation.GetSemanticModel(tree); 21023var model = compilation.GetSemanticModel(tree); 21118var model = compilation.GetSemanticModel(tree); 21222var model = compilation.GetSemanticModel(tree); 21279var model = compilation.GetSemanticModel(tree); 21347var model = compilation.GetSemanticModel(tree); 21397var model = compilation.GetSemanticModel(tree); 21598var model = compilation.GetSemanticModel(tree); 21757var model = compilation.GetSemanticModel(tree); 21953var model = compilation.GetSemanticModel(tree); 22080var model = compilation.GetSemanticModel(tree); 22178var model = compilation.GetSemanticModel(tree); 22366var model = compilation.GetSemanticModel(tree); 22521var model = compilation.GetSemanticModel(tree); 22600var model = compilation.GetSemanticModel(tree); 22637SemanticModel model, 22655private static void VerifyModelNotSupported(SemanticModel model, params IdentifierNameSyntax[] references) 22723var model = compilation.GetSemanticModel(tree); 22805var model = compilation.GetSemanticModel(tree); 22889var model = compilation.GetSemanticModel(tree); 22956var model = compilation.GetSemanticModel(tree); 22995var model = compilation.GetSemanticModel(tree); 23151var model = compilation.GetSemanticModel(tree); 23245var model = compilation.GetSemanticModel(tree); 23335var model = compilation.GetSemanticModel(tree); 23383var model = compilation.GetSemanticModel(tree); 23416var model = compilation.GetSemanticModel(tree); 23467var model = compilation.GetSemanticModel(tree); 23611var model = compilation.GetSemanticModel(tree); 23709var model = compilation.GetSemanticModel(tree); 23807var model = compilation.GetSemanticModel(tree); 23949var model = compilation.GetSemanticModel(tree); 24053var model = compilation.GetSemanticModel(tree); 24148var model = compilation.GetSemanticModel(tree); 24236var model = compilation.GetSemanticModel(tree); 24342var model = compilation.GetSemanticModel(tree); 24435var model = compilation.GetSemanticModel(tree); 24466var model = compilation.GetSemanticModel(tree); 24668var model = compilation.GetSemanticModel(tree); 24927var model = compilation.GetSemanticModel(tree); 25118var model = compilation.GetSemanticModel(tree); 25231var model = compilation.GetSemanticModel(tree); 25330var model = compilation.GetSemanticModel(tree); 25509var model = compilation.GetSemanticModel(tree); 25553var model = compilation.GetSemanticModel(tree); 25634var model = compilation.GetSemanticModel(tree); 25678var model = compilation.GetSemanticModel(tree); 25733var model = compilation.GetSemanticModel(tree); 25814var model = compilation.GetSemanticModel(tree); 25874var model = compilation.GetSemanticModel(tree); 25971var model = compilation.GetSemanticModel(tree); 26028var model = compilation.GetSemanticModel(tree); 26095var model = compilation.GetSemanticModel(tree); 26143var model = compilation.GetSemanticModel(tree); 26224var model = compilation.GetSemanticModel(tree); 26271var model = compilation.GetSemanticModel(tree); 26366var model = compilation.GetSemanticModel(tree); 26414var model = compilation.GetSemanticModel(tree); 26498var model = compilation.GetSemanticModel(tree); 26558var model = compilation.GetSemanticModel(tree); 26642var model = compilation.GetSemanticModel(tree); 26702var model = compilation.GetSemanticModel(tree); 26763var model = compilation.GetSemanticModel(tree); 26833var model = compilation.GetSemanticModel(tree); 26877var model = compilation.GetSemanticModel(tree); 26963var model = compilation.GetSemanticModel(tree); 27008var model = compilation.GetSemanticModel(tree); 27100var model = compilation.GetSemanticModel(tree); 27154var model = compilation.GetSemanticModel(tree); 27253var model = compilation.GetSemanticModel(tree); 27307var model = compilation.GetSemanticModel(tree); 27376var model = compilation.GetSemanticModel(tree); 27453var model = compilation.GetSemanticModel(tree); 27526var model = compilation.GetSemanticModel(tree); 27630var model = compilation.GetSemanticModel(tree); 27703var model = compilation.GetSemanticModel(tree); 27766var model = compilation.GetSemanticModel(tree); 27843var model = compilation.GetSemanticModel(tree); 27916var model = compilation.GetSemanticModel(tree); 28021var model = compilation.GetSemanticModel(tree); 28094var model = compilation.GetSemanticModel(tree); 28167var model = compilation.GetSemanticModel(tree); 28242var model = compilation.GetSemanticModel(tree); 28296var model = compilation.GetSemanticModel(tree); 28393var model = compilation.GetSemanticModel(tree); 28447var model = compilation.GetSemanticModel(tree); 28514var model = compilation.GetSemanticModel(tree); 28562var model = compilation.GetSemanticModel(tree); 28646var model = compilation.GetSemanticModel(tree); 28707var model = compilation.GetSemanticModel(tree); 28814var model = compilation.GetSemanticModel(tree); 28870var model = compilation.GetSemanticModel(tree); 28965var model = compilation.GetSemanticModel(tree); 29021var model = compilation.GetSemanticModel(tree); 29086var model = compilation.GetSemanticModel(tree); 29172var model = compilation.GetSemanticModel(tree); 29239var model = compilation.GetSemanticModel(tree); 29348var model = compilation.GetSemanticModel(tree); 29415var model = compilation.GetSemanticModel(tree); 29488var model = compilation.GetSemanticModel(tree); 29537var model = compilation.GetSemanticModel(tree); 29635var model = compilation.GetSemanticModel(tree); 29711var model = compilation.GetSemanticModel(tree); 29836var model = compilation.GetSemanticModel(tree); 29912var model = compilation.GetSemanticModel(tree); 29990var model = compilation.GetSemanticModel(tree); 30076var model = compilation.GetSemanticModel(tree); 30137var model = compilation.GetSemanticModel(tree); 30248var model = compilation.GetSemanticModel(tree); 30309var model = compilation.GetSemanticModel(tree); 30373var model = compilation.GetSemanticModel(tree); 30428var model = compilation.GetSemanticModel(tree); 30472var model = compilation.GetSemanticModel(tree); 30516var model = compilation.GetSemanticModel(tree); 30557var model = compilation.GetSemanticModel(tree); 30637var model = compilation.GetSemanticModel(tree); 30706var model = compilation.GetSemanticModel(tree); 30808var model = compilation.GetSemanticModel(tree); 30877var model = compilation.GetSemanticModel(tree); 30941var model = compilation.GetSemanticModel(tree); 30996var model = compilation.GetSemanticModel(tree); 31040var model = compilation.GetSemanticModel(tree); 31084var model = compilation.GetSemanticModel(tree); 31168var model = compilation.GetSemanticModel(tree); 31227var model = compilation.GetSemanticModel(tree); 31341var model = compilation.GetSemanticModel(tree); 31400var model = compilation.GetSemanticModel(tree); 31469var model = compilation.GetSemanticModel(tree); 31524var model = compilation.GetSemanticModel(tree); 31568var model = compilation.GetSemanticModel(tree); 31612var model = compilation.GetSemanticModel(tree); 31653var model = compilation.GetSemanticModel(tree); 31707var model = compilation.GetSemanticModel(tree); 31741var model = compilation.GetSemanticModel(tree); 31794var model = compilation.GetSemanticModel(tree); 31834var model = compilation.GetSemanticModel(tree); 31884var model = compilation.GetSemanticModel(tree); 31918var model = compilation.GetSemanticModel(tree); 31974var model = compilation.GetSemanticModel(tree); 32014var model = compilation.GetSemanticModel(tree); 32059var model = compilation.GetSemanticModel(tree); 32103var model = compilation.GetSemanticModel(tree); 32137var model = compilation.GetSemanticModel(tree); 32171var model = compilation.GetSemanticModel(tree); 32211var model = compilation.GetSemanticModel(tree); 32251var model = compilation.GetSemanticModel(tree); 32306var model = compilation.GetSemanticModel(tree); 32375var model = compilation.GetSemanticModel(tree); 32422var model = compilation.GetSemanticModel(tree); 32461var model = compilation.GetSemanticModel(tree); 32488var model = compilation.GetSemanticModel(tree); 32516var model = compilation.GetSemanticModel(tree); 32544var model = compilation.GetSemanticModel(tree); 32570var model = compilation.GetSemanticModel(tree); 32608var model = compilation.GetSemanticModel(tree); 32644var model = compilation.GetSemanticModel(tree); 32651SemanticModel model, 32659SemanticModel model, 32667SemanticModel model, 32888var model = compilation.GetSemanticModel(tree); 32917var model = comp.Compilation.GetSemanticModel(tree); 33002var model = comp.GetSemanticModel(tree); 33071var model = comp.GetSemanticModel(tree); 33116var model = comp.GetSemanticModel(tree); 33180var model = comp.GetSemanticModel(tree); 33446var model = comp.GetSemanticModel(tree); 33487var model = comp.GetSemanticModel(tree); 33550var model = compilation.GetSemanticModel(tree); 33633var model = compilation.GetSemanticModel(tree); 33721var model = compilation.GetSemanticModel(tree); 33819var model = compilation.GetSemanticModel(tree); 33918var model = compilation.GetSemanticModel(tree); 34016var model = compilation.GetSemanticModel(tree); 34089var model = compilation.GetSemanticModel(tree); 34145var model = compilation.GetSemanticModel(tree); 34211var model = compilation.GetSemanticModel(tree); 34338var model = compilation.GetSemanticModel(tree); 34429var model = compilation.GetSemanticModel(tree); 34536var model = compilation.GetSemanticModel(tree); 34657var model = compilation.GetSemanticModel(tree); 34697var model = compilation.GetSemanticModel(tree); 34773var model = compilation.GetSemanticModel(tree); 34828var model = compilation.GetSemanticModel(tree); 34882var model = compilation.GetSemanticModel(tree); 34940var model = compilation.GetSemanticModel(tree); 34990var model = compilation.GetSemanticModel(tree); 35044var model = compilation.GetSemanticModel(tree); 35084var model = compilation.GetSemanticModel(tree); 35118var model = compilation.GetSemanticModel(tree); 35157var model = compilation.GetSemanticModel(tree); 35201var model = compilation.GetSemanticModel(tree); 35232var model = compilation.GetSemanticModel(tree); 35271var model = compilation.GetSemanticModel(tree); 35303var model = compilation.GetSemanticModel(tree); 35339var model = compilation.GetSemanticModel(tree); 35378var model = compilation.GetSemanticModel(tree); 35408var model = compilation.GetSemanticModel(tree); 35445var model = compilation.GetSemanticModel(tree); 35497var model = compilation.GetSemanticModel(tree); 35602var model = comp.GetSemanticModel(tree); 35637var model = comp.GetSemanticModel(tree); 35716var model = compilation.GetSemanticModel(tree); 35758var model = compilation.GetSemanticModel(tree); 35787var model = compilation.GetSemanticModel(tree); 35833var model = compilation.GetSemanticModel(tree); 35921var model = compilation.GetSemanticModel(tree); 36061var model = compilation.GetSemanticModel(tree); 36169var model = compilation.GetSemanticModel(tree); 36262var model = compilation.GetSemanticModel(tree); 36301var model = comp.GetSemanticModel(tree); 36305Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36348var model = comp.GetSemanticModel(tree); 36352Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36388var model = comp.GetSemanticModel(tree); 36392Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36430var model = comp.GetSemanticModel(tree); 36434Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36465var model = comp.GetSemanticModel(tree); 36469Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel)); 36503var model = comp.GetSemanticModel(tree); 36507Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(method.Body.SpanStart, method, out var speculativeModel));
Semantics\OverloadResolutionTests.cs (9)
7149var model = comp.GetSemanticModel(tree); 7259var model = comp.GetSemanticModel(tree); 7433var model = comp.GetSemanticModel(tree); 7474var model = comp.GetSemanticModel(tree); 9075var model = compilation.GetSemanticModel(tree); 9423var model = comp.GetSemanticModel(tree); 11336var model = comp.GetSemanticModel(tree); 11385var model = comp.GetSemanticModel(tree); 11435var model = comp.GetSemanticModel(tree);
Semantics\PrimaryConstructorTests.cs (28)
384var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 852var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 894var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 962var model = comp.GetSemanticModel(tree); 1184var model = comp.GetSemanticModel(tree); 1255var model = comp.GetSemanticModel(tree); 1301var model = comp.GetSemanticModel(tree); 1357var model = comp.GetSemanticModel(tree); 1416var model = comp.GetSemanticModel(tree); 1505var model = comp.GetSemanticModel(tree); 1704var model = comp.GetSemanticModel(tree); 1744var model = comp.GetSemanticModel(tree); 1787var model = comp.GetSemanticModel(tree); 1857var model = comp.GetSemanticModel(tree); 2004var model = comp.GetSemanticModel(tree); 2053SemanticModel speculativeModel; 2186var model = comp.GetSemanticModel(tree); 2315var model = comp.GetSemanticModel(tree); 2363var model = comp.GetSemanticModel(tree); 2531var model = comp.GetSemanticModel(tree); 2569var model = comp.GetSemanticModel(tree); 2606var model = comp.GetSemanticModel(tree); 2642var model = comp.GetSemanticModel(tree); 6216var model = comp.GetSemanticModel(tree); 6242var model = comp.GetSemanticModel(tree); 7178var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 7745var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8151var model = comp.GetSemanticModel(tree, ignoreAccessibility: false);
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)
2898var model = comp.GetSemanticModel(tree); 3124var model = comp.GetSemanticModel(tree);
Semantics\ReadOnlyStructsTests.cs (1)
1267var semanticModel = comp.GetSemanticModel(testMethodSyntax.SyntaxTree);
Semantics\RecordStructTests.cs (19)
533var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 553var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 573var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 595var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2306var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2330var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2592var model = comp.GetSemanticModel(tree); 2627var model = comp.GetSemanticModel(tree); 2661var model = comp.GetSemanticModel(tree); 2696var model = comp.GetSemanticModel(tree); 3258var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 3306var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 3357var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 5818var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 5860var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 6894var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 7565var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8770var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 10771var model = comp.GetSemanticModel(tree);
Semantics\RecordTests.cs (31)
281var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 447var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 479var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 2493var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 8094var model = comp.GetSemanticModel(tree); 8607var model = comp.GetSemanticModel(tree); 8867var model = comp.GetSemanticModel(tree); 21153var model = comp.GetSemanticModel(tree); 21377var model = comp.GetSemanticModel(tree); 21448var model = comp.GetSemanticModel(tree); 21494var model = comp.GetSemanticModel(tree); 21550var model = comp.GetSemanticModel(tree); 21609var model = comp.GetSemanticModel(tree); 21698var model = comp.GetSemanticModel(tree); 21897var model = comp.GetSemanticModel(tree); 21934var model = comp.GetSemanticModel(tree); 21974var model = comp.GetSemanticModel(tree); 22009var model = comp.GetSemanticModel(tree); 22088var model = comp.GetSemanticModel(tree); 22235var model = comp.GetSemanticModel(tree); 22284SemanticModel speculativeModel; 22417var model = comp.GetSemanticModel(tree); 22926var model = comp.GetSemanticModel(tree); 23380var model = comp.GetSemanticModel(tree); 24652var model = comp.GetSemanticModel(tree); 24687var model = comp.GetSemanticModel(tree); 24721var model = comp.GetSemanticModel(tree); 24756var model = comp.GetSemanticModel(tree); 28326var model = comp.GetSemanticModel(tree, ignoreAccessibility: false); 30349var model = comp.GetSemanticModel(tree); 30373var model = comp.GetSemanticModel(tree);
Semantics\RefEscapingTests.cs (3)
49var model = comp.GetSemanticModel(tree); 4420var model = compilation.GetSemanticModel(tree); 4520var 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)
10574var model = comp.GetSemanticModel(tree); 10648var model = comp.GetSemanticModel(tree); 10675static (NamedTypeSymbol, LambdaSymbol) getDelegateTypeAndLambda(SemanticModel model, VariableDeclaratorSyntax decl) 10770var model = comp.GetSemanticModel(tree); 10939var model = comp.GetSemanticModel(tree); 11487var model = comp.GetSemanticModel(tree); 11567var model = comp.GetSemanticModel(tree); 11636var model = comp.GetSemanticModel(tree); 11704var model = comp.GetSemanticModel(tree); 11886var model = comp.GetSemanticModel(tree); 12073var model = comp.GetSemanticModel(tree); 12299var model = comp.GetSemanticModel(tree); 12482var model = comp.GetSemanticModel(tree); 12657var model = comp.GetSemanticModel(tree); 12712var model = comp.GetSemanticModel(tree); 12771var model = comp.GetSemanticModel(tree); 12814var model = comp.GetSemanticModel(tree); 12843var model = comp.GetSemanticModel(tree); 12868var model = comp.GetSemanticModel(tree); 12888var model = comp.GetSemanticModel(tree); 12910var model = comp.GetSemanticModel(tree); 12945var model = comp.GetSemanticModel(tree); 13009var model = comp.GetSemanticModel(tree); 13085var model = comp.GetSemanticModel(tree); 13156var model = comp.GetSemanticModel(tree); 13220var model = comp.GetSemanticModel(tree); 13861var model = comp.GetSemanticModel(tree); 13903var model = comp.GetSemanticModel(tree); 14028var model = comp.GetSemanticModel(tree); 14104var model = comp.GetSemanticModel(tree); 14349var model = comp.GetSemanticModel(tree); 14557var model = comp.GetSemanticModel(tree); 14583var model = comp.GetSemanticModel(tree); 14638var model = comp.GetSemanticModel(tree); 16056var model = comp.GetSemanticModel(tree); 16097var model = comp.GetSemanticModel(tree); 16137var model = comp.GetSemanticModel(tree); 16235var model = comp.GetSemanticModel(tree); 16283var model = comp.GetSemanticModel(syntaxTree); 17397var model = comp.GetSemanticModel(tree); 22290var model = comp.GetSemanticModel(tree); 22358var model = comp.GetSemanticModel(tree); 23360var model = comp.GetSemanticModel(tree); 23396var model = comp.GetSemanticModel(tree); 23433var model = comp.GetSemanticModel(tree); 24200var model = comp.GetSemanticModel(tree); 24218static (NamedTypeSymbol, LambdaSymbol) getDelegateTypeAndLambda(SemanticModel model, VariableDeclaratorSyntax decl) 26030var model = comp.GetSemanticModel(tree); 26082var model = comp.GetSemanticModel(tree); 26134var model = comp.GetSemanticModel(tree); 26291var model = comp.GetSemanticModel(tree); 26381var model = comp.GetSemanticModel(tree); 26501var model = comp.GetSemanticModel(tree); 26602var model = comp.GetSemanticModel(tree); 26647var model = comp.GetSemanticModel(tree); 26707var model = comp.GetSemanticModel(tree); 26937var model = comp.GetSemanticModel(tree); 26985var model = comp.GetSemanticModel(tree); 28092var model = comp.GetSemanticModel(tree);
Semantics\RefLocalsAndReturnsTests.cs (10)
4357var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4385var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4413var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4441var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4469var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4497var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4531var model = compilation.GetSemanticModel(tree, ignoreAccessibility: true); 4814var model = comp.GetSemanticModel(tree); 4858var model = comp.GetSemanticModel(tree); 4897var 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 = CreateCompilationWithMscorlib45(new[] { tree }).GetSemanticModel(tree, ignoreAccessibility: false); 536var model = CreateCompilationWithMscorlib45(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)
3326var model = compilation.GetSemanticModel(tree);
Semantics\StackAllocInitializerTests.cs (8)
365var model = comp.GetSemanticModel(tree); 441var model = comp.GetSemanticModel(tree); 1027var model = comp.GetSemanticModel(tree); 1129var model = comp.GetSemanticModel(tree); 2341var model = comp.GetSemanticModel(tree); 2447var model = comp.GetSemanticModel(tree); 2547var model = comp.GetSemanticModel(tree); 2631var 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); 1394var model2 = comp.GetSemanticModel(tree2); 1510var model1 = comp.GetSemanticModel(tree); 1513var model2 = comp.GetSemanticModel(tree); 1578var model1 = comp.GetSemanticModel(tree); 1585var model2 = comp.GetSemanticModel(tree); 1672var model1 = comp.GetSemanticModel(tree1); 1702var model = comp.GetSemanticModel(tree); 1747void verifyModel(ISymbol declSymbol, SemanticModel model, IdentifierNameSyntax nameRef) 1845var model1 = comp.GetSemanticModel(tree1); 1868var model2 = comp.GetSemanticModel(tree2); 1915void verifyModel(ISymbol declSymbol, SemanticModel model2, IdentifierNameSyntax nameRef) 2071var model1 = comp.GetSemanticModel(tree1); 2128void verifyModel(ISymbol declSymbol, SemanticModel model2, IdentifierNameSyntax nameRef) 2235var model1 = comp.GetSemanticModel(tree1); 2253var model2 = comp.GetSemanticModel(tree2); 2294void verifyModel(ISymbol declSymbol, SemanticModel model2, IdentifierNameSyntax nameRef) 2413var model1 = comp.GetSemanticModel(tree1); 2491void verifyModel(SemanticModel model2, IdentifierNameSyntax nameRef) 2905var model1 = comp.GetSemanticModel(tree1); 2928var model2 = comp.GetSemanticModel(tree2); 3928var model = comp.GetSemanticModel(tree); 3987void verifyModel(ISymbol declSymbol, SemanticModel model, IdentifierNameSyntax nameRef) 4077var model = comp.GetSemanticModel(tree); 4117void verifyModel(SemanticModel model, IdentifierNameSyntax nameRef) 4202var model = comp.GetSemanticModel(tree); 4497var model1 = comp.GetSemanticModel(tree1); 4503var model2 = comp.GetSemanticModel(tree2); 4561var model1 = comp.GetSemanticModel(tree1); 4610var model1 = comp.GetSemanticModel(tree1); 4880var model = comp.GetSemanticModel(tree); 4937var model1 = comp.GetSemanticModel(tree1); 4943var model2 = comp.GetSemanticModel(tree2); 4965var model = comp.GetSemanticModel(tree); 6017var model1 = comp.GetSemanticModel(tree1); 6073var semanticModel = comp.GetSemanticModel(syntaxTree); 6145var semanticModel = comp.GetSemanticModel(syntaxTree); 6222var semanticModel = comp.GetSemanticModel(syntaxTree); 6267var semanticModel = comp.GetSemanticModel(syntaxTree, ignoreAccessibility: true); 6312var semanticModel1 = comp.GetSemanticModel(syntaxTree1, ignoreAccessibility); 6363var semanticModel1 = comp.GetSemanticModel(syntaxTree1, ignoreAccessibility); 6369var semanticModel2 = comp.GetSemanticModel(syntaxTree2, ignoreAccessibility); 6425var model = context.SemanticModel; 6455var model = context.SemanticModel; 6920var model = context.SemanticModel; 6988var model = context.SemanticModel; 7053var model = context.SemanticModel; 7087var model = context.SemanticModel; 8565var model = comp.GetSemanticModel(tree); 8638var model = comp.GetSemanticModel(tree); 8660var model = comp.GetSemanticModel(tree); 8682var model = comp.GetSemanticModel(tree); 9666var model = compilation.GetSemanticModel(tree); 9691var model = compilation.GetSemanticModel(tree); 9695model.TryGetSpeculativeSemanticModel(root.DescendantNodes().Single(n => n is ExpressionStatementSyntax { Parent: GlobalStatementSyntax }).Span.End, nodeToSpeculate, out var speculativeModelInTopLevel); 9700model.TryGetSpeculativeSemanticModel(root.DescendantNodes().Single(n => n is ExpressionStatementSyntax { Parent: BlockSyntax }).Span.End, nodeToSpeculate, out var speculativeModelOutsideTopLevel);
Semantics\TryCatchTests.cs (1)
42var model = compilation.GetSemanticModel(tree);
Semantics\TypeOfTests.cs (1)
32var model = compilation.GetSemanticModel(tree);
Semantics\UnsafeTests.cs (31)
2387var model = compilation.GetSemanticModel(tree); 2558var model = compilation.GetSemanticModel(tree); 3463var model = comp.GetSemanticModel(tree); 3540var model = compilation.GetSemanticModel(tree); 4417var model = compilation.GetSemanticModel(tree); 4454var model = compilation.GetSemanticModel(tree); 4483var model = compilation.GetSemanticModel(tree); 4521var model = compilation.GetSemanticModel(tree); 4564var model = compilation.GetSemanticModel(tree); 4695var model = compilation.GetSemanticModel(tree); 5005var model = compilation.GetSemanticModel(tree); 5072var model = compilation.GetSemanticModel(tree); 5318var model = compilation.GetSemanticModel(tree); 5385var model = compilation.GetSemanticModel(tree); 5443var model = compilation.GetSemanticModel(tree); 5503var model = compilation.GetSemanticModel(tree); 5539var model = compilation.GetSemanticModel(tree); 6015var model = compilation.GetSemanticModel(tree); 6069var model = compilation.GetSemanticModel(tree); 6481var model = compilation.GetSemanticModel(tree); 7337var model = compilation.GetSemanticModel(tree); 7378var model = compilation.GetSemanticModel(tree); 7450var model = compilation.GetSemanticModel(tree); 7779var model = compilation.GetSemanticModel(tree); 7841var model = compilation.GetSemanticModel(tree); 7901var model = compilation.GetSemanticModel(tree); 8451var model = compilation.GetSemanticModel(tree); 8952var model = comp.GetSemanticModel(tree); 8983var model = comp.GetSemanticModel(tree); 9023var model = compilation.GetSemanticModel(tree); 9049var model = comp.GetSemanticModel(tree);
Semantics\UsingStatementTests.cs (7)
58var model = compilation.GetSemanticModel(tree); 1338var model = compilation.GetSemanticModel(tree); 1373var model = compilation.GetSemanticModel(tree); 1850var model = compilation.GetSemanticModel(tree); 1862var model = compilation.GetSemanticModel(tree); 1878var model = compilation.GetSemanticModel(tree); 1892var model = compilation.GetSemanticModel(tree);
Semantics\Utf8StringsLiteralsTests.cs (14)
2968var model = comp.GetSemanticModel(tree); 2996var model = comp.GetSemanticModel(tree); 3024var model = comp.GetSemanticModel(tree); 3052var model = comp.GetSemanticModel(tree); 3080var model = comp.GetSemanticModel(tree); 3108var model = comp.GetSemanticModel(tree); 3136var model = comp.GetSemanticModel(tree); 3164var model = comp.GetSemanticModel(tree); 3192var model = comp.GetSemanticModel(tree); 3220var model = comp.GetSemanticModel(tree); 3248var model = comp.GetSemanticModel(tree); 3276var model = comp.GetSemanticModel(tree); 3304var model = comp.GetSemanticModel(tree); 4061var model = comp.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (988)
Compilation\CompilationAPITests.cs (6)
884var bind = comp.GetSemanticModel(syntaxTree: t1); 1941var model2 = compilation.GetSemanticModel(tree2); 1955var model2 = compilation.GetSemanticModel(tree2); 2841var semanticModel = compilation.GetSemanticModel(syntaxTree); 2876var semanticModel = compilation.GetSemanticModel(syntaxTree); 2908var 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 (171)
41var model = comp.GetSemanticModel(tree); 49model.TryGetSpeculativeSemanticModelForMethodBody(indexerAccess.SpanStart, m2, out var speculativeModel); 108var model = comp.GetSemanticModel(tree); 135var model = comp.GetSemanticModel(tree); 176var model = comp.GetSemanticModel(tree); 203var model = comp.GetSemanticModel(tree); 235var model = comp.GetSemanticModel(tree); 252var model1 = comp.GetSemanticModel(tree); 253var model2 = comp.GetSemanticModel(tree); 272var model1 = comp1.GetSemanticModel(tree); 273var model2 = comp2.GetSemanticModel(tree); 291var model1 = comp.GetSemanticModel(tree); 292var model2 = comp.GetSemanticModel(tree); 311var model1 = comp1.GetSemanticModel(tree); 312var model2 = comp2.GetSemanticModel(tree); 330var model1 = comp.GetSemanticModel(tree); 331var model2 = comp.GetSemanticModel(tree); 349var model1 = comp.GetSemanticModel(tree); 350var model2 = comp.GetSemanticModel(tree); 371var model1 = comp1.GetSemanticModel(tree1); 372var model2 = comp2.GetSemanticModel(tree2); 392var model = comp.GetSemanticModel(tree); 419var model = comp.GetSemanticModel(tree); 535var model = comp.GetSemanticModel(tree); 561var model = comp.GetSemanticModel(tree); 587var model = comp.GetSemanticModel(tree); 610var model = comp.GetSemanticModel(tree); 645var model = compilation.GetSemanticModel(tree1); 676var model = compilation.GetSemanticModel(tree1); 705var model = compilation.GetSemanticModel(tree1); 727var model = comp.GetSemanticModel(tree); 753var model = comp.GetSemanticModel(tree); 815var model = comp.GetSemanticModel(tree); 923var model = comp.GetSemanticModel(tree); 962var model1 = comp.GetSemanticModel(tree1); 963var model2 = comp.GetSemanticModel(tree2); 1003var model1 = comp.GetSemanticModel(tree1); 1004var model2 = comp.GetSemanticModel(tree2); 1040var model = comp.GetSemanticModel(tree); 1071var model = comp.GetSemanticModel(tree); 1112var model = comp.GetSemanticModel(tree); 1156var model = comp.GetSemanticModel(tree); 1192var model = comp.GetSemanticModel(tree); 1230var model = comp.GetSemanticModel(tree); 1263var model = comp2.GetSemanticModel(tree); 1304var model = comp.GetSemanticModel(tree); 1336var model = comp.GetSemanticModel(tree); 1359var model = comp.GetSemanticModel(tree); 1388var model = comp.GetSemanticModel(tree); 1413var model = compilation.GetSemanticModel(tree); 1424SemanticModel speculativeModel; 1458var model = compilation.GetSemanticModel(tree); 1464SemanticModel speculativeModel; 1504var model = compilation.GetSemanticModel(tree); 1513SemanticModel speculativeModel; 1554var model = compilation.GetSemanticModel(tree); 1561SemanticModel speculativeModel; 1592var model = compilation.GetSemanticModel(tree); 1601SemanticModel speculativeModel; 1672var model = compilation.GetSemanticModel(tree); 1683SemanticModel speculativeModel; 1726var model = comp.GetSemanticModel(tree); 1778var model = compilation.GetSemanticModel(tree); 1780SemanticModel speculativeModel; 1829var model = compilation.GetSemanticModel(tree); 1834SemanticModel speculativeModel; 1879var model = compilation.GetSemanticModel(tree); 1881SemanticModel statModel; 1918var model = compilation.GetSemanticModel(tree); 1919SemanticModel statModel; 1955var model = compilation.GetSemanticModel(tree); 1957SemanticModel speculativeModel; 1992var model = compilation.GetSemanticModel(tree); 1994SemanticModel speculativeModel; 2019var model = comp.GetSemanticModel(tree); 2033SemanticModel speculativeModel; 2070var parentModel = comp.GetSemanticModel(tree); 2076SemanticModel speculativeModel; 2139var parentModel = comp.GetSemanticModel(tree); 2145SemanticModel speculativeModel; 2174var model = compilation.GetSemanticModel(tree); 2180SemanticModel speculativeModel; 2219var model = compilation.GetSemanticModel(tree); 2226SemanticModel speculativeModel; 2234SemanticModel newModel; 2259var model = compilation.GetSemanticModel(tree); 2263SemanticModel speculativeModel; 2308var model = comp.GetSemanticModel(tree); 2319SemanticModel speculativeModel; 2350var model = compilation.GetSemanticModel(tree); 2355SemanticModel speculativeModel; 2371var semanticModel = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 2384var semanticModel = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 2389private static void VerifySpeculativeSemanticModelForMethodBody(BlockSyntax blockStatement, SemanticModel speculativeModel) 2446var model = compilation.GetSemanticModel(tree); 2451SemanticModel speculativeModel; 2488var model = compilation.GetSemanticModel(tree); 2493SemanticModel speculativeModel; 2533var model = compilation.GetSemanticModel(tree); 2538SemanticModel speculativeModel; 2563var model = compilation.GetSemanticModel(tree); 2570SemanticModel speculativeModel; 2635var model = compilation.GetSemanticModel(tree); 2642SemanticModel speculativeModel; 2672var model = compilation.GetSemanticModel(tree); 2678SemanticModel speculativeModel; 2691SemanticModel model, 2702SemanticModel speculativeModel; 2763var model = compilation.GetSemanticModel(tree); 2778SemanticModel speculativeModel; 2798var model = compilation.GetSemanticModel(tree); 2813var model = compilation.GetSemanticModel(tree); 2833var model = compilation.GetSemanticModel(tree); 2840SemanticModel speculativeModel; 2864var model = compilation.GetSemanticModel(tree); 2893var model = compilation.GetSemanticModel(tree); 2897SemanticModel speculativeModel; 2931SemanticModel speculativeModel; 2971SemanticModel speculativeModel; 3016SemanticModel speculativeModel; 3093SemanticModel speculativeModel; 3125var model = comp.GetSemanticModel(tree); 3155var model = comp.GetSemanticModel(tree); 3160SemanticModel speculativeModel; 3190var model = comp.GetSemanticModel(tree); 3195SemanticModel speculativeModel; 3220var model = comp.GetSemanticModel(tree); 3225SemanticModel speculativeModel; 3257var model = comp.GetSemanticModel(tree); 3266SemanticModel speculativeModel; 3298var model = comp.GetSemanticModel(tree); 3307SemanticModel speculativeModel; 3339var model = comp.GetSemanticModel(tree); 3373var model = comp.GetSemanticModel(tree); 3383SemanticModel speculativeModel; 3415var model = comp.GetSemanticModel(tree); 3424SemanticModel speculativeModel; 3456var model = comp.GetSemanticModel(tree); 3465SemanticModel speculativeModel; 3497var model = comp.GetSemanticModel(tree); 3522var model = compilation.GetSemanticModel(tree); 3543var model = compilation.GetSemanticModel(tree); 3547SemanticModel model2; 3582var model = comp.GetSemanticModel(tree); 3587SemanticModel speculativeModel; 3612var semanticModel = compilation.GetSemanticModel(tree); 3748var model = comp.GetSemanticModel(tree); 3784var model = comp.GetSemanticModel(tree); 3789Assert.True(model.TryGetSpeculativeSemanticModel(localFunctionBody.Block!.Statements[0].SpanStart + 1, @return, out var specModel)); 3817var model = comp.GetSemanticModel(tree); 3844var model = comp.GetSemanticModel(tree); 3872var model = comp.GetSemanticModel(tree); 3903var model = comp.GetSemanticModel(tree); 4028var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4056var model = compilation.GetSemanticModel(tree); 4084var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4105var model = comp.GetSemanticModel(tree); 4142var model = comp.GetSemanticModel(tree); 4185var model = comp.GetSemanticModel(tree); 4209var model = comp.GetSemanticModel(tree); 4237var model = comp.GetSemanticModel(tree); 4275var model = comp.GetSemanticModel(tree); 4327var model = comp.GetSemanticModel(tree); 4370var semanticModel = compilation.GetSemanticModel(tree); 4425var model = comp.GetSemanticModel(syntaxTree); 4430Assert.True(model.TryGetSpeculativeSemanticModel(ifStatement.SpanStart, replacementIfStatement, out var specModel)); 4459var model = comp.GetSemanticModel(tree); 4474var model = comp.GetSemanticModel(tree); 4538var model = comp.GetSemanticModel(tree); 4626var model = compilation.GetSemanticModel(tree); 4640var model = compilation.GetSemanticModel(tree);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (158)
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); 4746var model = (SemanticModel)compilation.GetSemanticModel(tree); 4772var model = (SemanticModel)compilation.GetSemanticModel(tree); 4800var model = compilation.GetSemanticModel(tree); 4823var model = compilation.GetSemanticModel(tree); 4846var model = compilation.GetSemanticModel(tree); 4869var model = compilation.GetSemanticModel(tree); 4892var model = compilation.GetSemanticModel(tree); 4915var model = compilation.GetSemanticModel(tree); 4938var model = compilation.GetSemanticModel(tree); 4961var model = compilation.GetSemanticModel(tree); 4996var model = compilation.GetSemanticModel(tree); 5042var model = compilation.GetSemanticModel(tree); 5091var model = compilation.GetSemanticModel(tree); 5114var model = compilation.GetSemanticModel(tree); 5131var model = compilation.GetSemanticModel(tree); 5173var model = compilation.GetSemanticModel(tree); 5206var model = comp.GetSemanticModel(tree); 5223var model = comp.GetSemanticModel(tree); 5244var model = comp.GetSemanticModel(tree); 5265var model = comp.GetSemanticModel(tree); 5273SemanticModel 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 (90)
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()); 6869var 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); 797var model = compilation.GetSemanticModel(tree);
SymbolDisplay\SymbolDisplayTests.cs (30)
2725var model = comp.GetSemanticModel(tree); 3282var model = comp.GetSemanticModel(tree); 5287var model = comp.GetSemanticModel(comp.SyntaxTrees.First()); 5313var model = comp.GetSemanticModel(tree); 5753var model = comp.GetSemanticModel(tree); 6300var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6343var semanticModel = comp.GetSemanticModel(srcTree); 6377var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6439var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6472var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6533var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6566var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6611var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6729var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6767var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6805var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6865var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 6937var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7197var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7350var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7378var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 7602var model = compilation.GetSemanticModel(tree); 7694var model = compilation.GetSemanticModel(tree); 7754var model = compilation.GetSemanticModel(tree); 7786var model = compilation.GetSemanticModel(tree); 8089var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 8140var semanticModel = comp.GetSemanticModel(comp.SyntaxTrees.Single()); 8175var model = comp.GetSemanticModel(tree); 8499var model = comp.GetSemanticModel(tree); 8555var model = comp.GetSemanticModel(tree);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
1023var semanticModel = compilation.GetSemanticModel(syntaxTree);
Symbols\AnonymousTypesSemanticsTests.cs (1)
1949public SemanticModel Model;
Symbols\AnonymousTypesSymbolTests.cs (3)
1476var model = compilation.GetSemanticModel(compilation.SyntaxTrees[0]); 1639var model = comp.GetSemanticModel(tree); 1680var model = comp.GetSemanticModel(tree);
Symbols\AssemblyAndNamespaceTests.cs (1)
332var model = compilation.GetSemanticModel(tree);
Symbols\CheckedUserDefinedOperatorsTests.cs (5)
7208var model = compilation1.GetSemanticModel(tree); 7280var model = compilation1.GetSemanticModel(tree); 7351var model = compilation1.GetSemanticModel(tree); 7424var model = compilation1.GetSemanticModel(tree); 7488var model = compilation1.GetSemanticModel(tree);
Symbols\ConversionTests.cs (4)
388var model = compilation.GetSemanticModel(tree); 1725var model = comp.GetSemanticModel(tree); 1795var model = comp.GetSemanticModel(tree); 1829var model = comp.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)
2438var model = compilation.GetSemanticModel(tree); 2731var model = compilation.GetSemanticModel(tree); 2957var model = compilation.GetSemanticModel(tree); 3015var model = compilation.GetSemanticModel(tree); 3143var model = comp.GetSemanticModel(tree); 3782var model = compilation.GetSemanticModel(syntaxTree); 3870var model = compilation.GetSemanticModel(tree); 3917var model = compilation.GetSemanticModel(tree); 3962var model = compilation.GetSemanticModel(tree); 4012var 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); 1428var model = comp.GetSemanticModel(syntaxTree); 1689var model = comp.GetSemanticModel(syntaxTree); 1800var model = comp.GetSemanticModel(syntaxTree); 1927var model = comp.GetSemanticModel(syntaxTree);
Symbols\ImplicitClassTests.cs (2)
71var model = c.GetSemanticModel(tree); 114var model = comp.GetSemanticModel(tree);
Symbols\IndexerTests.cs (9)
1294var model = comp.GetSemanticModel(tree); 2233var model = comp.GetSemanticModel(tree); 2274var model = comp.GetSemanticModel(tree); 2316var model = comp.GetSemanticModel(tree); 2354var model = comp.GetSemanticModel(tree); 2528private static void CheckOverloadResolutionResults(SyntaxTree tree, SemanticModel model, params string[] expected) 2612var model = comp.GetSemanticModel(tree); 2699var model = comp.GetSemanticModel(tree); 2842var model = comp2.GetSemanticModel(tree);
Symbols\LocalFunctionTests.cs (4)
32var semanticModel = compilation.GetSemanticModel(tree); 53var semanticModel = compilation.GetSemanticModel(tree); 74var semanticModel = compilation.GetSemanticModel(tree); 97var semanticModel = compilation.GetSemanticModel(tree);
Symbols\LookupSymbolsInfoTests.cs (1)
94var model = compilation.GetSemanticModel(tree);
Symbols\Metadata\MetadataTypeTests.cs (1)
370var 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\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); 764var model = comp.GetSemanticModel(syntaxTree); 826var 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 (21)
951var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1085var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1151var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1209var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1523var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 1598var model = comp.GetSemanticModel(tree, ignoreAccessibility: true); 2218var model = comp.GetSemanticModel(tree); 2258var model = comp.GetSemanticModel(tree); 2946var model = comp.GetSemanticModel(tree); 2997var model = comp.GetSemanticModel(tree); 3053var model = compilation.GetSemanticModel(tree); 3085var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3155var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3217var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3220Assert.True(model.TryGetSpeculativeSemanticModel(position: body.OpenBraceToken.EndPosition, newBody, out var speculativeModel)); 3258var model = compilation.GetSemanticModel(tree, ignoreAccessibility: false); 3261Assert.True(model.TryGetSpeculativeSemanticModel(position: body.OpenBraceToken.EndPosition, newBody, out var speculativeModel)); 3552var model = comp.GetSemanticModel(tree); 3769var model = comp.GetSemanticModel(tree); 3813var model = comp.GetSemanticModel(tree); 3836var model = comp.GetSemanticModel(tree);
Symbols\Source\LocalTests.cs (1)
62var model = compilation.GetSemanticModel(tree);
Symbols\Source\MethodTests.cs (1)
2538var model = comp.GetSemanticModel(syntax);
Symbols\Source\NullablePublicAPITests.cs (119)
51var model = comp.GetSemanticModel(syntaxTree); 85var model = comp.GetSemanticModel(syntaxTree); 567var semanticModel = comp.GetSemanticModel(syntaxTree); 942var model = comp.GetSemanticModel(syntaxTree); 999var model = comp.GetSemanticModel(syntaxTree); 1092var model = comp.GetSemanticModel(syntaxTree); 1119var model = comp.GetSemanticModel(syntaxTree); 1167Assert.True(syntaxContext.SemanticModel.TryGetSpeculativeSemanticModel(syntaxContext.Node.SpanStart, newSource, out var specModel)); 1207var model = comp.GetSemanticModel(syntaxTree); 1259var model = comp.GetSemanticModel(syntaxTree); 1357var model = comp.GetSemanticModel(syntaxTree); 1393Assert.True(model.TryGetSpeculativeSemanticModel(spanStart, newSource, out var speculativeModel)); 1437var model = comp.GetSemanticModel(syntaxTree); 1442Assert.True(model.TryGetSpeculativeSemanticModel(returnStatement.SpanStart, newSource, out var specModel)); 1509var model = comp.GetSemanticModel(syntaxTree); 1565var model = comp.GetSemanticModel(syntaxTree); 1622var model = comp.GetSemanticModel(syntaxTree); 1668var model = comp.GetSemanticModel(syntaxTree); 1711var model = comp.GetSemanticModel(syntaxTree); 1793var model = context.SemanticModel; 1850var model = comp.GetSemanticModel(syntaxTree); 1893var model = comp.GetSemanticModel(syntaxTree); 1938var model = comp.GetSemanticModel(syntaxTree); 1985var model = comp.GetSemanticModel(syntaxTree); 2046var model = comp.GetSemanticModel(syntaxTree); 2089var model = comp.GetSemanticModel(syntaxTree); 2132var model = comp.GetSemanticModel(syntaxTree); 2139Assert.True(model.TryGetSpeculativeSemanticModel(s2Assignment.SpanStart, newDeclaration, out var specModel)); 2175var model = comp.GetSemanticModel(syntaxTree); 2217var model = comp.GetSemanticModel(syntaxTree); 2247var model = comp.GetSemanticModel(syntaxTree); 2282var model = comp.GetSemanticModel(syntaxTree); 2326var model = comp.GetSemanticModel(syntaxTree); 2367var model = comp.GetSemanticModel(syntaxTree); 2412var model = comp.GetSemanticModel(syntaxTree); 2452var model = comp.GetSemanticModel(syntaxTree); 2500var model = comp.GetSemanticModel(syntaxTree); 2545var model = comp.GetSemanticModel(syntaxTree); 2594var model = comp.GetSemanticModel(syntaxTree); 2628var model = comp.GetSemanticModel(syntaxTree); 2662var model = comp.GetSemanticModel(syntaxTree); 2700var model = comp.GetSemanticModel(syntaxTree); 2736var model = comp.GetSemanticModel(syntaxTree); 2782var model = comp.GetSemanticModel(syntaxTree); 2825var model = comp.GetSemanticModel(syntaxTree); 2874var model = comp.GetSemanticModel(syntaxTree); 2915var model = comp.GetSemanticModel(syntaxTree); 2956var model = comp.GetSemanticModel(syntaxTree); 2998var model = comp.GetSemanticModel(syntaxTree); 3040var model = comp.GetSemanticModel(syntaxTree); 3100var model = comp.GetSemanticModel(syntaxTree); 3147var model = comp.GetSemanticModel(syntaxTree); 3192var model = comp.GetSemanticModel(syntaxTree); 3257var model = comp.GetSemanticModel(syntaxTree); 3309var model = comp.GetSemanticModel(syntaxTree); 3358var model = comp.GetSemanticModel(syntaxTree); 3405var model = comp.GetSemanticModel(syntaxTree); 3450var model = comp.GetSemanticModel(syntaxTree); 3487var model = comp.GetSemanticModel(syntaxTree); 3536var model = comp.GetSemanticModel(syntaxTree); 3597var model = comp.GetSemanticModel(syntaxTree); 3660var model = comp.GetSemanticModel(syntaxTree); 3697var model = comp.GetSemanticModel(tree); 3702Assert.True(model.TryGetSpeculativeSemanticModel(localFunctionBody.Body!.OpenBraceToken.SpanStart + 1, @return, out var specModel)); 3732var model = comp.GetSemanticModel(tree); 3737Assert.True(model.TryGetSpeculativeSemanticModel(localFunctionBody.Block!.OpenBraceToken.SpanStart + 1, @return, out var specModel)); 3768var model = comp.GetSemanticModel(syntaxTree); 3782Assert.True(model.TryGetSpeculativeSemanticModel(lambda.Body.SpanStart, newStatement, out var speculativeModel)); 3807var model = comp.GetSemanticModel(syntaxTree); 3853var model = comp.GetSemanticModel(syntaxTree); 3912var model = comp.GetSemanticModel(syntaxTree); 3977var model = comp.GetSemanticModel(syntaxTree); 4046var model = comp.GetSemanticModel(syntaxTree); 4067Assert.True(model.TryGetSpeculativeSemanticModel(localFunction.SpanStart, speculativeAttribute, out var speculativeModel)); 4113var model = comp.GetSemanticModel(syntaxTree); 4176var model = comp.GetSemanticModel(syntaxTree); 4210var model = comp.GetSemanticModel(syntaxTree); 4215Assert.True(model.TryGetSpeculativeSemanticModel(attributeUsage.SpanStart, newAttributeUsage, out var specModel)); 4242var model = comp.GetSemanticModel(syntaxTree); 4271var model = comp.GetSemanticModel(syntaxTree); 4305var model = comp.GetSemanticModel(syntaxTree); 4335var model = comp.GetSemanticModel(tree); 4365var model = comp.GetSemanticModel(tree); 4369Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4393var model = comp.GetSemanticModel(tree); 4397Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4421var model = comp.GetSemanticModel(tree); 4427Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4451var model = comp.GetSemanticModel(tree); 4457Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4481var model = comp.GetSemanticModel(tree); 4487Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, statement, out var speculativeModel)); 4511var model = comp.GetSemanticModel(tree); 4519Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(type.SpanStart, methodDeclaration, out var speculativeModel)); 4543var model = comp.GetSemanticModel(tree); 4552Assert.True(model.TryGetSpeculativeSemanticModelForMethodBody(type.SpanStart, methodDeclaration, out var speculativeModel)); 4576var model = comp.GetSemanticModel(tree); 4580Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, arrow, out var speculativeModel)); 4604var model = comp.GetSemanticModel(tree); 4610Assert.True(model.TryGetSpeculativeSemanticModel(type.SpanStart, arrow, out var speculativeModel)); 4637var model = comp.GetSemanticModel(tree); 4641Assert.True(model.TryGetSpeculativeSemanticModel(initializer.SpanStart, newInitializer, out var speculativeModel)); 4668var model = comp.GetSemanticModel(tree); 4674Assert.True(model.TryGetSpeculativeSemanticModel(initializer.SpanStart, newInitializer, out var speculativeModel)); 4699var model = comp.GetSemanticModel(tree); 4729var model = comp.GetSemanticModel(tree); 4780var model = comp.GetSemanticModel(syntaxTree); 4815var model = comp.GetSemanticModel(tree); 4849var model = context.SemanticModel; 4901var model = comp.GetSemanticModel(tree); 4913Assert.True(model.TryGetSpeculativeSemanticModel(spanStart, newBody, out var speculativeModel)); 4935var model = comp.GetSemanticModel(tree); 4966var model = comp.GetSemanticModel(tree); 5009var model = comp.GetSemanticModel(tree); 5055var model = comp.GetSemanticModel(tree); 5075var model = comp.GetSemanticModel(tree); 5109var model = comp.GetSemanticModel(tree); 5141var model = comp.GetSemanticModel(tree); 5169var model = comp.GetSemanticModel(tree);
Symbols\Source\UpdatedContainingSymbolAndNullableAnntotationTests.cs (1)
35var model = comp.GetSemanticModel(syntaxTree);
Symbols\Source\UsingAliasTests.cs (22)
45var model = comp.GetSemanticModel(tree); 102var model = comp.GetSemanticModel(tree); 162var model = comp.GetSemanticModel(tree); 217var model = comp.GetSemanticModel(tree); 272var model = comp.GetSemanticModel(tree); 309var model = comp.GetSemanticModel(tree); 355var model = comp.GetSemanticModel(tree); 386var model = comp.GetSemanticModel(tree); 407var model = comp.GetSemanticModel(tree); 426var model = comp.GetSemanticModel(tree); 445var model = comp.GetSemanticModel(tree); 464var model = comp.GetSemanticModel(tree); 483var model = comp.GetSemanticModel(tree); 504var model = comp.GetSemanticModel(tree); 543var model = comp.GetSemanticModel(syntaxTree); 563var model = comp.GetSemanticModel(syntaxTree); 582var model = comp.GetSemanticModel(syntaxTree); 602var model = comp.GetSemanticModel(syntaxTree); 626var model = comp.GetSemanticModel(syntaxTree); 649var model = comp.GetSemanticModel(syntaxTree); 700var model = compilation.GetSemanticModel(tree); 743var 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); 13191var model = compilation1.GetSemanticModel(tree); 13277var model = compilation1.GetSemanticModel(tree); 13399var model = compilation1.GetSemanticModel(tree); 14112var model = compilation1.GetSemanticModel(tree); 14737var model = compilation1.GetSemanticModel(tree); 15143var model = compilation1.GetSemanticModel(tree); 15411var model = compilation1.GetSemanticModel(tree); 19583var model = compilation1.GetSemanticModel(tree); 19666var model = compilation1.GetSemanticModel(tree); 19758var model = compilation1.GetSemanticModel(tree); 19847var model = compilation1.GetSemanticModel(tree); 28796var model = compilation1.GetSemanticModel(tree); 30303var model = compilation1.GetSemanticModel(tree); 30494var model = compilation1.GetSemanticModel(tree); 30960var 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)
1674var model = comp.GetSemanticModel(tree); 1758var model = comp.GetSemanticModel(tree); 1849var 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 (1)
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)
1566public Tuple<TNode, SemanticModel> GetBindingNodeAndModel<TNode>(CSharpCompilation compilation, int treeIndex = 0) where TNode : SyntaxNode 1569return new Tuple<TNode, SemanticModel>(node, compilation.GetSemanticModel(compilation.SyntaxTrees[treeIndex])); 1572public Tuple<TNode, SemanticModel> GetBindingNodeAndModel<TNode>(Compilation compilation, int treeIndex = 0) where TNode : SyntaxNode 1577public Tuple<IList<TNode>, SemanticModel> GetBindingNodesAndModel<TNode>(CSharpCompilation compilation, int treeIndex = 0, int which = -1) where TNode : SyntaxNode 1580return new Tuple<IList<TNode>, SemanticModel>(nodes, compilation.GetSemanticModel(compilation.SyntaxTrees[treeIndex])); 1940var model = compilation.GetSemanticModel(tree); 1990protected static void VerifyOperationTreeForNode(CSharpCompilation compilation, SemanticModel model, SyntaxNode syntaxNode, string expectedOperationTree) 2013var model = compilation.GetSemanticModel(syntaxNode.SyntaxTree);
FunctionPointerUtilities.cs (3)
134SemanticModel model, 234static void verifyNestedFunctionPointerSyntaxSemanticInfo(SemanticModel model, IFunctionPointerTypeSymbol ptrType, SeparatedSyntaxList<FunctionPointerParameterSyntax> paramSyntaxes) 250static 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)
669var model = comp.GetSemanticModel(tree);
CodeGen\WinRTCollectionTests.cs (1)
7421var model = comp.GetSemanticModel(tree);
Microsoft.CodeAnalysis.CSharp.Workspaces (294)
ArgumentSyntaxExtensions.cs (1)
41SemanticModel semanticModel,
AttributeArgumentSyntaxExtensions.cs (1)
24SemanticModel semanticModel,
CaseCorrection\CSharpCaseCorrectionService.cs (1)
26SemanticModel? semanticModel,
CastSimplifier.cs (34)
45public static bool IsUnnecessaryCast(ExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 53public static bool IsUnnecessaryAsCast(BinaryExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 60public static bool IsUnnecessaryCast(CastExpressionSyntax cast, SemanticModel semanticModel, CancellationToken cancellationToken) 114SemanticModel semanticModel, 146SemanticModel semanticModel, 171SemanticModel originalSemanticModel, CancellationToken cancellationToken) 242SemanticModel originalSemanticModel, IDelegateCreationOperation originalDelegateCreationOperation, 271SemanticModel originalSemanticModel, IConversionOperation originalConversionOperation, 524ExpressionSyntax castNode, ExpressionSyntax castedExpressionNode, SemanticModel semanticModel, CancellationToken cancellationToken) 611ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, 678ExpressionSyntax castNode, SemanticModel originalSemanticModel, 679ExpressionSyntax rewrittenExpression, SemanticModel rewrittenSemanticModel, CancellationToken cancellationToken) 759SemanticModel semanticModel, 835SemanticModel semanticModel, 894SemanticModel semanticModel, CancellationToken cancellationToken) 961private static bool IsFieldOrArrayElement(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 968ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 982SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1006SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1040SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel) 1071SemanticModel originalSemanticModel, 1072SemanticModel rewrittenSemanticModel, 1180SemanticModel originalSemanticModel, 1181SemanticModel rewrittenSemanticModel, 1220SemanticModel semanticModel, 1258MemberAccessExpressionSyntax memberAccessExpression, SemanticModel semanticModel, 1314SemanticModel originalSemanticModel, SemanticModel rewrittenSemanticModel, 1336private static (SemanticModel? rewrittenSemanticModel, ExpressionSyntax? rewrittenExpression) GetSemanticModelWithCastRemoved( 1339SemanticModel originalSemanticModel, 1345var rewrittenSemanticModel = analyzer.SpeculativeSemanticModel;
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (1)
25SemanticModel semanticModel,
Classification\SyntaxClassification\NameSyntaxClassifier.cs (5)
24SemanticModel semanticModel, 52SemanticModel semanticModel, 69SemanticModel semanticModel, 102SemanticModel semanticModel, 138SemanticModel semanticModel,
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.cs (1)
26SemanticModel semanticModel,
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (1)
27SemanticModel semanticModel,
Classification\SyntaxClassification\UsingDirectiveSyntaxClassifier.cs (2)
19SemanticModel semanticModel, 34SemanticModel semanticModel,
CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
42var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpSemanticFacts.cs (29)
38public bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 41public bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 44public bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 47public bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 50public bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 53public bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken) 56public ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 109SemanticModel oldSemanticModel, 112[NotNullWhen(true)] out SemanticModel? speculativeModel) 116var model = oldSemanticModel; 126public ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken) 128var original = model.GetOriginalSemanticModel(); 167public ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement) 185public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 188public IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 199public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 211public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 244SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 262public IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 265public IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 269public ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 272public ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 277public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken) 292/// cref="ModelExtensions.GetSymbolInfo(SemanticModel, SyntaxNode, CancellationToken)"/>, but sometimes employs 296private static ImmutableArray<ISymbol> GetSymbolInfo(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 365public bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 373var semanticModel = compilation.GetSemanticModel(syntaxReference.SyntaxTree); 389public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken) 392public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken)
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)
CSharpSyntaxContext.cs (3)
52SemanticModel semanticModel, 177public static CSharpSyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken) 181Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
CSharpSyntaxContextService.cs (1)
22public SyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
CSharpTypeInferenceService.cs (1)
27protected override AbstractTypeInferrer CreateTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpTypeInferenceService.TypeInferrer.cs (3)
30SemanticModel semanticModel, 2098var currentSemanticModel = SemanticModel; 2099var originalSemanticModel = currentSemanticModel.GetOriginalSemanticModel();
CSharpTypeStyleHelper.cs (8)
18private readonly SemanticModel _semanticModel; 37public TypeStyleResult(CSharpTypeStyleHelper helper, TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, bool isStylePreferred, ReportDiagnostic severity, CancellationToken cancellationToken) : this() 58TypeSyntax typeName, SemanticModel semanticModel, 76TypeSyntax typeName, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken); 79SyntaxToken identifier, TypeSyntax typeName, ExpressionSyntax initializer, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken); 81internal TypeSyntax? FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) 114protected virtual bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 117protected virtual bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken)
CSharpTypeStyleHelper.State.cs (4)
30SyntaxNode declaration, SemanticModel semanticModel, 64private static bool IsTypeApparentInDeclaration(VariableDeclarationSyntax variableDeclaration, SemanticModel semanticModel, UseVarPreference stylePreferences, CancellationToken cancellationToken) 91private static bool IsPredefinedTypeInDeclaration(SyntaxNode declarationStatement, SemanticModel semanticModel) 130private static bool IsInferredPredefinedType(SyntaxNode declarationStatement, SemanticModel semanticModel)
CSharpUnnecessaryImportsProvider.cs (1)
24SemanticModel model,
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,
CSharpUseImplicitTypeHelper.cs (8)
30TypeSyntax typeName, SemanticModel semanticModel, 60protected override bool ShouldAnalyzeForEachStatement(ForEachStatementSyntax forEachStatement, SemanticModel semanticModel, CancellationToken cancellationToken) 92TypeSyntax typeName, SemanticModel semanticModel, 172SemanticModel semanticModel, 202var newSemanticModel = semanticModel.Compilation.ReplaceSyntaxTree(tree, newTree).GetSemanticModel(newTree); 211private static bool IsSafeToSwitchToVarWithoutNeedingSpeculation(DeclarationExpressionSyntax declarationExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 274SemanticModel semanticModel, 346protected override bool ShouldAnalyzeDeclarationExpression(DeclarationExpressionSyntax declaration, SemanticModel semanticModel, CancellationToken cancellationToken)
DefaultExpressionSyntaxExtensions.cs (3)
22SemanticModel semanticModel, 38DefaultExpressionSyntax defaultExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 83DefaultExpressionSyntax defaultExpression, SemanticModel semanticModel, CancellationToken cancellationToken)
Editing\CSharpImportAdder.cs (5)
29protected override INamespaceSymbol? GetExplicitNamespaceSymbol(SyntaxNode node, SemanticModel model) 43SemanticModel model, 53private static INamespaceSymbol? GetExplicitNamespaceSymbol(ExpressionSyntax fullName, ExpressionSyntax namespacePart, SemanticModel model) 81private readonly SemanticModel _model; 114SemanticModel model,
Extensions\SemanticModelExtensions.cs (7)
24public static INamespaceSymbol GetDeclaredSymbol(this SemanticModel semanticModel, BaseNamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default) 38this SemanticModel semanticModel, 47this SemanticModel semanticModel, 56this SemanticModel semanticModel, 79this SemanticModel semanticModel, 101this SemanticModel semanticModel, ArgumentSyntax argument, CancellationToken cancellationToken) 114this SemanticModel semanticModel, AttributeArgumentSyntax argument, CancellationToken cancellationToken)
ExternalAccess\Pythia\Api\PythiaSymbolExtensions.cs (1)
35public static bool IsAwaitableNonDynamic(this ISymbol? symbol, SemanticModel semanticModel, int position)
ForEachStatementSyntaxExtensions.cs (1)
13public static bool IsTypeInferred(this CommonForEachStatementSyntax forEachStatement, SemanticModel semanticModel)
InternalExtensions.cs (2)
18SemanticModel semanticModel, 24public static ITypeSymbol DetermineParameterType(ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (5)
321SemanticModel semanticModel, 410[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 440[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 451this ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken) 635SemanticModel semanticModel,
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (1)
971SemanticModel semanticModel,
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs\TypeSyntaxExtensions.cs (1)
26public static bool IsTypeInferred(this TypeSyntax typeSyntax, SemanticModel semanticModel)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
682public static bool IsNumericTypeContext(this SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (9)
617SemanticModel? semanticModel = null) 716this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, SemanticModel? semanticModel = null) 963SemanticModel? semanticModelOpt = null) 1697SemanticModel? semanticModelOpt = null) 1990public static bool IsInstanceContext(this SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken) 2160SemanticModel? semanticModel = null) 2739public static bool IsNameOfContext(this SyntaxTree syntaxTree, int position, SemanticModel? semanticModelOpt = null, CancellationToken cancellationToken = default) 2807SemanticModel semanticModel, 3003public static bool IsEnumTypeMemberAccessContext(this SyntaxTree syntaxTree, SemanticModel semanticModel, int position, CancellationToken cancellationToken)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (3)
103SemanticModel semanticModel, 132var speculativeSemanticModel = specAnalyzer.SpeculativeSemanticModel; 166SemanticModel semanticModel,
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs\ITypeSymbolExtensions.cs (1)
112public static async Task<ISymbol?> FindApplicableAliasAsync(this ITypeSymbol type, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs\TypeSyntaxExtensions.cs (1)
16public static bool IsPotentialTypeName([NotNullWhen(true)] this TypeSyntax? typeSyntax, SemanticModel? semanticModelOpt, CancellationToken cancellationToken)
NullableHelpers.cs (3)
18/// <see cref="IsSymbolAssignedPossiblyNullValue(SemanticModel, IOperation, ISymbol)"/>. Note 22public static bool IsDeclaredSymbolAssignedPossiblyNullValue(SemanticModel semanticModel, SyntaxNode declarationSyntax, CancellationToken cancellationToken) 45public static bool? IsSymbolAssignedPossiblyNullValue(SemanticModel semanticModel, IOperation operation, ISymbol symbol)
ParenthesizedExpressionSyntaxExtensions.cs (3)
21this ParenthesizedExpressionSyntax node, SemanticModel semanticModel, CancellationToken cancellationToken) 304SemanticModel semanticModel, CancellationToken cancellationToken) 379ParenthesizedExpressionSyntax node, ExpressionSyntax parentExpression, SemanticModel semanticModel)
Recommendations\CSharpRecommendationServiceRunner.cs (2)
539var semanticModel = _context.SemanticModel; 559private ITypeSymbol? GetContainerForUnnamedSymbols(SemanticModel semanticModel, ExpressionSyntax originalExpression)
Rename\CSharpRenameRewriterLanguageService.cs (5)
58private readonly SemanticModel _semanticModel; 106private SemanticModel? _speculativeModel; 1033SemanticModel semanticModel, 1249public static SemanticModel? GetSemanticModelForNode(SyntaxNode node, SemanticModel originalSemanticModel)
SemanticModelExtensions.cs (10)
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, 317this SemanticModel semanticModel, 351this SemanticModel semanticModel, ExpressionSyntax expression, 424SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) 454public static INamedTypeSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, BaseTypeDeclarationSyntax declarationSyntax, CancellationToken cancellationToken)
SemanticModelReuse\CSharpSemanticModelReuseLanguageService.cs (3)
58protected override SemanticModel? TryGetSpeculativeSemanticModelWorker(SemanticModel previousSemanticModel, SyntaxNode previousBodyNode, SyntaxNode currentBodyNode) 63previousSemanticModel.TryGetSpeculativeSemanticModelForMethodBody(previousBaseMethod.Body.SpanStart, currentBaseMethod, out var speculativeModel))
Simplification\CSharpSimplificationService.cs (5)
54public override SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken) 79public override SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken) 171protected override SemanticModel GetSpeculativeSemanticModel(ref SyntaxNode nodeToSpeculate, SemanticModel originalSemanticModel, SyntaxNode originalNode) 187protected override void GetUnusedNamespaceImports(SemanticModel model, HashSet<SyntaxNode> namespaceImports, CancellationToken cancellationToken)
Simplification\CSharpSimplificationService.Expander.cs (5)
44private readonly SemanticModel _semanticModel; 51SemanticModel semanticModel, 96var speculativeSemanticModel = speculativeAnalyzer.SpeculativeSemanticModel; 786private static bool IsInvocationWithDynamicArguments(SimpleNameSyntax originalSimpleName, SemanticModel semanticModel) 1020private bool IsTypeOfUnboundGenericType(SemanticModel semanticModel, TypeOfExpressionSyntax typeOfExpression)
Simplification\Reducers\AbstractCSharpReducer.AbstractReductionRewriter.cs (5)
27protected SemanticModel? SemanticModel { get; private set; } 124Func<TNode, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> simplifier) 159Func<TExpression, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> simplifier) 169protected SyntaxToken SimplifyToken(SyntaxToken token, Func<SyntaxToken, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxToken> simplifier) 198public 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)
28private readonly Func<DefaultExpressionSyntax, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> _simplifyDefaultExpression; 32SemanticModel semanticModel,
Simplification\Reducers\CSharpEscapingReducer.cs (2)
24private static readonly Func<SyntaxToken, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxToken> s_simplifyIdentifierToken = SimplifyIdentifierToken; 35SemanticModel semanticModel,
Simplification\Reducers\CSharpExtensionMethodReducer.cs (3)
24private static readonly Func<InvocationExpressionSyntax, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> s_simplifyExtensionMethod = SimplifyExtensionMethod; 35SemanticModel semanticModel, 54private static InvocationExpressionSyntax TryReduceExtensionMethod(InvocationExpressionSyntax node, SemanticModel semanticModel, InvocationExpressionSyntax rewrittenNode, SimpleNameSyntax expressionName)
Simplification\Reducers\CSharpInferredMemberNameReducer.Rewriter.cs (4)
28private readonly Func<ArgumentSyntax, SemanticModel, SimplifierOptions, CancellationToken, ArgumentSyntax> s_simplifyTupleName; 30private ArgumentSyntax SimplifyTupleName(ArgumentSyntax node, SemanticModel semanticModel, SimplifierOptions options, CancellationToken cancellationToken) 40private static readonly Func<AnonymousObjectMemberDeclaratorSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyAnonymousTypeMemberName = SimplifyAnonymousTypeMemberName; 42private static SyntaxNode SimplifyAnonymousTypeMemberName(AnonymousObjectMemberDeclaratorSyntax node, SemanticModel semanticModel, SimplifierOptions options, CancellationToken canellationToken)
Simplification\Reducers\CSharpMiscellaneousReducer.cs (7)
27private static readonly Func<ParameterSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyParameter = SimplifyParameter; 38SemanticModel semanticModel, 71SemanticModel semanticModel, 85private static readonly Func<ParenthesizedLambdaExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyParenthesizedLambdaExpression = SimplifyParenthesizedLambdaExpression; 89SemanticModel semanticModel, 113private static readonly Func<BlockSyntax, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> s_simplifyBlock = SimplifyBlock; 117SemanticModel semanticModel,
Simplification\Reducers\CSharpNameReducer.cs (2)
24private static readonly Func<SyntaxNode, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxNode> s_simplifyName = SimplifyName; 35SemanticModel semanticModel,
Simplification\Reducers\CSharpNullableAnnotationReducer.cs (2)
22private static readonly Func<NullableTypeSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyNullableType = SimplifyNullableType; 33SemanticModel semanticModel,
Simplification\Reducers\CSharpParenthesizedExpressionReducer.cs (2)
22private static readonly Func<ParenthesizedExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyParentheses = SimplifyParentheses; 33SemanticModel semanticModel,
Simplification\Reducers\CSharpParenthesizedPatternReducer.cs (2)
24private static readonly Func<ParenthesizedPatternSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyParentheses = SimplifyParentheses; 35SemanticModel semanticModel,
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (15)
32private static readonly ConditionalWeakTable<SemanticModel, StrongBox<bool>> s_modelToHasUsingAliasesMap = new(); 39protected static SyntaxToken? TryGetPredefinedKeywordToken(SemanticModel semanticModel, SpecialType specialType) 79ExpressionSyntax node, SemanticModel semanticModel, 91var originalModel = semanticModel.GetOriginalSemanticModel(); 202private static bool HasUsingAliases(SemanticModel semanticModel, CancellationToken cancellationToken) 217private static bool ComputeHasUsingAliases(SemanticModel model, CancellationToken cancellationToken) 263private static bool ValidateAliasForTarget(IAliasSymbol aliasReplacement, SemanticModel semanticModel, ExpressionSyntax node, ISymbol symbol) 316private static IAliasSymbol GetAliasForSymbol(INamespaceOrTypeSymbol symbol, SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 318var originalSemanticModel = semanticModel.GetOriginalSemanticModel(); 339private static int? GetNamespaceIdForAliasSearch(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 366private static SyntaxNode GetStartNodeForNamespaceId(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 371var originalSemanticMode = semanticModel.GetOriginalSemanticModel(); 385protected static bool InsideNameOfExpression(ExpressionSyntax expression, SemanticModel semanticModel) 399protected static bool PreferPredefinedTypeKeywordInMemberAccess(ExpressionSyntax expression, CSharpSimplifierOptions options, SemanticModel semanticModel) 409ExpressionSyntax expression, ExpressionSyntax simplifiedNode, SemanticModel semanticModel)
Simplification\Simplifiers\ExpressionSimplifier.cs (10)
35SemanticModel semanticModel, 68SemanticModel semanticModel, 91SemanticModel semanticModel, 225SemanticModel semanticModel, 264SemanticModel semanticModel, 317SemanticModel semanticModel, 368SemanticModel semanticModel, MemberAccessExpressionSyntax memberAccess, CancellationToken cancellationToken) 392private static bool AccessMethodWithDynamicArgumentInsideStructConstructor(MemberAccessExpressionSyntax memberAccess, SemanticModel semanticModel) 408SemanticModel semanticModel, 473protected static bool ReplacementChangesSemantics(ExpressionSyntax originalExpression, ExpressionSyntax replacedExpression, SemanticModel semanticModel)
Simplification\Simplifiers\MemberAccessExpressionSimplifier.cs (1)
31SemanticModel semanticModel, MemberAccessExpressionSyntax memberAccessExpression, CancellationToken cancellationToken)
Simplification\Simplifiers\NameSimplifier.cs (10)
35SemanticModel semanticModel, 361SemanticModel semanticModel, CancellationToken cancellationToken) 391private static bool CanSimplifyNullable(INamedTypeSymbol type, NameSyntax name, SemanticModel semanticModel) 450SemanticModel semanticModel, 560NameSyntax name, TypeSyntax reducedName, SemanticModel semanticModel) 595private static bool CanReplaceWithReducedName(NameSyntax name, TypeSyntax reducedName, SemanticModel semanticModel, CancellationToken cancellationToken) 658private static bool IsNonReducableQualifiedNameInUsingDirective(SemanticModel model, NameSyntax name) 666private static bool IsQualifiedNameInUsingDirective(SemanticModel model, NameSyntax name) 695private static bool IsInScriptClass(SemanticModel model, NameSyntax name) 711private static bool PreferPredefinedTypeKeywordInDeclarations(NameSyntax name, CSharpSimplifierOptions options, SemanticModel semanticModel)
Simplification\Simplifiers\QualifiedCrefSimplifier.cs (3)
28SemanticModel semanticModel, 73QualifiedCrefSyntax crefSyntax, SemanticModel semanticModel, 80QualifiedCrefSyntax crefSyntax, SemanticModel semanticModel,
SpeculationAnalyzer.cs (17)
57SemanticModel semanticModel, 94protected override void ValidateSpeculativeSemanticModel(SemanticModel speculativeSemanticModel, SyntaxNode nodeToSpeculate) 104protected override SemanticModel CreateSpeculativeSemanticModel(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel) 107public static SemanticModel CreateSpeculativeSemanticModelForNode(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel) 114public static SemanticModel CreateSpeculativeSemanticModelForNode(SyntaxNode nodeToSpeculate, SemanticModel semanticModel, int position, bool isInNamespaceOrTypeContext) 125SemanticModel speculativeModel; 641protected override bool IsForEachTypeInferred(CommonForEachStatementSyntax forEachStatement, SemanticModel semanticModel) 740protected override bool ConversionsAreCompatible(SemanticModel originalModel, ExpressionSyntax originalExpression, SemanticModel newModel, ExpressionSyntax newExpression) 804protected override bool ForEachConversionsAreCompatible(SemanticModel originalModel, CommonForEachStatementSyntax originalForEach, SemanticModel newModel, CommonForEachStatementSyntax newForEach) 812protected override void GetForEachSymbols(SemanticModel model, CommonForEachStatementSyntax forEach, out IMethodSymbol getEnumeratorMethod, out ITypeSymbol elementType) 822protected override Conversion ClassifyConversion(SemanticModel model, ExpressionSyntax expression, ITypeSymbol targetType) 825protected override Conversion ClassifyConversion(SemanticModel model, ITypeSymbol originalType, ITypeSymbol targetType)
TypeDeclarationSyntaxExtensions.cs (1)
69public static IEnumerable<BaseTypeSyntax> GetAllBaseListTypes(this TypeDeclarationSyntax typeNode, SemanticModel model, CancellationToken cancellationToken)
TypeStyleHelper.cs (2)
32SemanticModel semanticModel, 120SemanticModel semanticModel,
VariableDeclaratorExtensions.cs (1)
23public static bool IsTypeInferred(this VariableDeclaratorSyntax variable, SemanticModel semanticModel)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\AddImportsTests.cs (1)
45var model = await doc.GetSemanticModelAsync();
CodeGeneration\SyntaxGeneratorTests.cs (1)
4700var semanticModel = compilation.GetSemanticModel(tree);
Microsoft.CodeAnalysis.EditorFeatures (3)
GoToDefinition\AbstractGoToDefinitionService.cs (1)
147var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (1)
212var semanticModel = await documentWithOriginalName.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (1)
177var semanticModel = await document.ReuseExistingSpeculativeModelAsync(token.Parent, _cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (1)
Snippets\CSharpSnippets\SnippetFunctions\SnippetFunctionGenerateSwitchCases.cs (1)
70var model = document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult(cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (9)
ChangeSignature\AddedParameterOrExistingIndex.cs (1)
64var semanticModel = document.GetRequiredSemanticModelAsync(CancellationToken.None).AsTask().Result;
Completion\AbstractArgumentProviderTests`1.cs (2)
67var semanticModel = await document.GetRequiredSemanticModelAsync(CancellationToken.None); 77private IParameterSymbol GetParameterSymbolInfo(Workspace workspace, SemanticModel semanticModel, SyntaxNode root, int position, CancellationToken cancellationToken)
EditAndContinue\EditAndContinueTestHelpers.cs (2)
148var oldModel = oldDocument.GetSemanticModelAsync().Result; 149var newModel = newDocument.GetSemanticModelAsync().Result;
Semantics\SpeculationAnalyzerTestsBase.cs (2)
42var initialModel = initialCompilation.GetSemanticModel(initialTree); 69protected abstract bool ReplacementChangesSemantics(SyntaxNode initialNode, SyntaxNode replacementNode, SemanticModel initialModel);
TypeInferrer\TypeInferrerTestBase.cs (2)
41/// Specifies the test is going to call into <see cref="ITypeInferenceService.InferTypes(SemanticModel, SyntaxNode, string, System.Threading.CancellationToken)"/>. 46/// Specifies the test is going to call into <see cref="ITypeInferenceService.InferTypes(SemanticModel, int, string, System.Threading.CancellationToken)"/>.
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (41)
CodeGeneration\CodeGenerationTests.cs (35)
62Func<SemanticModel, ITypeSymbol> type = null, 109ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 144Func<SemanticModel, ImmutableArray<IMethodSymbol>> getExplicitInterfaces = null, 146ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 190ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 231ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 274Func<SemanticModel, IParameterSymbol> fromType, 331ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters, 352ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 384ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 386Func<SemanticModel, ImmutableArray<IEventSymbol>> getExplicitInterfaceImplementations = null, 429ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 523ImmutableArray<Func<SemanticModel, ISymbol>> members = default, 583Func<SemanticModel, ITypeSymbol> getType = null, 584ImmutableArray<Func<SemanticModel, ISymbol>> getNewMembers = default, 645var semanticModel = await testContext.Solution 669internal static Func<SemanticModel, IParameterSymbol> Parameter(Type type, string name, bool hasDefaultValue = false, object defaultValue = null, bool isParams = false) 676internal static Func<SemanticModel, IParameterSymbol> Parameter(string typeFullName, string parameterName, bool hasDefaultValue = false, object defaultValue = null, bool isParams = false, int typeArrayRank = 0) 692internal static ImmutableArray<Func<SemanticModel, IParameterSymbol>> Parameters(params Func<SemanticModel, IParameterSymbol>[] p) 695internal static ImmutableArray<Func<SemanticModel, ISymbol>> Members(params Func<SemanticModel, ISymbol>[] m) 698internal static Func<SemanticModel, ITypeSymbol> CreateArrayType(Type type, int rank = 1) 701private static ImmutableArray<IParameterSymbol> GetParameterSymbols(ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters, TestContext context) 707Func<SemanticModel, ImmutableArray<IMethodSymbol>> explicitInterface, TestContext context) 712private static ImmutableArray<ISymbol> GetSymbols(ImmutableArray<Func<SemanticModel, ISymbol>> members, TestContext context) 719private static Func<SemanticModel, ISymbol> CreateEnumField(string name, object value) 726internal static Func<SemanticModel, ISymbol> CreateField(Accessibility accessibility, Editing.DeclarationModifiers modifiers, Type type, string name) 733private static Func<SemanticModel, INamedTypeSymbol> GetTypeSymbol(Type type) 736private static Func<SemanticModel, INamedTypeSymbol> GetTypeSymbol(string typeMetadataName) 857public SemanticModel SemanticModel; 872SemanticModel semanticModel) 890var semanticModel = await workspace.CurrentSolution.Projects.Single().Documents.Single().GetSemanticModelAsync(); 909public IEnumerable<ISymbol> GetAnnotatedDeclaredSymbols(string key, SemanticModel semanticModel) 918public static T GetSelectedSymbol<T>(TextSpan selection, SemanticModel semanticModel)
CodeGeneration\CodeGenerationTests.VisualBasic.cs (1)
409static ImmutableArray<IEventSymbol> GetExplicitInterfaceEvent(SemanticModel semanticModel)
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
327var semanticModel = await document.GetRequiredSemanticModelAsync(CancellationToken.None);
StackTraceExplorer\StackTraceExplorerTests.cs (1)
51var semanticModel = await doc.GetRequiredSemanticModelAsync(CancellationToken.None);
SymbolFinder\DependentTypeFinderTests.cs (1)
644var semanticModel = await csDoc.GetSemanticModelAsync();
SymbolKey\SymbolKeyCrossLanguageTests.cs (1)
43var semanticModel = await csDocument.GetRequiredSemanticModelAsync(CancellationToken.None);
Utilities\SymbolEquivalenceComparerTests.cs (1)
1766var model = compilation.GetSemanticModel(invocation.SyntaxTree);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Peek\PeekableItemSource.cs (1)
97var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (6)
EmbeddedLanguages\AspNetCoreCSharpRouteSyntaxDetector.cs (1)
30SemanticModel 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.Razor (1)
RazorClassifierAccessor.cs (1)
18var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (644)
AbstractAddAccessibilityModifiersCodeFixProvider.cs (1)
47var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (2)
91var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 101Document document, SemanticModel semanticModel, Diagnostic diagnostic,
AbstractAddExplicitCastCodeFixProvider.cs (5)
52Document document, SemanticModel semanticModel, SyntaxNode root, 63var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 105SemanticModel semanticModel, 142private static string GetSubItemName(SemanticModel semanticModel, int position, ITypeSymbol conversionType) 151SemanticModel semanticModel,
AbstractAddParameterCodeFixProvider.cs (9)
37protected abstract ITypeSymbol GetArgumentType(SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken); 46SemanticModel semanticModel, 60var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 115SemanticModel semanticModel, 136SemanticModel semanticModel, 184SemanticModel semanticModel, 394var semanticModel = await invocationDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 412var semanticModel = await invocationDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 429SemanticModel semanticModel,
AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
42var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
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);
AbstractConvertTypeOfToNameOfCodeFixProvider.cs (3)
22protected abstract SyntaxNode GetSymbolTypeExpression(SemanticModel model, TMemberAccessExpressionSyntax node, CancellationToken cancellationToken); 38var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 51public void ConvertTypeOfToNameOf(SemanticModel semanticModel, SyntaxEditor editor, TMemberAccessExpressionSyntax nodeToReplace, CancellationToken cancellationToken)
AbstractForEachCastCodeFixProvider.cs (3)
25protected abstract ITypeSymbol GetForEachElementType(SemanticModel semanticModel, TForEachStatementSyntax forEachStatement); 48var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 59SemanticModel semanticModel,
AbstractForEachCastDiagnosticAnalyzer.cs (2)
41protected abstract (CommonConversion conversion, ITypeSymbol? collectionElementType) GetForEachInfo(SemanticModel semanticModel, TForEachStatementSyntax node); 61var semanticModel = context.SemanticModel;
AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
76var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
34protected abstract bool IsWrittenTo(SemanticModel semanticModel, TThisExpression expression, CancellationToken cancellationToken);
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);
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);
AbstractMakeTypePartialCodeFixProvider.cs (1)
33var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
91private bool IsFixSupported(SemanticModel semanticModel, TNamespaceSyntax namespaceDeclaration, CancellationToken cancellationToken) 168protected bool ContainsPartialTypeWithMultipleDeclarations(TNamespaceSyntax namespaceDeclaration, SemanticModel semanticModel)
AbstractObjectCreationExpressionAnalyzer.cs (2)
27protected SemanticModel _semanticModel; 41SemanticModel semanticModel,
AbstractPopulateSwitchCodeFixProvider.cs (3)
50Document document, SyntaxEditor editor, SemanticModel semanticModel, 149var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 159SyntaxEditor editor, SemanticModel semanticModel,
AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
30Document document, SyntaxEditor editor, SemanticModel semanticModel,
AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
31Document document, SyntaxEditor editor, SemanticModel semanticModel,
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)
AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
76public void AnalyzeAssemblyOrModuleAttribute(SyntaxNode attributeSyntax, SemanticModel model, Action<Diagnostic> reportDiagnostic, CancellationToken cancellationToken)
AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (2)
32protected abstract bool IsUnnecessaryCast(SemanticModel model, TCastExpression node, CancellationToken cancellationToken); 53private Diagnostic? TryRemoveCastExpression(SemanticModel model, TCastExpression node, CancellationToken cancellationToken)
AbstractRemoveUnnecessaryParenthesesCodeFixProvider.cs (1)
26TParenthesizedExpressionSyntax current, SemanticModel semanticModel, CancellationToken cancellationToken);
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
44TParenthesizedExpressionSyntax parenthesizedExpression, SemanticModel semanticModel, CancellationToken cancellationToken,
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (3)
83SemanticModel semanticModel, 390SemanticModel semanticModel, 731SemanticModel semanticModel,
AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
50var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
541SemanticModel lazyModel = null;
AbstractRemoveUnusedValuesCodeFixProvider.cs (8)
123protected virtual SyntaxNode? TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts, SemanticModel semanticModel) => null; 290var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 337SemanticModel semanticModel, 374SemanticModel semanticModel, 433SemanticModel semanticModel, 909var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 922private readonly SemanticModel _semanticModel; 929SemanticModel semanticModel,
AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
52protected abstract CommonConversion GetConversion(SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken); 73var semanticModel = context.SemanticModel;
AbstractSimplifyInterpolationCodeFixProvider.cs (1)
53var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractSimplifyInterpolationHelpers.cs (2)
171private static bool IsType<T>(INamedTypeSymbol type, SemanticModel semanticModel) 174private static INamedTypeSymbol? FindType<T>(SemanticModel semanticModel)
AbstractUnsealClassCodeFixProvider.cs (1)
35var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseAutoPropertyAnalyzer.cs (7)
76protected abstract TExpression? GetSetterExpression(IMethodSymbol setMethod, SemanticModel semanticModel, CancellationToken cancellationToken); 80HashSet<string> fieldNames, ConcurrentSet<IFieldSymbol> ineligibleFields, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 83HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 151var semanticModel = context.SemanticModel; 269private IFieldSymbol? GetSetterField(SemanticModel semanticModel, IMethodSymbol setMethod, CancellationToken cancellationToken) 272private IFieldSymbol? GetGetterField(SemanticModel semanticModel, IMethodSymbol getMethod, CancellationToken cancellationToken) 275private static IFieldSymbol? CheckFieldAccessExpression(SemanticModel semanticModel, TExpression? expression, CancellationToken cancellationToken)
AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
62var semanticModel = context.SemanticModel;
AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
111var semanticModel = context.SemanticModel;
AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (2)
38protected abstract bool IsTargetTyped(SemanticModel semanticModel, TConditionalExpressionSyntax conditional, System.Threading.CancellationToken cancellationToken); 100var semanticModel = context.SemanticModel;
AbstractUseCollectionInitializerCodeFixProvider.cs (1)
79var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
88var semanticModel = context.SemanticModel;
AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
134var semanticModel = context.SemanticModel;
AbstractUseConditionalExpressionCodeFixProvider.cs (1)
105var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
67var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
53var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
60var semanticModel = context.SemanticModel; 148private static ITypeParameterSymbol? GetGenericParameterSymbol(ISyntaxFacts syntaxFacts, SemanticModel semanticModel, SyntaxNode node1, SyntaxNode node2, CancellationToken cancellationToken)
AbstractUseNullPropagationCodeFixProvider.cs (2)
72var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 92SemanticModel semanticModel,
AbstractUseNullPropagationDiagnosticAnalyzer.cs (5)
71protected abstract bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol? expressionTypeOpt, CancellationToken cancellationToken); 141var semanticModel = context.SemanticModel; 301var semanticModel = context.SemanticModel; 329SemanticModel semanticModel, 353ISyntaxFacts syntaxFacts, SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken)
AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
56var semanticModel = context.SemanticModel;
AbstractUseObjectInitializerCodeFixProvider.cs (1)
78var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractUseThrowExpressionDiagnosticAnalyzer.cs (4)
79var semanticModel = context.Operation.SemanticModel; 138private static bool ValueIsAccessed(SemanticModel semanticModel, IConditionalOperation ifOperation, IBlockOperation containingBlock, ISymbol localOrParameter, IExpressionStatementOperation expressionStatement, IAssignmentOperation assignmentExpression) 166protected abstract bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol? expressionTypeOpt, CancellationToken cancellationToken); 271SemanticModel semanticModel, IThrowOperation throwOperation,
AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
181SemanticModel semanticModel, 191SemanticModel semanticModel,
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (3)
44var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 82var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 116var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AddImport\AbstractAddImportFeatureService.cs (11)
44protected abstract ISet<INamespaceSymbol> GetImportNamespacesInScope(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 45protected abstract ITypeSymbol GetDeconstructInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 46protected abstract ITypeSymbol GetQueryClauseInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 47protected abstract bool IsViableExtensionMethod(IMethodSymbol method, SyntaxNode expression, SemanticModel semanticModel, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken); 52protected abstract bool IsAddMethodContext(SyntaxNode node, SemanticModel semanticModel); 55protected abstract (string description, bool hasExistingImport) GetDescription(Document document, AddImportPlacementOptions options, INamespaceOrTypeSymbol symbol, SemanticModel semanticModel, SyntaxNode root, CancellationToken cancellationToken); 100var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 122Document document, SemanticModel semanticModel, string diagnosticId, SyntaxNode node, int maxResults, ISymbolSearchService symbolSearchService, 541var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 602private static ITypeSymbol? GetAwaitInfo(SemanticModel semanticModel, ISyntaxFacts syntaxFactsService, SyntaxNode node) 614private static ITypeSymbol? GetCollectionExpressionType(SemanticModel semanticModel, ISyntaxFacts syntaxFactsService, SyntaxNode node)
AddImport\References\MetadataSymbolReference.cs (1)
46SemanticModel semanticModel, CancellationToken cancellationToken)
AddImport\References\ProjectSymbolReference.cs (1)
92SemanticModel semanticModel, CancellationToken cancellationToken)
AddImport\References\SymbolReference.cs (2)
85var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 132SemanticModel semanticModel, CancellationToken cancellationToken)
AddImport\SymbolReferenceFinder.cs (2)
34private readonly SemanticModel _semanticModel; 48SemanticModel semanticModel,
BraceMatching\AbstractEmbeddedLanguageBraceMatcher.cs (1)
40var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
BraceMatching\IEmbeddedLanguageBraceMatcher.cs (1)
14SemanticModel semanticModel,
ChangeSignature\AbstractChangeSignatureService.cs (3)
917var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 1035protected static bool IsParamsArrayExpandedHelper(ISymbol symbol, int argumentCount, bool lastArgumentIsNamed, SemanticModel semanticModel, SyntaxNode lastArgumentExpression, CancellationToken cancellationToken) 1063protected static int GetParameterIndexFromInvocationArgument(SyntaxNode argument, Document document, SemanticModel semanticModel, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
290var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
203var model = await _document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeLens\CodeLensReferencesService.cs (5)
53var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 111var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 218private static ISymbol GetEnclosingMethod(SemanticModel semanticModel, Location location, CancellationToken cancellationToken) 254var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 281var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeLens\ICodeLensDisplayInfoService.cs (1)
21string GetDisplayName(SemanticModel semanticModel, SyntaxNode node);
CodeRefactorings\AddAwait\AbstractAddAwaitCodeRefactoringProvider.cs (2)
42var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 71SemanticModel model, ISyntaxFactsService syntaxFacts, SyntaxNode node, CancellationToken cancellationToken)
CodeRefactorings\MoveType\AbstractMoveTypeService.cs (4)
191var semanticModel = state.SemanticDocument.SemanticModel; 214SemanticModel semanticModel, 237SemanticModel semanticModel, 259TTypeDeclarationSyntax typeNode, SemanticModel semanticModel, CancellationToken cancellationToken)
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (3)
130var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 327var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 371var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\ArgumentContext.cs (2)
18SemanticModel semanticModel, 37public SemanticModel SemanticModel { get; }
Completion\CommonCompletionUtilities.cs (6)
89SemanticModel semanticModel, 98SolutionServices workspaceServices, SemanticModel semanticModel, int position, SymbolDescriptionOptions options, IReadOnlyList<ISymbol> symbols) 104SolutionServices workspaceServices, SemanticModel semanticModel, int position, IReadOnlyList<ISymbol> symbols, SymbolDescriptionOptions options, SupportedPlatformData supportedPlatforms) 110SolutionServices workspaceServices, SemanticModel semanticModel, int position, ISymbol symbol, int overloadCount, SymbolDescriptionOptions options, SupportedPlatformData? supportedPlatforms, CancellationToken cancellationToken) 175SolutionServices workspaceServices, SemanticModel semanticModel, int position, IReadOnlyList<ISymbol> symbols, SymbolDescriptionOptions options, SupportedPlatformData? supportedPlatforms, CancellationToken cancellationToken) 198List<TaggedText> textContentBuilder, ISymbol symbol, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formatter, CancellationToken cancellationToken)
Completion\CompletionService.cs (2)
201(document, var semanticModel) = await GetDocumentWithFrozenPartialSemanticsAsync(document, cancellationToken).ConfigureAwait(false); 226(document, var semanticModel) = await GetDocumentWithFrozenPartialSemanticsAsync(document, cancellationToken).ConfigureAwait(false);
Completion\CompletionService_GetCompletions.cs (2)
77private async Task<(Document document, SemanticModel? semanticModel)> GetDocumentWithFrozenPartialSemanticsAsync(Document document, CancellationToken cancellationToken) 97(document, var semanticModel) = await GetDocumentWithFrozenPartialSemanticsAsync(document, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractAwaitCompletionProvider.cs (2)
64protected abstract ITypeSymbol? GetTypeSymbolOfExpression(SemanticModel semanticModel, SyntaxNode potentialAwaitableExpression, CancellationToken cancellationToken); 246var 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)
44protected abstract Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync(
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (2)
121var semanticModel = await document.ReuseExistingSpeculativeModelAsync(attributeNode, cancellationToken).ConfigureAwait(false); 235var semanticModel = await document.ReuseExistingSpeculativeModelAsync(constructorArgument, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
128var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (2)
20protected abstract Tuple<ITypeSymbol, Location>? GetInitializedType(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken); 30var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractOverrideCompletionProvider.cs (1)
68SemanticModel semanticModel,
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (3)
76var semanticModel = await _document.ReuseExistingSpeculativeModelAsync(startToken.Parent, _cancellationToken).ConfigureAwait(false); 89ISymbol symbol, SemanticModel semanticModel, 108SemanticModel semanticModel,
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (4)
38protected abstract string GetDisplayText(IMethodSymbol method, SemanticModel semanticModel, int position); 66var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 85var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 104private CompletionItem CreateItem(IMethodSymbol method, int line, TextSpan span, SemanticModel semanticModel, DeclarationModifiers modifiers, SyntaxToken token)
Completion\Providers\AbstractPartialTypeCompletionProvider.cs (2)
40var semanticModel = await document.ReuseExistingSpeculativeModelAsync(node, cancellationToken).ConfigureAwait(false); 88var semanticModel = context.SemanticModel;
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
54SemanticModel semanticModel,
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (2)
74var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 80var semanticModel = syntaxContext.SemanticModel;
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (3)
25private readonly SemanticModel _originatingSemanticModel; 38SemanticModel semanticModel, 61var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (1)
137var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\SymbolCompletionItem.cs (2)
195var semanticModel = await contextDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 355CompletionItem item, IReadOnlyList<ISymbol> symbols, Document document, SemanticModel semanticModel, SymbolDescriptionOptions options, CancellationToken cancellationToken)
Completion\Utilities.cs (1)
55var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\AbstractConvertAnonymousTypeCodeRefactoringProvider.cs (1)
29var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (5)
90var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 156var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 196var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 250var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 379SemanticModel semanticModel, string className,
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (3)
47var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 74SemanticModel semanticModel, 109var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
42var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
48var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (8)
45SemanticModel model, ForEachInfo info, SyntaxEditor editor, CancellationToken cancellationToken); 68var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 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) 418var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (2)
75var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 323var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (1)
52public abstract bool CanImplicitlyConvert(SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol targetType);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (3)
44var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 72SemanticModel semanticModel, 247var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertLinq\AbstractConvertLinqQueryToForEachProvider.cs (2)
25SemanticModel semanticModel, 43var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertLinq\ConvertForEachToLinqQuery\AbstractConvertForEachToLinqQueryProvider.cs (5)
31TForEachStatement forEachStatement, SemanticModel semanticModel, bool convertLocalDeclarations); 38SemanticModel semanticModel, 63IConverter<TForEachStatement, TStatement> converter, SemanticModel semanticModel, SyntaxNode root); 86var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 163SemanticModel semanticModel,
ConvertLinq\ConvertForEachToLinqQuery\ForEachInfo.cs (2)
15public SemanticModel SemanticModel { get; } 29SemanticModel semanticModel,
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
33var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (3)
34var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 225SemanticModel semanticModel, 242SemanticModel semanticModel, CancellationToken cancellationToken)
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (2)
43var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 232var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (9)
197var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 265var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 358var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 517var semanticModel = await startingDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 633var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 746var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 794var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 846SemanticModel model, SyntaxGenerator generator, 914SemanticModel semanticModel, bool isRecord, string className,
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)
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
252var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\IAnalyzerDriverService.cs (1)
25void ComputeDeclarationsInSpan(SemanticModel model, TextSpan span, bool getSymbol, ArrayBuilder<DeclarationInfo> builder, CancellationToken cancellationToken);
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (5)
83internal SemanticModel SemanticModel { get; set; } 290public ImmutableArray<TaggedText> Format(string rawXmlText, ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format, CancellationToken cancellationToken) 449private static (string target, string hint)? GetNavigationTarget(XElement element, SemanticModel semanticModel, int position, SymbolDisplayFormat format) 505string crefValue, int position, SemanticModel semanticModel, SymbolDisplayFormat format = null, SymbolDisplayPartKind kind = SymbolDisplayPartKind.Text) 529string 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 (2)
66var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 93Document document, SemanticModel semanticModel, int position, HighlightingOptions options, CancellationToken cancellationToken)
DocumentHighlighting\IEmbeddedLanguageDocumentHighlighter.cs (1)
17SemanticModel semanticModel,
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (24)
278SemanticModel? oldModel, 279SemanticModel newModel, 287protected abstract ImmutableArray<ISymbol> GetCapturedVariables(SemanticModel model, SyntaxNode memberBody); 292protected abstract IEnumerable<SyntaxNode> GetVariableUseSites(IEnumerable<SyntaxNode> roots, ISymbol localOrParameter, SemanticModel model, CancellationToken cancellationToken); 434internal abstract IMethodSymbol GetLambdaExpressionSymbol(SemanticModel model, SyntaxNode lambdaExpression, CancellationToken cancellationToken); 436internal abstract bool QueryClauseLambdasTypeEquivalent(SemanticModel oldModel, SyntaxNode oldNode, SemanticModel newModel, SyntaxNode newNode, CancellationToken cancellationToken); 947SemanticModel oldModel, 948SemanticModel newModel, 2430var oldModel = (oldDocument != null) ? await oldDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false) : null; 2431var newModel = await newDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 2845var oldSyntaxModel = await oldSyntaxDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 3356private bool TryAddParameterInsertOrDeleteEdits(ArrayBuilder<SemanticEditInfo> semanticEdits, ISymbol containingSymbol, SemanticModel? otherModel, EditAndContinueCapabilitiesGrantor capabilities, Func<SyntaxNode, SyntaxNode?>? syntaxMap, EditScript<SyntaxNode> editScript, HashSet<ISymbol> processedSymbols, CancellationToken cancellationToken, out bool notSupportedByRuntime) 3552SemanticModel oldModel, 3553SemanticModel newModel, 4676SemanticModel newModel, 4734SemanticModel model, 4858SemanticModel? oldModel, 5116SemanticModel oldModel, 5118SemanticModel newModel, 5414SemanticModel model, 5477private BitVector GetAccessedCaptures(SyntaxNode lambdaBody, SemanticModel model, ImmutableArray<ISymbol> captures, PooledDictionary<ISymbol, int> capturesIndex) 5833SemanticModel oldModel, 5835SemanticModel newModel,
EmbeddedLanguages\AbstractEmbeddedLanguageFeatureService.cs (1)
90SemanticModel semanticModel,
EmbeddedLanguages\AbstractLanguageDetector.cs (7)
35protected abstract bool IsArgumentToWellKnownAPI(SyntaxToken token, SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken, out TOptions options); 42protected abstract bool TryGetOptions(SemanticModel semanticModel, ITypeSymbol exprType, SyntaxNode expr, CancellationToken cancellationToken, out TOptions options); 45protected virtual bool IsEmbeddedLanguageInterpolatedStringTextToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 57SemanticModel semanticModel, 102private bool IsEmbeddedLanguageStringLiteralToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken, out TOptions options) 114SemanticModel semanticModel, 196public TTree? TryParseString(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken)
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (4)
40var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 45Project? project, SemanticModel semanticModel, TextSpan textSpan, ClassificationOptions options, ArrayBuilder<ClassifiedSpan> result, CancellationToken cancellationToken) 59private readonly SemanticModel _semanticModel; 68SemanticModel semanticModel,
EmbeddedLanguages\Classification\EmbeddedLanguageClassifierContext.cs (2)
27public SemanticModel SemanticModel { get; } 36SemanticModel semanticModel,
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeEmbeddedLanguage.cs (1)
34var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (3)
48protected override bool TryGetOptions(SemanticModel semanticModel, ITypeSymbol exprType, SyntaxNode expr, CancellationToken cancellationToken, out DateAndTimeOptions options) 81protected override bool IsEmbeddedLanguageInterpolatedStringTextToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 97SemanticModel semanticModel,
EmbeddedLanguages\EmbeddedLanguageDetector.cs (7)
39SemanticModel semanticModel, 53SemanticModel semanticModel, 135SemanticModel semanticModel, 183SemanticModel semanticModel, 266SemanticModel semanticModel, 282SemanticModel semanticModel, 296SemanticModel semanticModel,
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionAnalyzer.cs (1)
49var semanticModel = context.SemanticModel;
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDiagnosticAnalyzer.cs (1)
43var semanticModel = context.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)
77/// <inheritdoc cref="TryParseString(SyntaxToken, SemanticModel, bool, CancellationToken)"/> 84public JsonTree? TryParseString(SyntaxToken token, SemanticModel semanticModel, bool includeProbableStrings, CancellationToken cancellationToken) 136SemanticModel semanticModel, 168SemanticModel semanticModel, ITypeSymbol exprType, SyntaxNode expr, CancellationToken cancellationToken, out JsonOptions options) 213SemanticModel 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\RegexEmbeddedLanguage.cs (1)
39var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexLanguageDetector.cs (4)
97SemanticModel semanticModel, 167SemanticModel semanticModel, 189SemanticModel semanticModel, 206SemanticModel semanticModel, ITypeSymbol exprType, SyntaxNode expr, CancellationToken cancellationToken, out RegexOptions options)
EncapsulateField\AbstractEncapsulateFieldService.cs (2)
147var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 200var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
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,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
105if (!document.TryGetSemanticModel(out var model) ||
ExtractClass\AbstractExtractClassRefactoringProvider.cs (2)
73var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 132var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ExtractClass\ExtractClassWithDialogCodeAction.cs (2)
175var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 227var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ExtractInterface\AbstractExtractInterfaceService.cs (1)
97var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\Extensions.cs (2)
42public static ITypeSymbol? GetLambdaOrAnonymousMethodReturnType(this SemanticModel binding, SyntaxNode node) 71public static T ResolveType<T>(this SemanticModel semanticModel, T symbol) where T : class, ITypeSymbol
ExtractMethod\MethodExtractor.Analyzer.cs (19)
62protected abstract ITypeSymbol GetRangeVariableType(SemanticModel model, IRangeVariableSymbol symbol); 73var model = _semanticDocument.SemanticModel; 151private (ITypeSymbol typeSymbol, bool hasAnonymousType, bool awaitTaskReturn) AdjustReturnType(SemanticModel model, ITypeSymbol returnType) 172private void UnwrapTaskIfNeeded(SemanticModel model, ref ITypeSymbol returnType) 202private void WrapReturnTypeInTask(SemanticModel model, ref ITypeSymbol returnType, out bool awaitTaskReturn) 238var model = _semanticDocument.SemanticModel; 263private bool IsInExpressionOrHasReturnStatement(SemanticModel model) 276SemanticModel model, Dictionary<ISymbol, List<SyntaxToken>> symbolMap, 349private Dictionary<ISymbol, List<SyntaxToken>> GetSymbolMap(SemanticModel model) 364private DataFlowAnalysis GetDataFlowAnalysisData(SemanticModel model) 375private bool IsEndOfSelectionReachable(SemanticModel model) 410SemanticModel model, 519SemanticModel model, 580Dictionary<ISymbol, List<SyntaxToken>> symbolMap, SemanticModel model, ISymbol symbol, bool writtenInside) 640protected virtual ITypeSymbol GetSymbolType(SemanticModel model, ISymbol symbol) 698private bool ContainsReturnStatementInSelectedCode(SemanticModel model) 729SemanticModel model, 799SemanticModel model, 907private OperationStatus CheckReadOnlyFields(SemanticModel semanticModel, Dictionary<ISymbol, List<SyntaxToken>> symbolMap)
ExtractMethod\MethodExtractor.Analyzer.SymbolMapBuilder.cs (3)
22private readonly SemanticModel _semanticModel; 30SemanticModel semanticModel, 47SemanticModel semanticModel,
ExtractMethod\SelectionValidator.cs (1)
55SemanticModel semanticModel, TextSpan textSpan, Tuple<SyntaxNode, SyntaxNode> range, CancellationToken cancellationToken)
ExtractMethod\UniqueNameGenerator.cs (2)
14private readonly SemanticModel _semanticModel; 16public UniqueNameGenerator(SemanticModel semanticModel)
FindUsages\AbstractFindUsagesService_FindReferences.cs (1)
203var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Fixer.cs (4)
27protected abstract SymbolInfo GetSpeculativeSymbolInfo(SemanticModel semanticModel, TArgumentListSyntax newArgumentList); 40SemanticModel semanticModel, 110SemanticModel semanticModel, 204private bool IsInvocationExpressionWithNewArgumentsApplicable(SemanticModel semanticModel,
FullyQualify\AbstractFullyQualifyService.cs (6)
87var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 119SemanticModel semanticModel, 152SemanticModel semanticModel, 184SemanticModel semanticModel, 229SemanticModel semanticModel, int arity, bool inAttributeContext, 288private static bool HasAccessibleTypes(INamespaceSymbol @namespace, SemanticModel model, CancellationToken cancellationToken)
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (2)
59var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 140var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.ConstructorDelegatingCodeAction.cs (1)
54var semanticModel = await _document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
196var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.FieldDelegatingCodeAction.cs (1)
54var semanticModel = await _document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (1)
56var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (1)
118var semanticModel = await _document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (4)
90var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 136SemanticModel semanticModel, INamedTypeSymbol containingType, 256var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 302var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateFromMembers\AbstractGenerateFromMembersCodeRefactoringProvider.cs (1)
38var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateMember\AbstractGenerateMemberService.cs (2)
86var semanticModel = semanticDocument.SemanticModel; 179SemanticModel semanticModel,
GenerateMember\GenerateConstructor\AbstractGenerateConstructorService.cs (5)
39protected abstract ITypeSymbol GetArgumentType(SemanticModel semanticModel, Argument argument, CancellationToken cancellationToken); 40protected abstract string GenerateNameForExpression(SemanticModel semanticModel, TExpressionSyntax expression, CancellationToken cancellationToken); 44protected abstract IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken); 45protected abstract IMethodSymbol GetDelegatedConstructor(SemanticModel semanticModel, IMethodSymbol constructor, CancellationToken cancellationToken); 158protected string GenerateNameForArgument(SemanticModel semanticModel, Argument argument, CancellationToken cancellationToken)
GenerateMember\GenerateConstructor\AbstractGenerateConstructorService.State.cs (4)
278var semanticModel = _document.SemanticModel; 284private static ITypeSymbol FixType(ITypeSymbol typeSymbol, SemanticModel semanticModel, IEnumerable<ITypeParameterSymbol> allTypeParameters) 623var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 641var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateMember\GenerateConstructor\GenerateConstructorHelpers.cs (2)
33var semanticModel = document.SemanticModel; 74SemanticModel semanticModel,
GenerateMember\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
94var semanticModel = semanticDocument.SemanticModel;
GenerateMember\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
22public abstract ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken);
GenerateMember\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (1)
63var semanticModel = document.SemanticModel;
GenerateMember\GenerateParameterizedMember\AbstractGenerateMethodService.cs (1)
28protected abstract ITypeSymbol DetermineReturnTypeForSimpleNameOrMemberAccessExpression(ITypeInferenceService typeInferenceService, SemanticModel semanticModel, TExpressionSyntax expression, CancellationToken cancellationToken);
GenerateMember\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
104var semanticModel = document.SemanticModel; 153var semanticModel = semanticDocument.SemanticModel;
GenerateMember\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (2)
30protected abstract bool IsValidSymbol(ISymbol symbol, SemanticModel semanticModel); 31protected abstract bool AreSpecialOptionsActive(SemanticModel semanticModel);
GenerateMember\GenerateVariable\AbstractGenerateVariableService.cs (1)
38protected abstract bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot);
GenerateMember\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
58var semanticModel = await _document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateMember\GenerateVariable\AbstractGenerateVariableService.State.cs (3)
212var semanticModel = _document.SemanticModel; 268var semanticModel = _document.SemanticModel; 397private static IMethodSymbol FindContainingMethodSymbol(int position, SemanticModel semanticModel, CancellationToken cancellationToken)
GenerateOverrides\GenerateOverridesCodeRefactoringProvider.cs (1)
50var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.cs (10)
46protected abstract ImmutableArray<ITypeParameterSymbol> GetTypeParameters(State state, SemanticModel semanticModel, CancellationToken cancellationToken); 47protected abstract Accessibility GetAccessibility(State state, SemanticModel semanticModel, bool intoNamespace, CancellationToken cancellationToken); 48protected abstract IList<ParameterName> GenerateParameterNames(SemanticModel semanticModel, IList<TArgumentSyntax> arguments, CancellationToken cancellationToken); 50protected abstract INamedTypeSymbol DetermineTypeToGenerateIn(SemanticModel semanticModel, TSimpleNameSyntax simpleName, CancellationToken cancellationToken); 51protected abstract ITypeSymbol DetermineArgumentType(SemanticModel semanticModel, TArgumentSyntax argument, CancellationToken cancellationToken); 56protected abstract bool IsInValueTypeConstraintContext(SemanticModel semanticModel, TExpressionSyntax expression, CancellationToken cancellationToken); 190SemanticModel semanticModel, 242SemanticModel semanticModel, 268SemanticModel semanticModel, 282var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
285var newSemanticModel = await newDocument.GetSemanticModelAsync(_cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
330internal abstract bool TryGenerateProperty(TSimpleNameSyntax propertyName, SemanticModel semanticModel, ITypeInferenceService typeInference, CancellationToken cancellationToken, out IPropertySymbol property);
GenerateType\AbstractGenerateTypeService.State.cs (4)
125var semanticModel = semanticDocument.SemanticModel; 266private bool GenerateStruct(TService service, SemanticModel semanticModel, CancellationToken cancellationToken) 341SemanticModel semanticModel, 380SemanticModel semanticModel,
GoToDefinition\AbstractGoToDefinitionSymbolService.cs (3)
21protected abstract int? GetTargetPositionIfControlFlow(SemanticModel semanticModel, SyntaxToken token); 28var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 67var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ImplementAbstractClass\ImplementAbstractClassData.cs (1)
52var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ImplementInterface\AbstractImplementInterfaceService.cs (3)
34protected abstract bool TryInitializeState(Document document, SemanticModel model, SyntaxNode interfaceNode, CancellationToken cancellationToken, out SyntaxNode classOrStructDecl, out INamedTypeSymbol classOrStructType, out IEnumerable<INamedTypeSymbol> interfaceTypes); 45var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 63public ImmutableArray<CodeAction> GetCodeActions(Document document, ImplementTypeGenerationOptions options, SemanticModel model, SyntaxNode node, CancellationToken cancellationToken)
ImplementInterface\AbstractImplementInterfaceService.State.cs (3)
23public SemanticModel Model { get; } 35public State(SyntaxNode interfaceNode, SyntaxNode classOrStructDecl, INamedTypeSymbol classOrStructType, IEnumerable<INamedTypeSymbol> interfaceTypes, SemanticModel model) 47SemanticModel model,
ImplementInterface\IImplementInterfaceService.cs (1)
17ImmutableArray<CodeAction> GetCodeActions(Document document, ImplementTypeGenerationOptions options, SemanticModel model, SyntaxNode node, CancellationToken cancellationToken);
InheritanceDistanceComparer.cs (2)
37private readonly SemanticModel _semanticModel; 39public InheritanceDistanceComparer(SemanticModel semanticModel)
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (2)
88var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 173var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (12)
61var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 91var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 146var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 175private static (TParameterSyntax?, IParameterSymbol?) GetParameterAtOrdinal(int index, IReadOnlyList<TParameterSyntax> parameterNodes, SemanticModel semanticModel, CancellationToken cancellationToken) 188ISyntaxFactsService syntaxFacts, SemanticModel semanticModel, 245protected bool ParameterValidForNullCheck(Document document, IParameterSymbol parameter, SemanticModel semanticModel, 357Func<SemanticModel, SyntaxGenerator, TStatementSyntax> generateNullCheck, 360var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 384private TStatementSyntax CreateNullCheckStatement(SemanticModel semanticModel, SyntaxGenerator generator, IParameterSymbol parameter, TSimplifierOptions options) 407SemanticModel semanticModel, 451SemanticModel semanticModel, 501var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (2)
407var currentSemanticModel = await currentDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 820var semanticModel = compilation.GetSemanticModel(group.Key);
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (4)
80var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 137SemanticModel semanticModel, 148SyntaxNode functionDeclaration, SemanticModel semanticModel, ISyntaxFactsService syntaxFacts, 192SemanticModel semanticModel,
InlineHints\AbstractInlineParameterNameHintsService.cs (2)
35SemanticModel semanticModel, 66var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
InlineHints\AbstractInlineTypeHintsService.cs (3)
32SemanticModel semanticModel, SyntaxNode node, 58var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 101SemanticModel semanticModel,
InlineHints\InlineHintHelpers.cs (1)
24var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (4)
91var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 375var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 425SemanticModel semanticModel, 567SemanticModel semanticModel,
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (5)
60var callerSemanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62var calleeSemanticModel = await calleeDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 360SemanticModel callerSemanticModel, 361SemanticModel calleeSemanticModel, 397SemanticModel semanticModel,
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (2)
170var callerSemanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 495var semanticModel = await calleeDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
InlineTemporary\AbstractInlineTemporaryCodeRefactoringProvider.cs (1)
27var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (2)
65var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 193var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (10)
83var semanticModel = await _originalDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 108var semanticModel = await _originalDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 239var invocationSemanticModel = await currentDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 315SyntaxNode GenerateNewArgumentListSyntaxForTrampoline(Compilation compilation, SemanticModel invocationSemanticModel, 357var semanticModel = await _originalDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 497var invocationSemanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 592private bool ShouldArgumentBeNamed(Compilation compilation, SemanticModel semanticModel, 620SemanticModel invocationSemanticModel, CancellationToken cancellationToken) 685var originalSemanticModel = await _originalDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 692private bool NodeMatchesExpression(SemanticModel originalSemanticModel, TExpressionSyntax currentNode, CancellationToken cancellationToken)
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (5)
68var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 117var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 233SemanticModel semanticModel, 262SemanticModel semanticModel, 349SemanticModel semanticModel,
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (3)
43var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 87var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 131var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
IntroduceVariable\AbstractIntroduceVariableService.AbstractIntroduceVariableCodeAction.cs (1)
111var semanticModel = _semanticDocument.SemanticModel;
IntroduceVariable\AbstractIntroduceVariableService.cs (8)
266var semanticModel = semanticDocument.SemanticModel; 284var semanticModel = semanticDocument.SemanticModel; 303var originalSemanticModel = originalDocument.SemanticModel; 304var currentSemanticModel = currentDocument.SemanticModel; 316SemanticModel originalSemanticModel, 317SemanticModel currentSemanticModel, 410var semanticModel = document.SemanticModel; 440var semanticModel = document.SemanticModel;
InvertConditional\AbstractInvertConditionalCodeRefactoringProvider.cs (1)
46var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (4)
107SemanticModel semanticModel, 295var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 317SemanticModel semanticModel, 341SemanticModel semanticModel,
InvertLogical\AbstractInvertLogicalCodeRefactoringProvider.cs (2)
103var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 118var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
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, 67SemanticModel 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 (6)
84private readonly SemanticModel _semanticModel; 96SemanticModel semanticModel, 118protected abstract ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(ISymbol symbol, SemanticModel semanticModel, int position, SymbolDisplayFormat format); 125protected SemanticModel GetSemanticModel(SyntaxTree tree) 132var model = _semanticModel.GetOriginalSemanticModel(); 276var semanticModel = GetSemanticModel(syntax.SyntaxTree);
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.cs (5)
29protected abstract AbstractSymbolDescriptionBuilder CreateDescriptionBuilder(SemanticModel semanticModel, int position, SymbolDescriptionOptions options, CancellationToken cancellationToken); 31public Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ISymbol symbol, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 34public async Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 40public async Task<ImmutableArray<SymbolDisplayPart>> ToDescriptionPartsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 52SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken)
LanguageServices\SymbolDisplayService\ISymbolDisplayService.cs (4)
18Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ISymbol symbol, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 19Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 20Task<ImmutableArray<SymbolDisplayPart>> ToDescriptionPartsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 21Task<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.cs (1)
39var newSemanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
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)
MoveStaticMembers\AbstractMoveStaticMembersRefactoringProvider.cs (1)
38var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (4)
123var destSemanticModel = await newDoc.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 135var semanticModel = await sourceDoc.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 196var semanticModel = await sourceDoc.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 204var newTypeSemanticModel = await newTypeDoc.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
190var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
NameTupleElement\AbstractNameTupleElementCodeRefactoringProvider.cs (1)
59var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
NamingStyleCodeFixProvider.cs (1)
76var model = await document.GetRequiredSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Organizing\Organizers\AbstractSyntaxNodeOrganizer.cs (1)
22public SyntaxNode OrganizeNode(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken)
Organizing\Organizers\ISyntaxOrganizer.cs (1)
23SyntaxNode OrganizeNode(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken = default);
PreferFrameworkType\PreferFrameworkTypeCodeFixProvider.cs (1)
52var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
PreferFrameworkType\PreferFrameworkTypeDiagnosticAnalyzerBase.cs (2)
51protected abstract bool IsIdentifierNameReplaceableWithFrameworkType(SemanticModel semanticModel, TIdentifierNameSyntax node); 59var semanticModel = context.SemanticModel;
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
49var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
QuickInfo\CommonQuickInfoContext.cs (2)
14public readonly SemanticModel SemanticModel; 21SemanticModel semanticModel,
QuickInfo\CommonSemanticQuickInfoProvider.cs (9)
30var semanticModel = await context.Document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 58var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 84var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 98var linkedModel = await linkedDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 137SemanticModel linkedModel, 153SemanticModel semanticModel, 182protected virtual NullableFlowState GetNullabilityAnalysis(SemanticModel semanticModel, ISymbol symbol, SyntaxNode node, CancellationToken cancellationToken) => NullableFlowState.None; 185SolutionServices services, SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 231private ImmutableArray<ISymbol> GetSymbolsFromToken(SyntaxToken token, SolutionServices services, SemanticModel semanticModel, CancellationToken cancellationToken)
QuickInfo\QuickInfoServiceWithProviders.cs (1)
82internal async Task<QuickInfoItem?> GetQuickInfoAsync(SemanticModel semanticModel, int position, SymbolDescriptionOptions options, CancellationToken cancellationToken)
QuickInfo\QuickInfoUtilities.cs (2)
24public static Task<QuickInfoItem> CreateQuickInfoItemAsync(SolutionServices services, SemanticModel semanticModel, TextSpan span, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken) 29SemanticModel semanticModel,
RemoveRedundantEqualityCodeFixProvider.cs (1)
47var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Rename\IRenameIssuesService.cs (1)
13SemanticModel semantic, ISymbol symbol, SyntaxToken triggerToken, [NotNullWhen(true)] out string? langError);
Rename\SymbolicRenameInfo.cs (1)
140var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (3)
218var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 243var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 283SemanticModel semanticModel,
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (3)
55var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 111CodeRefactoringContext context, SemanticModel semanticModel, SyntaxToken token, TextSpan replacementSpan, CancellationToken cancellationToken) 127private static ISymbol? GetEnclosingSymbol(SemanticModel semanticModel, int position, CancellationToken cancellationToken)
ReplaceMethodWithProperty\IReplaceMethodWithPropertyService.cs (1)
25SyntaxEditor editor, SemanticModel semanticModel,
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (3)
60var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 167var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 365var semanticModel = await updatedDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (3)
61var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 77private readonly SemanticModel _semanticModel; 93SemanticModel semanticModel,
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (3)
53var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 87var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 353var semanticModel = await updatedDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Shared\Extensions\ISymbolExtensions_2.cs (2)
180public static ImmutableArray<TaggedText> GetDocumentationParts(this ISymbol symbol, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formatter, CancellationToken cancellationToken) 225this ISymbol symbol, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formatter)
Shared\Extensions\ISymbolExtensions_Sorting.cs (3)
23SemanticModel semanticModel, 32SemanticModel semanticModel, 133SemanticModel semanticModel,
Shared\Utilities\ExtractTypeHelpers.cs (1)
66var newSemanticModel = await newDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SignatureHelp\AbstractSignatureHelpProvider.cs (6)
134SemanticModel semanticModel, 152SemanticModel semanticModel, 169SemanticModel semanticModel, 231SemanticModel semanticModel, 259var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false); 285var relatedSemanticModel = await relatedDocument.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false);
SignatureHelp\CommonSignatureHelpUtilities.cs (1)
153var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SimplifyConditionalCodeFixProvider.cs (1)
66SyntaxNode SimplifyConditional(SemanticModel semanticModel, Diagnostic diagnostic, SyntaxNode expr)
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)
SimplifyTypeNamesDiagnosticAnalyzerBase.cs (3)
75SemanticModel model, SyntaxNode node, TSimplifierOptions options, 113public bool TrySimplify(SemanticModel model, SyntaxNode node, [NotNullWhen(true)] out Diagnostic? diagnostic, TSimplifierOptions options, CancellationToken cancellationToken) 134internal static Diagnostic CreateDiagnostic(SemanticModel model, TSimplifierOptions options, TextSpan issueSpan, string diagnosticId, bool inDeclaration)
Snippets\SnippetProviders\AbstractStatementSnippetProvider.cs (1)
19var semanticModel = await document.ReuseExistingSpeculativeModelAsync(position, cancellationToken).ConfigureAwait(false);
SolutionCrawler\WorkCoordinator.SemanticChangeProcessor.cs (1)
104if (!document.TryGetSemanticModel(out var model) ||
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
67SemanticModel 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);
SuppressMessageAttributeState.cs (1)
53SemanticModel model,
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (2)
78var fieldSemanticModel = await fieldDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 83var propertySemanticModel = await propertyDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
45var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (2)
46var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62SyntaxEditor editor, SemanticModel semanticModel, INamedTypeSymbol? expressionTypeOpt,
UseCollectionInitializerAnalyzer.cs (1)
40SemanticModel semanticModel,
UseCompoundAssignmentUtilities.cs (3)
41ISyntaxFacts syntaxFacts, SyntaxNode expr, SemanticModel semanticModel, CancellationToken cancellationToken) 47ISyntaxFacts syntaxFacts, SyntaxNode expr, SemanticModel semanticModel, 100SyntaxNode expr, SemanticModel semanticModel, bool isTopLevel, CancellationToken cancellationToken)
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (2)
58var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 186protected abstract bool IsImplicitIndexOrRangeIndexer(ImmutableArray<IParameterSymbol> parameters, TBaseArgumentSyntax argument, SemanticModel semanticModel);
UseNamedMemberInitializerAnalyzer.cs (1)
36SemanticModel semanticModel,
UseSystemHashCodeCodeFixProvider.cs (1)
51var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ValueTracking\SerializableValueTrackedItem.cs (1)
55var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTracker.cs (5)
141var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 211var semanticModel = await sourceDoc.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 261var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 298var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 330var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTracker.FindReferencesProgress.cs (4)
79var semanticModel = await location.Document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 105var semanticModel = await location.Document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 153var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 183var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTracker.OperationCollector.cs (1)
78var semanticModel = operation.SemanticModel;
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\DocumentAnalysisExecutor.cs (1)
322var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (2)
Generator.cs (2)
213var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken); 263var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken);
Microsoft.CodeAnalysis.Test.Utilities (18)
CommonTestBase.cs (6)
542internal static void VerifyParentOperations(SemanticModel model) 560private static Dictionary<IOperation, IOperation> GetParentOperationsMap(SemanticModel model) 592private static void CollectTopOperations(SemanticModel model, SyntaxNode node, HashSet<IOperation> topOperations) 611internal static void VerifyClone(SemanticModel model) 645var semanticModel = ((Operation)root).OwningSemanticModel; 660SemanticModel semanticModel, HashSet<IOperation> set, SyntaxNode node)
Compilation\CompilationExtensions.cs (3)
190SemanticModel model = compilation.GetSemanticModel(node.SyntaxTree); 203SemanticModel model = compilation.GetSemanticModel(tree); 292var 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)
777private static void CheckOperators(SemanticModel semanticModel, SyntaxNode syntax)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2657public 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 (3)
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)
Microsoft.CodeAnalysis.VisualBasic (118)
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)
2150Public Function TryGetSpeculativeSemanticModelForMethodBody(position As Integer, method As MethodBlockBaseSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2180Public Function TryGetSpeculativeSemanticModel(position As Integer, rangeArgument As RangeArgumentSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2209Public Function TryGetSpeculativeSemanticModel(position As Integer, statement As ExecutableStatementSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2239Public Function TryGetSpeculativeSemanticModel(position As Integer, initializer As EqualsValueSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2268Public Function TryGetSpeculativeSemanticModel(position As Integer, attribute As AttributeSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 2300Public Function TryGetSpeculativeSemanticModel(position As Integer, type As TypeSyntax, <Out> ByRef speculativeModel As SemanticModel, Optional bindingOption As SpeculativeBindingOption = SpeculativeBindingOption.BindAsExpression) As Boolean 2317Public MustOverride Shadows ReadOnly Property ParentModel As SemanticModel 3057Protected 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)
2033Public Shadows Function GetSemanticModel(syntaxTree As SyntaxTree, Optional ignoreAccessibility As Boolean = False) As SemanticModel 2034Dim model As SemanticModel = Nothing 2043Friend Overrides Function CreateSemanticModel(syntaxTree As SyntaxTree, ignoreAccessibility As Boolean) As SemanticModel 2728Protected Overrides Function CommonGetSemanticModel(syntaxTree As SyntaxTree, ignoreAccessibility As Boolean) As SemanticModel
Errors\ErrorFacts.vb (1)
9''' <see cref="SemanticModel.GetDiagnostics(Text.TextSpan?, System.Threading.CancellationToken)"/> API.
Operations\VisualBasicOperationFactory.vb (2)
18Private ReadOnly _semanticModel As SemanticModel 20Public Sub New(semanticModel As SemanticModel)
SymbolDisplay\SymbolDisplay.vb (3)
44semanticModel As SemanticModel, 79semanticModel As SemanticModel, 87semanticModelOpt As SemanticModel,
SymbolDisplay\SymbolDisplayVisitor.vb (2)
25semanticModelOpt As SemanticModel, 37semanticModelOpt As SemanticModel,
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (2)
165Dim sourceFile = sourceModule.TryGetSourceFile(DirectCast(GetSyntaxTree(DirectCast(semanticModelOpt, SemanticModel)), VisualBasicSyntaxTree)) 179Private Function GetSyntaxTree(semanticModel As SemanticModel) As SyntaxTree
Symbols\Symbol.vb (4)
811Public Function ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String 815Public Function ToMinimalDisplayParts(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) 1272Private Function ISymbol_ToMinimalDisplayString(semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String Implements ISymbol.ToMinimalDisplayString 1276Private 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)
612Private Function ITypeSymbol_ToMinimalDisplayString(semanticModel As SemanticModel, topLevelNullability As NullableFlowState, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String Implements ITypeSymbol.ToMinimalDisplayString 616Private Function ITypeSymbol_ToMinimalDisplayParts(semanticModel As SemanticModel, topLevelNullability As NullableFlowState, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As ImmutableArray(Of SymbolDisplayPart) Implements ITypeSymbol.ToMinimalDisplayParts
VisualBasicDeclarationComputer.vb (3)
15Public Shared Sub ComputeDeclarationsInSpan(model As SemanticModel, 25Public Shared Sub ComputeDeclarationsInNode(model As SemanticModel, 41Private Shared Sub ComputeDeclarationsCore(model As SemanticModel,
VisualBasicExtensions.vb (80)
665Public Function OptionStrict(semanticModel As SemanticModel) As OptionStrict 680Public Function OptionInfer(semanticModel As SemanticModel) As Boolean 695Public Function OptionExplicit(semanticModel As SemanticModel) As Boolean 710Public Function OptionCompareText(semanticModel As SemanticModel) As Boolean 807Public Function ClassifyConversion(semanticModel As SemanticModel, expression As ExpressionSyntax, destination As ITypeSymbol) As Conversion 825Public Function ClassifyConversion(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, destination As ITypeSymbol) As Conversion 842Public Function GetDeclaredSymbol(semanticModel As SemanticModel, identifierSyntax As ModifiedIdentifierSyntax, Optional cancellationToken As CancellationToken = Nothing) As ISymbol 859Public Function GetDeclaredSymbol(semanticModel As SemanticModel, elementSyntax As TupleElementSyntax, Optional cancellationToken As CancellationToken = Nothing) As ISymbol 876Public Function GetDeclaredSymbol(semanticModel As SemanticModel, fieldInitializerSyntax As FieldInitializerSyntax, Optional cancellationToken As CancellationToken = Nothing) As IPropertySymbol 889Public Function GetDeclaredSymbol(semanticModel As SemanticModel, anonymousObjectCreationExpressionSyntax As AnonymousObjectCreationExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 902Public Function GetDeclaredSymbol(semanticModel As SemanticModel, rangeVariableSyntax As ExpressionRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As IRangeVariableSymbol 915Public Function GetDeclaredSymbol(semanticModel As SemanticModel, rangeVariableSyntax As CollectionRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As IRangeVariableSymbol 928Public Function GetDeclaredSymbol(semanticModel As SemanticModel, rangeVariableSyntax As AggregationRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As IRangeVariableSymbol 941Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As LabelStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As ILabelSymbol 954Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EnumMemberDeclarationSyntax, Optional cancellationToken As CancellationToken = Nothing) As IFieldSymbol 967Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As TypeStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 980Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As TypeBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 993Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EnumStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 1006Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EnumBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 1019Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As NamespaceStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamespaceSymbol 1032Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As NamespaceBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamespaceSymbol 1045Public Function GetDeclaredSymbol(semanticModel As SemanticModel, parameter As ParameterSyntax, Optional cancellationToken As CancellationToken = Nothing) As IParameterSymbol 1058Public Function GetDeclaredSymbol(semanticModel As SemanticModel, typeParameter As TypeParameterSyntax, Optional cancellationToken As CancellationToken = Nothing) As ITypeParameterSymbol 1071Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As DelegateStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As INamedTypeSymbol 1084Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As SubNewStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1097Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As MethodStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1110Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As DeclareStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1123Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As OperatorStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1136Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As MethodBlockBaseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1149Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As PropertyStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IPropertySymbol 1162Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EventStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IEventSymbol 1175Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As PropertyBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As IPropertySymbol 1188Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As EventBlockSyntax, Optional cancellationToken As CancellationToken = Nothing) As IEventSymbol 1201Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As CatchStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As ILocalSymbol 1214Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As AccessorStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol 1227Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As SimpleImportsClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol 1240Public Function GetForEachStatementInfo(semanticModel As SemanticModel, node As ForEachStatementSyntax) As ForEachStatementInfo 1253Public Function GetForEachStatementInfo(semanticModel As SemanticModel, node As ForEachBlockSyntax) As ForEachStatementInfo 1266Public Function GetAwaitExpressionInfo(semanticModel As SemanticModel, awaitExpression As AwaitExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As AwaitExpressionInfo 1279Public Function GetPreprocessingSymbolInfo(semanticModel As SemanticModel, node As IdentifierNameSyntax) As PreprocessingSymbolInfo 1292Public Function GetSymbolInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo 1306Public Function GetCollectionInitializerSymbolInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo 1319Public Function GetSymbolInfo(semanticModel As SemanticModel, crefReference As CrefReferenceSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo 1332Public Function GetSymbolInfo(semanticModel As SemanticModel, attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo 1345Public Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As SymbolInfo 1358Public Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, position As Integer, attribute As AttributeSyntax) As SymbolInfo 1371Public Function GetConversion(semanticModel As SemanticModel, expression As SyntaxNode, Optional cancellationToken As CancellationToken = Nothing) As Conversion 1478Public Function GetSpeculativeConversion(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As Conversion 1488Public Function GetTypeInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As TypeInfo 1501Public Function GetSpeculativeTypeInfo(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As TypeInfo 1514Public Function GetTypeInfo(semanticModel As SemanticModel, attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As TypeInfo 1527Public Function GetMemberGroup(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As ImmutableArray(Of ISymbol) 1540Public Function GetSpeculativeMemberGroup(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax) As ImmutableArray(Of ISymbol) 1553Public Function GetMemberGroup(semanticModel As SemanticModel, attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As ImmutableArray(Of ISymbol) 1567Public Function GetAliasInfo(semanticModel As SemanticModel, nameSyntax As IdentifierNameSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol 1581Public Function GetSpeculativeAliasInfo(semanticModel As SemanticModel, position As Integer, nameSyntax As IdentifierNameSyntax, bindingOption As SpeculativeBindingOption) As IAliasSymbol 1595semanticModel As SemanticModel, 1612semanticModel As SemanticModel, 1683''' Use <see cref="GetAggregateClauseSymbolInfo(SemanticModel, AggregateClauseSyntax, CancellationToken)"/> instead. 1690semanticModel As SemanticModel, 1708semanticModel As SemanticModel, 1725semanticModel As SemanticModel, 1742semanticModel As SemanticModel, 1758Public Function AnalyzeControlFlow(semanticModel As SemanticModel, firstStatement As StatementSyntax, lastStatement As StatementSyntax) As ControlFlowAnalysis 1771Public Function AnalyzeControlFlow(semanticModel As SemanticModel, statement As StatementSyntax) As ControlFlowAnalysis 1784Public Function AnalyzeDataFlow(semanticModel As SemanticModel, expression As ExpressionSyntax) As DataFlowAnalysis 1797Public Function AnalyzeDataFlow(semanticModel As SemanticModel, firstStatement As StatementSyntax, lastStatement As StatementSyntax) As DataFlowAnalysis 1810Public Function AnalyzeDataFlow(semanticModel As SemanticModel, statement As StatementSyntax) As DataFlowAnalysis 1823Public Function TryGetSpeculativeSemanticModelForMethodBody(semanticModel As SemanticModel, position As Integer, method As MethodBlockBaseSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1837Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, rangeArgument As RangeArgumentSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1851Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, statement As ExecutableStatementSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1865Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, initializer As EqualsValueSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1879Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, attribute As AttributeSyntax, <Out> ByRef speculativeModel As SemanticModel) As Boolean 1893Public Function TryGetSpeculativeSemanticModel(semanticModel As SemanticModel, position As Integer, type As TypeSyntax, <Out> ByRef speculativeModel As SemanticModel, Optional bindingOption As SpeculativeBindingOption = SpeculativeBindingOption.BindAsExpression) As Boolean
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (92)
ArgumentSyntaxExtensions.vb (2)
15semanticModel As SemanticModel, 24semanticModel As SemanticModel,
CastAnalyzer.vb (5)
16Private ReadOnly _semanticModel As SemanticModel 23semanticModel As SemanticModel, 60Private Shared Function GetOuterCastType(expression As ExpressionSyntax, expressionTypeInfo As TypeInfo, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol 145Private Shared Function AsTypeInVariableDeclarator(node As SyntaxNode, semanticModel As SemanticModel) As ITypeSymbol 431semanticModel As SemanticModel,
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
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
ParenthesizedExpressionSyntaxExtensions.vb (2)
13Private Function EndsQuery(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 43semanticModel As SemanticModel,
SemanticModelExtensions.vb (10)
15Public Function LookupTypeRegardlessOfArity(semanticModel As SemanticModel, 30Public Function LookupName(semanticModel As SemanticModel, name As SyntaxToken, 42Public Function LookupName(semanticModel As SemanticModel, 72Public Function GetSymbolInfo(semanticModel As SemanticModel, token As SyntaxToken) As SymbolInfo 82Public Function GetImportNamespacesInScope(semanticModel As SemanticModel, location As SyntaxNode) As ISet(Of INamespaceSymbol) 96Public Function GetAliasInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IAliasSymbol 106Public Function DetermineAccessibilityConstraint(semanticModel As SemanticModel, 178Public Iterator Function GetAliasSymbols(semanticModel As SemanticModel) As IEnumerable(Of IAliasSymbol) 195Public Function GenerateNameForExpression(semanticModel As SemanticModel, 240Private Function TryGenerateNameForArgumentExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As String
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 596Protected Overrides Sub GetForEachSymbols(model As SemanticModel, forEach As ForEachStatementSyntax, ByRef getEnumeratorMethod As IMethodSymbol, ByRef elementType As ITypeSymbol) 606Protected Overrides Function ClassifyConversion(model As SemanticModel, expression As ExpressionSyntax, targetType As ITypeSymbol) As Conversion 610Protected Overrides Function ClassifyConversion(model As SemanticModel, originalType As ITypeSymbol, targetType As ITypeSymbol) As Conversion
SyntaxNodeExtensions.vb (1)
1096semanticModel As SemanticModel,
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
VisualBasicMakeFieldReadonlyDiagnosticAnalyzer.vb (1)
19Protected Overrides Function IsWrittenTo(semanticModel As SemanticModel, expression As MeExpressionSyntax, cancellationToken As CancellationToken) As Boolean
VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb (1)
24Protected Overrides Function IsUnnecessaryCast(model As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean
VisualBasicRemoveUnnecessaryParenthesesDiagnosticAnalyzer.vb (2)
29semanticModel As SemanticModel, cancellationToken As CancellationToken, 38parenthesizedExpression As ParenthesizedExpressionSyntax, semanticModel As SemanticModel,
VisualBasicSemanticFacts.vb (26)
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 147Dim original = DirectCast(model.GetOriginalSemanticModel(), SemanticModel) 167Public Function GetForEachSymbols(model As SemanticModel, forEachStatement As SyntaxNode) As ForEachSymbols Implements ISemanticFacts.GetForEachSymbols 193Public Function GetCollectionInitializerSymbolInfo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As SymbolInfo Implements ISemanticFacts.GetCollectionInitializerSymbolInfo 197Public Function GetGetAwaiterMethod(model As SemanticModel, node As SyntaxNode) As IMethodSymbol Implements ISemanticFacts.GetGetAwaiterMethod 207Public Function GetDeconstructionAssignmentMethods(model As SemanticModel, deconstruction As SyntaxNode) As ImmutableArray(Of IMethodSymbol) Implements ISemanticFacts.GetDeconstructionAssignmentMethods 211Public Function GetDeconstructionForEachMethods(model As SemanticModel, deconstruction As SyntaxNode) As ImmutableArray(Of IMethodSymbol) Implements ISemanticFacts.GetDeconstructionForEachMethods 223Public Function GetDeclaredSymbols(semanticModel As SemanticModel, memberDeclaration As SyntaxNode, cancellationToken As CancellationToken) As IEnumerable(Of ISymbol) Implements ISemanticFacts.GetDeclaredSymbols 233Public Function FindParameterForArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForArgument 237Public Function FindParameterForAttributeArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForAttributeArgument 241Public Function FindFieldOrPropertyForArgument(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.FindFieldOrPropertyForArgument 256Public Function FindFieldOrPropertyForAttributeArgument(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.FindFieldOrPropertyForAttributeArgument 260Public Function GetBestOrAllSymbols(semanticModel As SemanticModel, node As SyntaxNode, token As SyntaxToken, cancellationToken As CancellationToken) As ImmutableArray(Of ISymbol) Implements ISemanticFacts.GetBestOrAllSymbols 266Public Function IsInsideNameOfExpression(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInsideNameOfExpression 274Public Function IsInExpressionTree(semanticModel As SemanticModel, node As SyntaxNode, expressionTypeOpt As INamedTypeSymbol, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInExpressionTree 278Public Function GenerateNameForExpression(semanticModel As SemanticModel,
VisualBasicSimplifyConditionalDiagnosticAnalyzer.vb (1)
23Protected Overrides Function GetConversion(semanticModel As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As CommonConversion
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,
VisualBasicUseAutoPropertyAnalyzer.vb (3)
39Protected Overrides Sub RegisterIneligibleFieldsAction(fieldNames As HashSet(Of String), ineligibleFields As ConcurrentSet(Of IFieldSymbol), semanticModel As SemanticModel, codeBlock As SyntaxNode, cancellationToken As CancellationToken) 103Protected Overrides Function GetSetterExpression(setMethod As IMethodSymbol, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ExpressionSyntax 139semanticModel As SemanticModel,
VisualBasicUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.vb (1)
25Protected Overrides Function IsTargetTyped(semanticModel As SemanticModel, conditional As TernaryConditionalExpressionSyntax, cancellationToken As CancellationToken) As Boolean
VisualBasicUseNullPropagationDiagnosticAnalyzer.vb (1)
39Protected Overrides Function IsInExpressionTree(semanticModel As SemanticModel, node As SyntaxNode, expressionTypeOpt As INamedTypeSymbol, cancellationToken As CancellationToken) As Boolean
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (44)
ArgumentFixer.vb (1)
36Protected Overrides Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, newArgumentList As ArgumentListSyntax) As SymbolInfo
ExpressionSyntaxExtensions.vb (1)
130semanticModel As SemanticModel,
INamespaceOrTypeSymbolExtensions.vb (2)
19Public Function GetAliasForSymbol(symbol As INamespaceOrTypeSymbol, node As SyntaxNode, semanticModel As SemanticModel) As IAliasSymbol 26Dim originalSemanticModel = DirectCast(semanticModel.GetOriginalSemanticModel(), SemanticModel)
ParameterSyntaxExtensions.vb (1)
13Public Function CanRemoveAsClause(parameter As ParameterSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
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
VisualBasicAddExplicitCastCodeFixProvider.vb (3)
56semanticModel As SemanticModel, 114SemanticModel As SemanticModel, 172semanticModel As SemanticModel,
VisualBasicAddParameterCodeFixProvider.vb (1)
52Protected Overrides Function GetArgumentType(argumentNode As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol
VisualBasicConvertGetTypeToNameOfCodeFixProvider.vb (1)
29Protected Overrides Function GetSymbolTypeExpression(semanticModel As SemanticModel, node As MemberAccessExpressionSyntax, cancellationToken As CancellationToken) As SyntaxNode
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))
VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
38Private Shared Function IsUnnecessaryCast(node As ExpressionSyntax, model As SemanticModel, cancellationToken As CancellationToken) As Boolean
VisualBasicRemoveUnnecessaryParenthesesCodeFixProvider.vb (1)
22Protected Overrides Function CanRemoveParentheses(current As ParenthesizedExpressionSyntax, semanticModel As SemanticModel, cancellationtoken As CancellationToken) As Boolean
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
VisualBasicSyntaxContext.vb (2)
54semanticModel As SemanticModel, 155Public Shared Function CreateContext(document As Document, semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As VisualBasicSyntaxContext
VisualBasicSyntaxContextService.vb (1)
20Public Function CreateContext(document As Document, semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As SyntaxContext Implements ISyntaxContextService.CreateContext
VisualBasicTypeInferenceService.TypeInferrer.vb (2)
18Public Sub New(semanticModel As SemanticModel, cancellationToken As CancellationToken) 783Private Function GetDeclaredMemberSymbolFromOriginalSemanticModel(currentSemanticModel As SemanticModel, declarationInCurrentTree As DeclarationStatementSyntax) As ISymbol
VisualBasicTypeInferenceService.vb (1)
22Protected Overrides Function CreateTypeInferrer(semanticModel As SemanticModel, cancellationToken As CancellationToken) As AbstractTypeInferrer
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
EndConstructGeneration\EndConstructState.vb (3)
8Private ReadOnly _semanticModel As Lazy(Of SemanticModel) 13Public Sub New(caretPosition As Integer, semanticModel As Lazy(Of SemanticModel), syntaxTree As SyntaxTree, tokenToLeft As SyntaxToken, newLineCharacter As String) 29Public ReadOnly Property SemanticModel As SemanticModel
EndConstructGeneration\VisualBasicEndConstructGenerationService.vb (1)
164caretPosition.Value, New Lazy(Of SemanticModel)(Function() document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult(cancellationToken)), tree, tokenToLeft, bufferOptions.GetNewLineCharacter())
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (6)
Semantics\SpeculationAnalyzerTests.vb (1)
146Protected Overrides Function ReplacementChangesSemantics(initialNode As SyntaxNode, replacementNode As SyntaxNode, initialModel As SemanticModel) As Boolean
SymbolId\SymbolKeyTestBase.vb (5)
47Friend Shared Sub ResolveAndVerifyTypeSymbol(node As ExpressionSyntax, sourceSymbol As ITypeSymbol, model As SemanticModel, sourceComp As Compilation) 52Friend Shared Sub ResolveAndVerifySymbol(node As ExpressionSyntax, sourceSymbol As ISymbol, model As SemanticModel, sourceComp As Compilation, Optional comparison As SymbolIdComparison = SymbolIdComparison.IgnoreCase) 287Private Shared Sub GetLabelSymbols(body As MethodBlockSyntax, model As SemanticModel, list As List(Of ISymbol)) 297Private Shared Sub GetAnonymousTypeAndFuncSymbols(body As MethodBlockSyntax, model As SemanticModel, list As List(Of ISymbol)) 311Private Shared Sub GetAnonymousExprSymbols(expr As ExpressionSyntax, model As SemanticModel, list As List(Of ISymbol))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
Attributes\AttributeTests.vb (4)
2291Dim speculativeModel As SemanticModel = Nothing 2335Dim speculativeModel As SemanticModel = Nothing 2378Dim speculativeModel As SemanticModel = Nothing 2422Dim speculativeModel As SemanticModel = Nothing
CodeGen\CodeGenTuples.vb (1)
3392Private Shared Sub AssertConversions(model As SemanticModel, literal As TupleExpressionSyntax, aggregate As ConversionKind, ParamArray parts As ConversionKind())
Microsoft.CodeAnalysis.VisualBasic.Features (171)
AddImport\VisualBasicAddImportFeatureService.vb (7)
191semanticModel As SemanticModel, 217Protected Overrides Function GetImportNamespacesInScope(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISet(Of INamespaceSymbol) 221Protected Overrides Function GetDeconstructInfo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ITypeSymbol 226model As SemanticModel, 236Dim semanticModel = DirectCast(model, SemanticModel) 330semanticModel As SemanticModel, 355Protected Overrides Function IsAddMethodContext(node As SyntaxNode, semanticModel As SemanticModel) As Boolean
ArgumentFixer.vb (1)
36Protected Overrides Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, newArgumentList As ArgumentListSyntax) As SymbolInfo
ChangeSignature\VisualBasicChangeSignatureService.vb (2)
202Private Shared Function TryGetDeclaredSymbol(semanticModel As SemanticModel, 521Private Shared Function IsParamsArrayExpanded(semanticModel As SemanticModel, node As SyntaxNode, symbolInfo As SymbolInfo, cancellationToken As CancellationToken) As Boolean
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (4)
121semanticModel As SemanticModel, 170Private Shared Function TryGetDelegateSymbol(handlerExpression As ExpressionSyntax, semanticModel As SemanticModel, ByRef delegateSymbol As IMethodSymbol, cancellationToken As CancellationToken) As Boolean 188Private Shared Function ResolveTargetType(ByRef targetType As INamedTypeSymbol, semanticModel As SemanticModel) As Boolean 204Private Shared Function TryGetNameAndTargetType(eventExpression As ExpressionSyntax, containingSymbol As INamedTypeSymbol, semanticModel As SemanticModel, ByRef targetType As INamedTypeSymbol, ByRef actualEventName As String, cancellationToken As CancellationToken) As Boolean
CodeLens\VisualBasicDisplayInfoService.vb (1)
119Public Function GetDisplayName(semanticModel As SemanticModel, node As SyntaxNode) As String Implements ICodeLensDisplayInfoService.GetDisplayName
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.ReferenceRewriter.vb (3)
18Private ReadOnly _semanticModel As SemanticModel 25semanticModel As SemanticModel, 80semanticModel As SemanticModel,
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (4)
73semanticModel As SemanticModel 345Private Shared Function AddExplicitArgumentListIfNeeded(expression As ExpressionSyntax, semanticModel As SemanticModel) As ExpressionSyntax 410newSemanticModelForInlinedDocument As SemanticModel, 411semanticModelBeforeInline As SemanticModel,
Completion\CompletionProviders\AwaitCompletionProvider.vb (1)
54Protected 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 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 Sub AddAliasesAndContainers(symbol As ISymbol, interfacesAndContainers As ICollection(Of ISymbol), node As SyntaxNode, semanticModel As SemanticModel) 246Private Shared Sub AddAlias(symbol As ISymbol, interfacesAndContainers As ICollection(Of ISymbol), node As SyntaxNode, semanticModel As SemanticModel)
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (4)
130Private Shared Function GetParameterLists(semanticModel As SemanticModel, 140Private Shared Function GetObjectCreationExpressionParameterLists(semanticModel As SemanticModel, 155Private Shared Function GetAttributeParameterLists(semanticModel As SemanticModel, 167Private Shared Function GetInvocationExpressionParameterLists(semanticModel As SemanticModel,
Completion\CompletionProviders\ObjectInitializerCompletionProvider.vb (1)
56semanticModel As SemanticModel,
Completion\CompletionProviders\OverrideCompletionProvider.vb (1)
147semanticModel As SemanticModel,
Completion\KeywordRecommenders\Declarations\OfKeywordRecommender.vb (2)
106Private Shared Function IsPartiallyTypedGenericName(type As TypeSyntax, semanticModel As SemanticModel) As Boolean 116Private Shared Function IsGenericDelegateCreationExpression(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
Completion\KeywordRecommenders\RecommendationHelpers.vb (1)
154Optional semanticModel As SemanticModel = Nothing,
Completion\Providers\ContextVariableArgumentProvider.vb (1)
29Protected Overrides Function IsInstanceContext(syntaxTree As SyntaxTree, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (1)
45Protected Overrides Sub ConvertToForStatement(model As SemanticModel, foreachInfo As ForEachInfo, editor As SyntaxEditor, cancellationToken As CancellationToken)
ConvertIfToSwitch\VisualBasicConvertIfToSwitchCodeRefactoringProvider.Analyzer.vb (1)
34Public Overrides Function CanImplicitlyConvert(semanticModel As SemanticModel, syntax As SyntaxNode, targetType As ITypeSymbol) As Boolean
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (2)
39Private ReadOnly _semanticModel As SemanticModel 70Public Sub New(analyzer As VisualBasicSimplifyTypeNamesDiagnosticAnalyzer, semanticModel As SemanticModel, options As VisualBasicSimplifierOptions, ignoredSpans As SimpleIntervalTree(Of TextSpan, TextSpanIntervalIntrospector), 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)
72model As SemanticModel, node As SyntaxNode, options As VisualBasicSimplifierOptions,
Diagnostics\VisualBasicAnalyzerDriverService.vb (1)
22Public Sub ComputeDeclarationsInSpan(model As SemanticModel,
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (8)
213Protected Overrides Function GetCapturedVariables(model As SemanticModel, memberBody As SyntaxNode) As ImmutableArray(Of ISymbol) 263Protected Overrides Function GetVariableUseSites(roots As IEnumerable(Of SyntaxNode), localOrParameter As ISymbol, model As SemanticModel, cancellationToken As CancellationToken) As IEnumerable(Of SyntaxNode) 1264oldModel As SemanticModel, 1265newModel As SemanticModel, 1350model As SemanticModel, 1430Friend Overrides Function GetLambdaExpressionSymbol(model As SemanticModel, lambdaExpression As SyntaxNode, cancellationToken As CancellationToken) As IMethodSymbol 1441Friend Overrides Function QueryClauseLambdasTypeEquivalent(oldModel As SemanticModel, oldNode As SyntaxNode, newModel As SemanticModel, newNode As SyntaxNode, cancellationToken As CancellationToken) As Boolean
ExtractMethod\Extensions.vb (1)
117Public Function IsArgumentForByRefParameter(node As SyntaxNode, model As SemanticModel, cancellationToken As CancellationToken) As Boolean
ExtractMethod\VisualBasicMethodExtractor.Analyzer.vb (1)
72Protected Overrides Function GetRangeVariableType(semanticModel As SemanticModel, symbol As IRangeVariableSymbol) As ITypeSymbol
ExtractMethod\VisualBasicMethodExtractor.PostProcessor.vb (2)
13Private ReadOnly _semanticModel As SemanticModel 16Public Sub New(semanticModel As SemanticModel, contextPosition As Integer)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.SingleStatementCodeGenerator.vb (1)
32Dim semanticModel = CType(SemanticDocument.SemanticModel, SemanticModel)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
285Dim semanticModel = CType(Me.SemanticDocument.SemanticModel, SemanticModel)
ExtractMethod\VisualBasicSelectionValidator.Validator.vb (2)
11Public Shared Function Check(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean 21Private Shared Function CheckExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean
ExtractMethod\VisualBasicSelectionValidator.vb (4)
80Private Shared Function CheckErrorCasesAndAppendDescriptions(selectionInfo As SelectionInfo, semanticModel As SemanticModel, cancellationToken As CancellationToken) As SelectionInfo 184semanticModel As SemanticModel, 263semanticModel As SemanticModel, 317semanticModel As SemanticModel,
GenerateConstructor\VisualBasicGenerateConstructorService.vb (4)
40Protected Overrides Function GenerateNameForExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As String 45semanticModel As SemanticModel, 169Protected Overrides Function GetCurrentConstructor(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As IMethodSymbol 174Protected Overrides Function GetDelegatedConstructor(semanticModel As SemanticModel, constructor As IMethodSymbol, cancellationToken As CancellationToken) As IMethodSymbol
GenerateMember\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
GenerateMember\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
GenerateMember\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
GenerateMember\GenerateVariable\VisualBasicGenerateVariableService.vb (3)
93Dim semanticModel = DirectCast(document.SemanticModel, SemanticModel) 108Private Shared Function IsLegal(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean 120Protected Overrides Function TryConvertToLocalDeclaration(type As ITypeSymbol, identifierToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken, ByRef newRoot As SyntaxNode) As Boolean
GenerateType\VisualBasicGenerateTypeService.vb (9)
39Protected Overrides Function GenerateParameterNames(semanticModel As SemanticModel, arguments As IList(Of ArgumentSyntax), cancellationToken As CancellationToken) As IList(Of ParameterName) 74Protected Overrides Function IsInValueTypeConstraintContext(semanticModel As SemanticModel, expression As Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax, cancellationToken As System.Threading.CancellationToken) As Boolean 358Private Shared Function GetMemberGroupIfPresent(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IMethodSymbol 376semanticModel As SemanticModel, 393Protected Overrides Function DetermineTypeToGenerateIn(semanticModel As SemanticModel, 403Protected Overrides Function GetAccessibility(state As State, semanticModel As SemanticModel, intoNamespace As Boolean, cancellationToken As CancellationToken) As Accessibility 418Protected Overrides Function DetermineArgumentType(semanticModel As SemanticModel, argument As ArgumentSyntax, cancellationToken As CancellationToken) As ITypeSymbol 684semanticModel As SemanticModel, 712semanticModel As SemanticModel,
GoToDefinition\VisualBasicGoToDefinitionSymbolService.vb (1)
25Protected Overrides Function GetTargetPositionIfControlFlow(semanticModel As SemanticModel, token As SyntaxToken) As Integer?
ImplementInterface\VisualBasicImplementInterfaceService.vb (2)
44document As Document, model As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken, 90Private Shared Function GetInterfaceType(semanticModel As SemanticModel,
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, 90Protected 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)
53semanticModel As SemanticModel, 165semanticModel As SemanticModel, 203semanticModel 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)
UseNamedArguments\VisualBasicUseNamedArgumentsCodeRefactoringProvider.vb (1)
53Protected Overrides Function IsImplicitIndexOrRangeIndexer(parameters As ImmutableArray(Of IParameterSymbol), argument As ArgumentSyntax, semanticModel As SemanticModel) As Boolean
VisualBasicAddExplicitCastCodeFixProvider.vb (3)
56semanticModel As SemanticModel, 114SemanticModel As SemanticModel, 172semanticModel As SemanticModel,
VisualBasicAddParameterCodeFixProvider.vb (1)
52Protected Overrides Function GetArgumentType(argumentNode As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol
VisualBasicConvertGetTypeToNameOfCodeFixProvider.vb (1)
29Protected Overrides Function GetSymbolTypeExpression(semanticModel As SemanticModel, node As MemberAccessExpressionSyntax, cancellationToken As CancellationToken) As SyntaxNode
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))
VisualBasicDeclarationComputer.vb (3)
15Public Shared Sub ComputeDeclarationsInSpan(model As SemanticModel, 25Public Shared Sub ComputeDeclarationsInNode(model As SemanticModel, 41Private Shared Sub ComputeDeclarationsCore(model As SemanticModel,
VisualBasicMakeFieldReadonlyDiagnosticAnalyzer.vb (1)
19Protected Overrides Function IsWrittenTo(semanticModel As SemanticModel, expression As MeExpressionSyntax, cancellationToken As CancellationToken) As Boolean
VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
38Private Shared Function IsUnnecessaryCast(node As ExpressionSyntax, model As SemanticModel, cancellationToken As CancellationToken) As Boolean
VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb (1)
24Protected Overrides Function IsUnnecessaryCast(model As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As Boolean
VisualBasicRemoveUnnecessaryParenthesesCodeFixProvider.vb (1)
22Protected Overrides Function CanRemoveParentheses(current As ParenthesizedExpressionSyntax, semanticModel As SemanticModel, cancellationtoken As CancellationToken) As Boolean
VisualBasicRemoveUnnecessaryParenthesesDiagnosticAnalyzer.vb (2)
29semanticModel As SemanticModel, cancellationToken As CancellationToken, 38parenthesizedExpression As ParenthesizedExpressionSyntax, semanticModel As SemanticModel,
VisualBasicSimplifyConditionalDiagnosticAnalyzer.vb (1)
23Protected Overrides Function GetConversion(semanticModel As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As CommonConversion
VisualBasicUseAutoPropertyAnalyzer.vb (3)
39Protected Overrides Sub RegisterIneligibleFieldsAction(fieldNames As HashSet(Of String), ineligibleFields As ConcurrentSet(Of IFieldSymbol), semanticModel As SemanticModel, codeBlock As SyntaxNode, cancellationToken As CancellationToken) 103Protected Overrides Function GetSetterExpression(setMethod As IMethodSymbol, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ExpressionSyntax 139semanticModel As SemanticModel,
VisualBasicUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.vb (1)
25Protected Overrides Function IsTargetTyped(semanticModel As SemanticModel, conditional As TernaryConditionalExpressionSyntax, cancellationToken As CancellationToken) As Boolean
VisualBasicUseNullPropagationDiagnosticAnalyzer.vb (1)
39Protected Overrides Function IsInExpressionTree(semanticModel As SemanticModel, node As SyntaxNode, expressionTypeOpt As INamedTypeSymbol, cancellationToken As CancellationToken) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (93)
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)() 1709Public Overrides Function GetSemanticModel(tree As SyntaxTree, compilation As Compilation, Optional ignoreAccessibility As Boolean = False) As SemanticModel 1713Public 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 (18)
6229semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6281semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6329semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6395semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6467semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6544semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6609semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6663semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6721semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6764semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6808semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 6851semanticInfoEx = DirectCast(GetBlockOrStatementInfoForTest(Of ForEachStatementSyntax, SemanticModel)(compilation, "a.vb", 8643Dim containingType = DirectCast(model, SemanticModel).GetEnclosingSymbol(SLDeclaration.SpanStart) 8649Dim TI = DirectCast(model, SemanticModel).GetTypeInfo(SLDeclaration) 8650Dim mG = DirectCast(model, SemanticModel).GetAliasInfo(SLDeclaration) 8652Dim lus1 = DirectCast(model, SemanticModel).LookupSymbols(SLDeclaration.SpanStart, name:="i") 8681Dim ai = DirectCast(model, SemanticModel).GetAliasInfo(id) 8682Dim si = DirectCast(model, SemanticModel).GetSymbolInfo(id)
Semantics\GetSemanticInfoTests.vb (1)
4422semanticModel 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 (9)
1180commonSymbolInfo = DirectCast(semanticModel, SemanticModel).GetSymbolInfo(DirectCast(node11, SyntaxNode)) 1432Dim commonSymbolInfo As SymbolInfo = DirectCast(semanticModel, SemanticModel).GetSymbolInfo(ordering) 1483Dim commonSymbolInfo As SymbolInfo = DirectCast(semanticModel, SemanticModel).GetSymbolInfo(node1) 1495commonSymbolInfo = DirectCast(semanticModel, SemanticModel).GetSymbolInfo(node2) 1710Dim commonSymbolInfo As SymbolInfo = DirectCast(semanticModel, SemanticModel).GetSymbolInfo(node6) 1729commonSymbolInfo = DirectCast(semanticModel, SemanticModel).GetSymbolInfo(node8) 3388Dim commonSymbolInfo = DirectCast(semanticModel, SemanticModel).GetSymbolInfo(DirectCast(node9, SyntaxNode)) 3816Dim semanticModel As SemanticModel = compilation.GetSemanticModel(tree) 3920Dim containingSymbol = DirectCast(semanticModel, SemanticModel).GetEnclosingSymbol(node.SpanStart)
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)
5999Dim semanticModel As SemanticModel = comp.GetSemanticModel(tree) 6008Dim 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 (7)
CompilationTestUtils.vb (6)
524Public Function GetSemanticInfoSummary(model As SemanticModel, node As SyntaxNode) As SemanticInfoSummary 564Public Function GetSpeculativeSemanticInfoSummary(model As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As SemanticInfoSummary 1071semanticModel As SemanticModel, 1085semanticModel As SemanticModel, 1099semanticModel As SemanticModel, 1234Friend Function LookupNames(model As SemanticModel,
SemanticModelTestBase.vb (1)
101Protected Function GetBlockOrStatementInfoForTest(Of StmtSyntax As SyntaxNode, ISM As SemanticModel)(compilation As Compilation, fileName As String, Optional which As Integer = 0, Optional useParent As Boolean = False) As Object
Microsoft.CodeAnalysis.VisualBasic.Workspaces (224)
ArgumentSyntaxExtensions.vb (2)
15semanticModel As SemanticModel, 24semanticModel As SemanticModel,
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (4)
19Dim model = DirectCast(Me._semanticModel.GetOriginalSemanticModel(), SemanticModel) 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,
CastAnalyzer.vb (5)
16Private ReadOnly _semanticModel As SemanticModel 23semanticModel As SemanticModel, 60Private Shared Function GetOuterCastType(expression As ExpressionSyntax, expressionTypeInfo As TypeInfo, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol 145Private Shared Function AsTypeInVariableDeclarator(node As SyntaxNode, semanticModel As SemanticModel) As ITypeSymbol 431semanticModel As SemanticModel,
Classification\SyntaxClassification\IdentifierNameSyntaxClassifier.vb (1)
20Public Overrides Sub AddClassifications(syntax As SyntaxNode, semanticModel As SemanticModel, options As ClassificationOptions, result As ArrayBuilder(Of ClassifiedSpan), cancellationToken As CancellationToken)
Classification\SyntaxClassification\ImportAliasClauseSyntaxClassifier.vb (2)
18Public Overrides Sub AddClassifications(syntax As SyntaxNode, semanticModel As SemanticModel, options As ClassificationOptions, result As ArrayBuilder(Of ClassifiedSpan), cancellationToken As CancellationToken) 24semanticModel As SemanticModel,
Classification\SyntaxClassification\NameSyntaxClassifier.vb (5)
25semanticModel As SemanticModel, 69semanticModel As SemanticModel, 154semanticModel As SemanticModel, 167semanticModel As SemanticModel, 277Private Shared Sub ClassifyMethodStatement(methodStatement As MethodStatementSyntax, semanticModel As SemanticModel, result As ArrayBuilder(Of ClassifiedSpan))
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
23semanticModel 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,
Editing\VisualBasicImportAdder.vb (5)
24Protected Overrides Function GetExplicitNamespaceSymbol(node As SyntaxNode, model As SemanticModel) As INamespaceSymbol 38Protected Overrides Sub AddPotentiallyConflictingImports(model As SemanticModel, 47Private Overloads Shared Function GetExplicitNamespaceSymbol(fullName As ExpressionSyntax, namespacePart As ExpressionSyntax, model As SemanticModel) As INamespaceSymbol 68Private ReadOnly _model As SemanticModel 99model As SemanticModel,
Extensions\SemanticModelExtensions.vb (6)
17Public Function GenerateParameterNames(semanticModel As SemanticModel, 31Public Function GenerateParameterNames(semanticModel As SemanticModel, 43Public Function GenerateParameterNames(semanticModel As SemanticModel, 64Public Function GenerateParameterNames(semanticModel As SemanticModel, 86Public Function GenerateNameForArgument(semanticModel As SemanticModel, 93Private Function GenerateNameForArgumentWorker(semanticModel As SemanticModel,
INamespaceOrTypeSymbolExtensions.vb (2)
19Public Function GetAliasForSymbol(symbol As INamespaceOrTypeSymbol, node As SyntaxNode, semanticModel As SemanticModel) As IAliasSymbol 26Dim originalSemanticModel = DirectCast(semanticModel.GetOriginalSemanticModel(), SemanticModel)
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
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb\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
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb\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
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb\ExpressionSyntaxExtensions.vb (1)
130semanticModel As SemanticModel,
ParameterSyntaxExtensions.vb (1)
13Public Function CanRemoveAsClause(parameter As ParameterSyntax, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
ParenthesizedExpressionSyntaxExtensions.vb (2)
13Private Function EndsQuery(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 43semanticModel As SemanticModel,
Rename\VisualBasicRenameRewriterLanguageService.vb (6)
48Private ReadOnly _semanticModel As SemanticModel 92Private _speculativeModel As SemanticModel 901semanticModel As SemanticModel, 1019Public Shared Function GetSemanticModelForNode(node As SyntaxNode, originalSemanticModel As SemanticModel) As SemanticModel 1039Return SpeculationAnalyzer.CreateSpeculativeSemanticModelForNode(nodeToSpeculate, DirectCast(originalSemanticModel, SemanticModel), position, isInNamespaceOrTypeContext)
SemanticModelExtensions.vb (10)
15Public Function LookupTypeRegardlessOfArity(semanticModel As SemanticModel, 30Public Function LookupName(semanticModel As SemanticModel, name As SyntaxToken, 42Public Function LookupName(semanticModel As SemanticModel, 72Public Function GetSymbolInfo(semanticModel As SemanticModel, token As SyntaxToken) As SymbolInfo 82Public Function GetImportNamespacesInScope(semanticModel As SemanticModel, location As SyntaxNode) As ISet(Of INamespaceSymbol) 96Public Function GetAliasInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IAliasSymbol 106Public Function DetermineAccessibilityConstraint(semanticModel As SemanticModel, 178Public Iterator Function GetAliasSymbols(semanticModel As SemanticModel) As IEnumerable(Of IAliasSymbol) 195Public Function GenerateNameForExpression(semanticModel As SemanticModel, 240Private Function TryGenerateNameForArgumentExpression(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As String
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 (7)
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 175_semanticModel = DirectCast(semanticModel, SemanticModel)
Simplification\Reducers\AbstractVisualBasicReducer.vb (2)
21Protected Shared ReadOnly s_reduceParentheses As Func(Of ParenthesizedExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf ReduceParentheses 25semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicCallReducer.vb (2)
18Private Shared ReadOnly s_simplifyCallStatement As Func(Of CallStatementSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyCallStatement 30semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicCastReducer.vb (4)
18Private Shared ReadOnly s_simplifyCast As Func(Of CastExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyCast 30semanticModel As SemanticModel, 42Private Shared ReadOnly s_simplifyPredefinedCast As Func(Of PredefinedCastExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyPredefinedCast 46semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicEscapingReducer.vb (1)
28Private Shared Function TryUnescapeToken(identifier As SyntaxToken, semanticModel As SemanticModel, options As VisualBasicSimplifierOptions, cancellationToken As CancellationToken) As SyntaxToken
Simplification\Reducers\VisualBasicExtensionMethodReducer.vb (2)
17Private Shared ReadOnly s_simplifyInvocationExpression As Func(Of InvocationExpressionSyntax, SemanticModel, VisualBasicSimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyInvocationExpression 29semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicInferredMemberNameReducer.Rewriter.vb (4)
21Private ReadOnly s_simplifyTupleName As Func(Of SimpleArgumentSyntax, SemanticModel, SimplifierOptions, CancellationToken, SimpleArgumentSyntax) = AddressOf SimplifyTupleName 22Private ReadOnly s_simplifyNamedFieldInitializer As Func(Of NamedFieldInitializerSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyNamedFieldInitializer 24Private Function SimplifyNamedFieldInitializer(node As NamedFieldInitializerSyntax, arg2 As SemanticModel, options As SimplifierOptions, arg4 As CancellationToken) As SyntaxNode 34semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicMiscellaneousReducer.vb (6)
18Private Shared ReadOnly s_simplifyParameter As Func(Of ParameterSyntax, SemanticModel, SimplifierOptions, CancellationToken, ParameterSyntax) = AddressOf SimplifyParameter 30semanticModel As SemanticModel, 43Private Shared ReadOnly s_simplifyInvocationExpression As Func(Of InvocationExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyInvocationExpression 47semanticModel As SemanticModel, 66Private Shared ReadOnly s_simplifyObjectCreationExpression As Func(Of ObjectCreationExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyObjectCreationExpression 70semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicNameReducer.vb (2)
22Private Shared ReadOnly s_simplifyName As Func(Of ExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyName 34semanticModel As SemanticModel,
Simplification\Reducers\VisualBasicVariableDeclaratorReducer.vb (4)
21Private Shared ReadOnly s_simplifyVariableDeclarator As Func(Of VariableDeclaratorSyntax, SemanticModel, VisualBasicSimplifierOptions, CancellationToken, SyntaxNode) = AddressOf SimplifyVariableDeclarator 33semanticModel As SemanticModel, 51semanticModel As SemanticModel, 144semanticModel As SemanticModel,
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (2)
62semanticModel As SemanticModel, 150Private Shared Function ValidateAliasForTarget(aliasReplacement As IAliasSymbol, semanticModel As SemanticModel, node As ExpressionSyntax, symbol As ISymbol) As Boolean
Simplification\Simplifiers\ExpressionSimplifier.vb (8)
25semanticModel As SemanticModel, 52semanticModel As SemanticModel, 76semanticModel As SemanticModel, 173semanticModel As SemanticModel, 219Private Shared Function ReplacementChangesSemantics(originalExpression As ExpressionSyntax, replacedExpression As ExpressionSyntax, semanticModel As SemanticModel) As Boolean 228semanticModel As SemanticModel, 272semanticModel As SemanticModel, 298semanticModel As SemanticModel,
Simplification\Simplifiers\MemberAccessExpressionSimplifier.vb (1)
26Protected Overrides Function GetSpeculationAnalyzer(semanticModel As SemanticModel, memberAccessExpression As MemberAccessExpressionSyntax, cancellationToken As CancellationToken) As ISpeculationAnalyzer
Simplification\Simplifiers\NameSimplifier.vb (4)
27semanticModel As SemanticModel, 289semanticModel As SemanticModel, 324Private Shared Function TryOmitModuleName(name As QualifiedNameSyntax, semanticModel As SemanticModel, <Out()> ByRef replacementNode As ExpressionSyntax, <Out()> ByRef issueSpan As TextSpan, cancellationToken As CancellationToken) As Boolean 354semanticModel As SemanticModel,
Simplification\VisualBasicSimplificationService.Expander.vb (4)
17Private ReadOnly _semanticModel As SemanticModel 24semanticModel As SemanticModel, 63Private Function AddCast(expression As ExpressionSyntax, targetType As ITypeSymbol, semanticModel As SemanticModel) As ExpressionSyntax 793Private Function IsTypeOfUnboundGenericType(semanticModel As SemanticModel, typeOfExpression As TypeOfExpressionSyntax) As Boolean
Simplification\VisualBasicSimplificationService.vb (6)
51Public Overrides Function Expand(node As SyntaxNode, semanticModel As SemanticModel, aliasReplacementAnnotation As SyntaxAnnotation, expandInsideNode As Func(Of SyntaxNode, Boolean), expandParameter As Boolean, cancellationToken As CancellationToken) As SyntaxNode 70Public Overrides Function Expand(token As SyntaxToken, semanticModel As SemanticModel, expandInsideNode As Func(Of SyntaxNode, Boolean), cancellationToken As CancellationToken) As SyntaxToken 77Protected Overrides Function GetSpeculativeSemanticModel(ByRef nodeToSpeculate As SyntaxNode, originalSemanticModel As SemanticModel, originalNode As SyntaxNode) As SemanticModel 81Dim speculativeModel As SemanticModel 164Protected Overrides Sub GetUnusedNamespaceImports(model As SemanticModel, namespaceImports As HashSet(Of SyntaxNode), cancellationToken As CancellationToken)
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 596Protected Overrides Sub GetForEachSymbols(model As SemanticModel, forEach As ForEachStatementSyntax, ByRef getEnumeratorMethod As IMethodSymbol, ByRef elementType As ITypeSymbol) 606Protected Overrides Function ClassifyConversion(model As SemanticModel, expression As ExpressionSyntax, targetType As ITypeSymbol) As Conversion 610Protected Overrides Function ClassifyConversion(model As SemanticModel, originalType As ITypeSymbol, targetType As ITypeSymbol) As Conversion
SyntaxNodeExtensions.vb (1)
1096semanticModel As SemanticModel,
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)
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
VisualBasicSemanticFacts.vb (26)
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 147Dim original = DirectCast(model.GetOriginalSemanticModel(), SemanticModel) 167Public Function GetForEachSymbols(model As SemanticModel, forEachStatement As SyntaxNode) As ForEachSymbols Implements ISemanticFacts.GetForEachSymbols 193Public Function GetCollectionInitializerSymbolInfo(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As SymbolInfo Implements ISemanticFacts.GetCollectionInitializerSymbolInfo 197Public Function GetGetAwaiterMethod(model As SemanticModel, node As SyntaxNode) As IMethodSymbol Implements ISemanticFacts.GetGetAwaiterMethod 207Public Function GetDeconstructionAssignmentMethods(model As SemanticModel, deconstruction As SyntaxNode) As ImmutableArray(Of IMethodSymbol) Implements ISemanticFacts.GetDeconstructionAssignmentMethods 211Public Function GetDeconstructionForEachMethods(model As SemanticModel, deconstruction As SyntaxNode) As ImmutableArray(Of IMethodSymbol) Implements ISemanticFacts.GetDeconstructionForEachMethods 223Public Function GetDeclaredSymbols(semanticModel As SemanticModel, memberDeclaration As SyntaxNode, cancellationToken As CancellationToken) As IEnumerable(Of ISymbol) Implements ISemanticFacts.GetDeclaredSymbols 233Public Function FindParameterForArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForArgument 237Public Function FindParameterForAttributeArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForAttributeArgument 241Public Function FindFieldOrPropertyForArgument(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.FindFieldOrPropertyForArgument 256Public Function FindFieldOrPropertyForAttributeArgument(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.FindFieldOrPropertyForAttributeArgument 260Public Function GetBestOrAllSymbols(semanticModel As SemanticModel, node As SyntaxNode, token As SyntaxToken, cancellationToken As CancellationToken) As ImmutableArray(Of ISymbol) Implements ISemanticFacts.GetBestOrAllSymbols 266Public Function IsInsideNameOfExpression(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInsideNameOfExpression 274Public Function IsInExpressionTree(semanticModel As SemanticModel, node As SyntaxNode, expressionTypeOpt As INamedTypeSymbol, cancellationToken As CancellationToken) As Boolean Implements ISemanticFacts.IsInExpressionTree 278Public Function GenerateNameForExpression(semanticModel As SemanticModel,
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
VisualBasicSyntaxContext.vb (2)
54semanticModel As SemanticModel, 155Public Shared Function CreateContext(document As Document, semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As VisualBasicSyntaxContext
VisualBasicSyntaxContextService.vb (1)
20Public Function CreateContext(document As Document, semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As SyntaxContext Implements ISyntaxContextService.CreateContext
VisualBasicTypeInferenceService.TypeInferrer.vb (2)
18Public Sub New(semanticModel As SemanticModel, cancellationToken As CancellationToken) 783Private Function GetDeclaredMemberSymbolFromOriginalSemanticModel(currentSemanticModel As SemanticModel, declarationInCurrentTree As DeclarationStatementSyntax) As ISymbol
VisualBasicTypeInferenceService.vb (1)
22Protected Overrides Function CreateTypeInferrer(semanticModel As SemanticModel, cancellationToken As CancellationToken) As AbstractTypeInferrer
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,
Microsoft.CodeAnalysis.Workspaces (363)
AbstractMoveDeclarationNearReferenceService.State.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractRemoveUnnecessaryImportsService.cs (2)
31var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 38var currentModel = await current.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractSemanticFactsService.cs (30)
39SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 47SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 55SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 63SemanticModel semanticModel, SyntaxNode location, SyntaxNode containerOpt, 71SemanticModel semanticModel, 90protected virtual IEnumerable<ISymbol> GetCollidableSymbols(SemanticModel semanticModel, SyntaxNode location, SyntaxNode container, CancellationToken cancellationToken) 133public bool IsWrittenTo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 136public bool IsOnlyWrittenTo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 139public bool IsInOutContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 142public bool IsInRefContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 145public bool IsInInContext(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 148public bool CanReplaceWithRValue(SemanticModel semanticModel, SyntaxNode expression, CancellationToken cancellationToken) 151public ISymbol GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 157public bool TryGetSpeculativeSemanticModel(SemanticModel oldSemanticModel, SyntaxNode oldNode, SyntaxNode newNode, out SemanticModel speculativeModel) 160public ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken) 163public ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement) 166public SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 169public IMethodSymbol GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node) 172public ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node) 175public ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node) 181public IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken) 184public IParameterSymbol FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 187public IParameterSymbol FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 190public ISymbol FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, CancellationToken cancellationToken) 193public ISymbol FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, CancellationToken cancellationToken) 196public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 199public bool IsInsideNameOfExpression(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 205public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol expressionTypeOpt, CancellationToken cancellationToken) 208public string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken)
AbstractSpeculationAnalyzer.cs (19)
47private readonly SemanticModel _semanticModel; 56private SemanticModel? _lazySpeculativeSemanticModel; 76SemanticModel semanticModel, 126public SemanticModel OriginalSemanticModel => _semanticModel; 161public SemanticModel SpeculativeSemanticModel 197protected abstract void ValidateSpeculativeSemanticModel(SemanticModel speculativeSemanticModel, SyntaxNode nodeToSpeculate); 210protected abstract SemanticModel CreateSpeculativeSemanticModel(SyntaxNode originalNode, SyntaxNode nodeToSpeculate, SemanticModel semanticModel); 278protected abstract bool ConversionsAreCompatible(SemanticModel model1, TExpressionSyntax expression1, SemanticModel model2, TExpressionSyntax expression2); 721protected abstract bool IsForEachTypeInferred(TForEachStatementSyntax forEachStatement, SemanticModel semanticModel); 758protected abstract bool ForEachConversionsAreCompatible(SemanticModel originalModel, TForEachStatementSyntax originalForEach, SemanticModel newModel, TForEachStatementSyntax newForEach); 760protected abstract void GetForEachSymbols(SemanticModel model, TForEachStatementSyntax forEach, out IMethodSymbol getEnumeratorMethod, out ITypeSymbol elementType); 942SemanticModel speculativeSemanticModel) 996private bool IsReceiverNonUniquePossibleValueTypeParam(TExpressionSyntax invocation, SemanticModel semanticModel) 1014private static bool IsReceiverUniqueInstance(TExpressionSyntax receiver, SemanticModel semanticModel) 1198protected abstract TConversion ClassifyConversion(SemanticModel model, TExpressionSyntax expression, ITypeSymbol targetType); 1199protected abstract TConversion ClassifyConversion(SemanticModel model, ITypeSymbol originalType, ITypeSymbol targetType);
AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
21protected readonly SemanticModel SemanticModel; 29protected AbstractTypeInferrer(SemanticModel semanticModel, CancellationToken cancellationToken)
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,
AbstractUnnecessaryImportsProvider.cs (2)
19SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 21public ImmutableArray<TSyntaxNode> GetUnnecessaryImports(SemanticModel model, CancellationToken cancellationToken)
AliasSymbolCache.cs (2)
28SemanticModel semanticModel, 49public static void AddAliasSymbols(SemanticModel semanticModel, int namespaceId, IEnumerable<IAliasSymbol> aliasSymbols)
CaseCorrection\AbstractCaseCorrectionService.cs (3)
22protected abstract void AddReplacements(SemanticModel? semanticModel, SyntaxNode root, ImmutableArray<TextSpan> spans, ConcurrentDictionary<SyntaxToken, SyntaxToken> replacements, CancellationToken cancellationToken); 37var semanticModel = await document.ReuseExistingSpeculativeModelAsync(spans.Collapse(), cancellationToken).ConfigureAwait(false); 46private SyntaxNode CaseCorrect(SemanticModel? semanticModel, SyntaxNode root, ImmutableArray<TextSpan> spans, CancellationToken cancellationToken)
Classification\Classifier.cs (4)
28var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 44SemanticModel semanticModel, 56SemanticModel semanticModel, 93SolutionServices services, SemanticModel semanticModel, TextSpan textSpan, ClassificationOptions options,
Classification\IEmbeddedLanguageClassificationService.cs (1)
24SemanticModel semanticModel,
Classification\SyntaxClassification\AbstractSyntaxClassificationService.cs (2)
42var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 52SemanticModel semanticModel,
Classification\SyntaxClassification\AbstractSyntaxClassificationService.Worker.cs (3)
19private readonly SemanticModel _semanticModel; 31SemanticModel semanticModel, 54SemanticModel semanticModel,
Classification\SyntaxClassification\AbstractSyntaxClassifier.cs (2)
21public virtual void AddClassifications(SyntaxNode syntax, SemanticModel semanticModel, ClassificationOptions options, ArrayBuilder<ClassifiedSpan> result, CancellationToken cancellationToken) 25public virtual void AddClassifications(SyntaxToken syntax, SemanticModel semanticModel, ClassificationOptions options, ArrayBuilder<ClassifiedSpan> result, CancellationToken cancellationToken)
Classification\SyntaxClassification\ISyntaxClassificationService.cs (1)
45SemanticModel semanticModel,
Classification\SyntaxClassification\ISyntaxClassifier.cs (2)
27void AddClassifications(SyntaxNode node, SemanticModel semanticModel, ClassificationOptions options, ArrayBuilder<ClassifiedSpan> result, CancellationToken cancellationToken); 32void AddClassifications(SyntaxToken token, SemanticModel semanticModel, ClassificationOptions options, ArrayBuilder<ClassifiedSpan> result, CancellationToken cancellationToken);
CodeGenerationSymbol.cs (2)
204public string ToMinimalDisplayString(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null) 207public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, int position, SymbolDisplayFormat format = null)
CodeGenerationTypeSymbol.cs (2)
70public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null) 73public ImmutableArray<SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
DiagnosticAnalyzerCategory.cs (1)
22/// <see cref="SemanticModel"/> is needed, use <see cref="SemanticSpanAnalysis"/> or
Diagnostics\Extensions.cs (2)
347var model = await ((Document)documentAnalysisScope.TextDocument).GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 418var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
DocumentExtensions.cs (6)
34public static async ValueTask<SemanticModel> GetRequiredSemanticModelAsync(this Document document, CancellationToken cancellationToken) 36if (document.TryGetSemanticModel(out var semanticModel)) 97public static ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, int position, CancellationToken cancellationToken) 114public static async ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, TextSpan span, CancellationToken cancellationToken) 139public static ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(this Document document, SyntaxNode? node, CancellationToken cancellationToken) 164var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Editing\DocumentEditor.cs (5)
19private readonly SemanticModel _model; 21private DocumentEditor(Document document, SemanticModel model, SyntaxNode root) 38var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 49/// The <see cref="CodeAnalysis.SemanticModel"/> of the original document. 51public SemanticModel SemanticModel => _model;
Editing\ImportAdderService.cs (6)
70protected abstract INamespaceSymbol? GetExplicitNamespaceSymbol(SyntaxNode node, SemanticModel model); 75SemanticModel model, 91SemanticModel model, 118var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 178var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 246private static bool IsInsideNamespace(SyntaxNode node, INamespaceSymbol symbol, SemanticModel model, CancellationToken cancellationToken)
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 (3)
197var cachedModels = new ConcurrentSet<SemanticModel>(); 252var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 278var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\Finders\AbstractMethodOrPropertyOrEventSymbolReferenceFinder.cs (1)
21var semanticModel = state.SemanticModel;
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (4)
483var semanticModel = state.SemanticModel; 591var semanticModel = state.SemanticModel; 752var semanticModel = state.SemanticModel; 799private static bool TryGetAdditionalProperty(SyntaxNode? node, string name, SemanticModel semanticModel, out KeyValuePair<string, string> additionalProperty)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (2)
67var semanticModel = state.SemanticModel; 156SemanticModel semanticModel,
FindSymbols\FindReferences\Finders\ConstructorInitializerSymbolReferenceFinder.cs (1)
79var semanticModel = state.SemanticModel;
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (3)
101var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 125SemanticModel semanticModel, 164private static SyntaxNode? GetContainer(SemanticModel semanticModel, SyntaxNode parameterNode, ISyntaxFactsService syntaxFactsService)
FindSymbols\FindReferences\FindReferenceCache.cs (4)
24private static readonly ConditionalWeakTable<SemanticModel, FindReferenceCache> s_cache = new(); 26public static FindReferenceCache GetCache(SemanticModel model) 29private readonly SemanticModel _semanticModel; 37private FindReferenceCache(SemanticModel semanticModel)
FindSymbols\FindReferences\FindReferencesDocumentState.cs (2)
16public readonly SemanticModel SemanticModel; 28SemanticModel semanticModel,
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
265var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (1)
88var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\ReferenceLocationExtensions.cs (3)
36var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 49SemanticModel semanticModel, 70SemanticModel semanticModel,
FindSymbols\SymbolFinder.cs (8)
23/// Obsolete. Use <see cref="FindSymbolAtPositionAsync(SemanticModel, int, Workspace, CancellationToken)"/>. 27SemanticModel semanticModel, 43SemanticModel semanticModel, 61SemanticModel semanticModel, 77SemanticModel semanticModel, 94SemanticModel semanticModel, 113var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 286var semanticModel = await linkedDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\TopLevelSyntaxTree\DeclaredSymbolInfo.cs (1)
238public ISymbol? TryResolve(SemanticModel semanticModel, CancellationToken cancellationToken)
IPragmaSuppressionsAnalyzer.cs (1)
23SemanticModel semanticModel,
ISemanticFacts.cs (24)
51bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 58bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 59bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 60bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 61bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 63bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken); 65ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken); 72bool TryGetSpeculativeSemanticModel(SemanticModel oldSemanticModel, SyntaxNode oldNode, SyntaxNode newNode, [NotNullWhen(true)] out SemanticModel? speculativeModel); 77ImmutableHashSet<string> GetAliasNameSet(SemanticModel model, CancellationToken cancellationToken); 79ForEachSymbols GetForEachSymbols(SemanticModel semanticModel, SyntaxNode forEachStatement); 80SymbolInfo GetCollectionInitializerSymbolInfo(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken); 82IMethodSymbol? GetGetAwaiterMethod(SemanticModel semanticModel, SyntaxNode node); 84ImmutableArray<IMethodSymbol> GetDeconstructionAssignmentMethods(SemanticModel semanticModel, SyntaxNode node); 86ImmutableArray<IMethodSymbol> GetDeconstructionForEachMethods(SemanticModel semanticModel, SyntaxNode node); 90IEnumerable<ISymbol> GetDeclaredSymbols(SemanticModel semanticModel, SyntaxNode memberDeclaration, CancellationToken cancellationToken); 92IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 93IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 95ISymbol? FindFieldOrPropertyForArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken); 96ISymbol? FindFieldOrPropertyForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken); 98ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken); 100bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 107bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken); 109string GenerateNameForExpression(SemanticModel semanticModel, SyntaxNode expression, bool capitalize, CancellationToken cancellationToken);
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)
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);
ISemanticModelReuseWorkspaceService.cs (1)
21ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
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; }
ISyntaxContextService.cs (1)
13SyntaxContext CreateContext(Document document, SemanticModel semanticModel, int position, CancellationToken cancellationToken);
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);
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,
IUnnecessaryImportsProvider.cs (2)
14ImmutableArray<TSyntaxNode> GetUnnecessaryImports(SemanticModel model, CancellationToken cancellationToken); 17SemanticModel model,
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs\ISymbolExtensions.cs (1)
576public static bool IsAwaitableNonDynamic([NotNullWhen(true)] this ISymbol? symbol, SemanticModel semanticModel, int position)
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (1)
45var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ReassignedVariable\AbstractReassignedVariableService.cs (1)
46var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Recommendations\AbstractRecommendationService.cs (1)
28var semanticModel = syntaxContext.SemanticModel;
Recommendations\AbstractRecommendationServiceRunner.cs (1)
275var semanticModel = _context.SemanticModel;
Recommendations\Recommender.cs (3)
20SemanticModel semanticModel, 36SemanticModel semanticModel, 51var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\ConflictResolver.cs (2)
132private static ImmutableArray<ISymbol> SymbolsForEnclosingInvocationExpressionWorker(SyntaxNode invocationExpression, SemanticModel semanticModel, CancellationToken cancellationToken) 181SemanticModel semanticModel,
Rename\ConflictEngine\ConflictResolver.Session.cs (3)
354SemanticModel? newDocumentSemanticModel = null; 647private ImmutableArray<ISymbol> GetSymbolsInNewSolution(Document newDocument, SemanticModel newDocumentSemanticModel, RenameActionAnnotation conflictAnnotation, SyntaxNodeOrToken tokenOrNode) 786var semanticModel = await document.GetRequiredSemanticModelAsync(_cancellationToken).ConfigureAwait(false);
Rename\IRenameRewriterLanguageService.cs (2)
87SemanticModel semanticModel, 128public abstract ImmutableArray<Location> ComputePossibleImplicitUsageConflicts(ISymbol renamedSymbol, SemanticModel semanticModel, Location originalDeclarationLocation, int newDeclarationLocationStartingPosition, CancellationToken cancellationToken);
Rename\Renamer.RenameSymbolDocumentAction.cs (2)
52var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 108var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Rename\RenameRewriterParameters.cs (2)
33internal readonly SemanticModel SemanticModel; 39SemanticModel semanticModel,
Rename\RenameUtilities.cs (2)
45int position, SemanticModel semanticModel, SolutionServices services, CancellationToken cancellationToken) 147SemanticModel semanticModel,
SemanticDocument.cs (3)
15public readonly SemanticModel SemanticModel; 17private SemanticDocument(Document document, SourceText text, SyntaxNode root, SemanticModel semanticModel) 27var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SemanticModelExtensions.cs (20)
32public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 35public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode statementOrExpression) 38public static DataFlowAnalysis AnalyzeRequiredDataFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 41public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode statement) 44public static ControlFlowAnalysis AnalyzeRequiredControlFlow(this SemanticModel semanticModel, SyntaxNode firstStatement, SyntaxNode lastStatement) 47public static ISymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken) 53public static IOperation GetRequiredOperation(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 59public static ISymbol GetRequiredEnclosingSymbol(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 65public static TSymbol? GetEnclosingSymbol<TSymbol>(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 81public static ISymbol GetEnclosingNamedTypeOrAssembly(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 87public static INamedTypeSymbol? GetEnclosingNamedType(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 90public static INamespaceSymbol? GetEnclosingNamespace(this SemanticModel semanticModel, int position, CancellationToken cancellationToken) 94this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null) 102public static SemanticModel GetOriginalSemanticModel(this SemanticModel semanticModel) 116this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? filter = null) 128SemanticModel semanticModel, SyntaxNode node, 153public static string GenerateNameFromType(this SemanticModel semanticModel, ITypeSymbol type, ISyntaxFacts syntaxFacts, bool capitalize) 184private static bool ShouldPluralize(this SemanticModel semanticModel, ITypeSymbol type) 235this SemanticModel semanticModel,
SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (4)
28protected abstract SemanticModel? TryGetSpeculativeSemanticModelWorker(SemanticModel previousSemanticModel, SyntaxNode previousBodyNode, SyntaxNode currentBodyNode); 41public async Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken)
SemanticModelReuse\ISemanticModelReuseLanguageService.cs (2)
38Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken);
SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (10)
21public readonly SemanticModel PreviousNonSpeculativeSemanticModel; 24/// The current semantic model we retrieved <see cref="SemanticModel"/> for the <see cref="BodyNode"/>. Could 27public readonly SemanticModel CurrentSemanticModel; 35/// The top level version of the project when we retrieved <see cref="SemanticModel"/>. As long as this is the 40public SemanticModelReuseInfo(SemanticModel previousNonSpeculativeSemanticModel, SemanticModel currentSemanticModel, SyntaxNode bodyNode, VersionStamp topLevelSementicVersion) 93public async ValueTask<SemanticModel> ReuseExistingSpeculativeModelAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 130var semanticModel = info.CurrentSemanticModel; 156var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 201var semanticModel = await reuseService.TryGetSpeculativeSemanticModelAsync(reuseInfo.PreviousNonSpeculativeSemanticModel, bodyNode, cancellationToken).ConfigureAwait(false);
Shared\Extensions\DocumentExtensions.cs (2)
30public static async Task<(Document document, SemanticModel? semanticModel)> GetPartialSemanticModelAsync(this Document document, CancellationToken cancellationToken) 35var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Shared\Extensions\SemanticEquivalence.cs (7)
17public static bool AreEquivalent(SemanticModel semanticModel, SyntaxNode node1, SyntaxNode node2) 21SemanticModel semanticModel1, 22SemanticModel semanticModel2, 51SemanticModel semanticModel1, 52SemanticModel semanticModel2, 132SemanticModel semanticModel1, 133SemanticModel semanticModel2,
Shared\Extensions\SemanticModelExtensions.cs (2)
20public static SemanticMap GetSemanticMap(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken) 72this SemanticModel semanticModel,
Shared\Extensions\SyntaxGeneratorExtensions.cs (5)
45SemanticModel semanticModel, 187SemanticModel semanticModel, 202public static SyntaxNode CreateNullCheckExpression(this SyntaxGenerator factory, SemanticModel semanticModel, string identifierName) 214SemanticModel semanticModel, 263SemanticModel semanticModel,
Shared\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
59SemanticModel semanticModel,
Shared\Utilities\SemanticMap.cs (1)
25internal static SemanticMap From(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken)
Shared\Utilities\SemanticMap.Walker.cs (2)
16private readonly SemanticModel _semanticModel; 20public Walker(SemanticModel semanticModel, SemanticMap map, CancellationToken cancellationToken)
Simplification\AbstractReducer.IExpressionRewriter.cs (1)
18SyntaxNodeOrToken VisitNodeOrToken(SyntaxNodeOrToken nodeOrTokenToReduce, SemanticModel semanticModel, bool simplifyAllDescendants);
Simplification\AbstractSimplificationService.cs (10)
38protected abstract SemanticModel GetSpeculativeSemanticModel(ref SyntaxNode nodeToSpeculate, SemanticModel originalSemanticModel, SyntaxNode originalNode); 47public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 48public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 67var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 108var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 177SemanticModel semanticModel, 196var semanticModelForReduce = semanticModel; 308var model = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 329protected abstract void GetUnusedNamespaceImports(SemanticModel model, HashSet<SyntaxNode> namespaceImports, CancellationToken cancellationToken);
Simplification\ISimplificationService.cs (2)
19SemanticModel semanticModel, 27SemanticModel semanticModel,
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)
Simplification\Simplifiers\AbstractMemberAccessExpressionSimplifier.cs (2)
23SemanticModel semanticModel, TMemberAccessExpressionSyntax memberAccessExpression, CancellationToken cancellationToken); 33SemanticModel semanticModel,
Simplification\Simplifiers\AbstractSimplifier.cs (1)
19SemanticModel semanticModel,
SimplificationHelpers.cs (2)
64public static ISymbol? GetOriginalSymbolInfo(SemanticModel semanticModel, SyntaxNode expression) 100public static bool IsNamespaceOrTypeOrThisParameter(SyntaxNode expression, SemanticModel semanticModel)
SymbolKey.AliasSymbolKey.cs (2)
43var semanticModel = reader.Compilation.GetSemanticModel(syntaxTree); 58SemanticModel semanticModel, SyntaxNode syntaxNode, string name, ISymbol target,
SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs (1)
53var semanticModel = reader.Compilation.GetSemanticModel(syntaxTree);
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)
SymbolKey.SymbolKeyReader.cs (1)
745var semanticModel = Compilation.GetSemanticModel(location.SourceTree);
SyntaxContext.cs (2)
15public SemanticModel SemanticModel { get; } 58SemanticModel semanticModel,
SyntaxEditorBasedCodeFixProvider.cs (5)
36var model = await document.GetRequiredSemanticModelAsync(fixAllContext.CancellationToken).ConfigureAwait(false); 106/// This overload differs from <see cref="IncludeDiagnosticDuringFixAll(Diagnostic, Document, SemanticModel, string, CancellationToken)"/> 107/// in that it also passes along the <see cref="SemanticModel"/>. 116protected virtual bool IncludeDiagnosticDuringFixAll(Diagnostic diagnostic, Document document, SemanticModel model, string? equivalenceKey, CancellationToken cancellationToken) 133/// cref="IncludeDiagnosticDuringFixAll(Diagnostic, Document, SemanticModel, string, CancellationToken)"/>
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);
SyntaxGeneratorExtensions_Negate.cs (7)
38SemanticModel semanticModel, 48SemanticModel semanticModel, 59SemanticModel semanticModel, 143SemanticModel semanticModel, 208SemanticModel semanticModel, 234private static SyntaxNode GetNegationOfIsPatternExpression(SyntaxNode isExpression, SyntaxGenerator generator, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, CancellationToken cancellationToken) 446SemanticModel semanticModel)
Workspace\Solution\Document.cs (8)
31/// A cached reference to the <see cref="SemanticModel"/>. 33private WeakReference<SemanticModel>? _model; 259public bool TryGetSemanticModel([NotNullWhen(returnValue: true)] out SemanticModel? semanticModel) 269/// The returned <see cref="SemanticModel"/> may be <see langword="null"/> if <see 273public async Task<SemanticModel?> GetSemanticModelAsync(CancellationToken cancellationToken = default) 282if (this.TryGetSemanticModel(out var semanticModel)) 290var result = compilation.GetSemanticModel(syntaxTree); 294var original = Interlocked.CompareExchange(ref _model, new WeakReference<SemanticModel>(result), null);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (6)
NetCoreTests.cs (6)
89var semanticModel = await document.GetSemanticModelAsync(); 115var semanticModel = await document.GetSemanticModelAsync(); 155var semanticModel = await document.GetSemanticModelAsync(); 216var semanticModel = await document.GetSemanticModelAsync(); 344var semanticModel = await document.GetSemanticModelAsync(); 482var semanticModel = await document.GetSemanticModelAsync();
Microsoft.CodeAnalysis.Workspaces.UnitTests (82)
CodeCleanup\CodeCleanupTests.cs (2)
307var semanticModel = await document.GetSemanticModelAsync(); 310var newSemanticModel = await document.ReuseExistingSpeculativeModelAsync(accessor.Statements[0], CancellationToken.None);
FindReferencesTests.cs (3)
164var semanticModel = comp.GetSemanticModel(tree); 203var semanticModel = comp.GetSemanticModel(tree); 267var semanticModel = comp.GetSemanticModel(tree);
SemanticModelReuse\SemanticModelReuseTests.cs (51)
40var model = await document.ReuseExistingSpeculativeModelAsync(null, CancellationToken.None); 52var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 53var model2 = await document.ReuseExistingSpeculativeModelAsync(null, CancellationToken.None); 66var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 67var model2 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 75var actualModel = await document.GetSemanticModelAsync(); 86var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 92var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 103var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 109var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 115var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 126var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 132var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 138var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 149var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 155var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 161var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 172var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 178var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 184var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 195var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 201var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 207var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 220var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 226var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 248var model1 = await document1.ReuseExistingSpeculativeModelAsync(source1.IndexOf("return"), CancellationToken.None); 254var model2 = await document2.ReuseExistingSpeculativeModelAsync(source2.IndexOf("{ return"), CancellationToken.None); 271var model = await document.ReuseExistingSpeculativeModelAsync(null, CancellationToken.None); 288var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 289var model2 = await document.ReuseExistingSpeculativeModelAsync(null, CancellationToken.None); 307var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 308var model2 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 316var actualModel = await document.GetSemanticModelAsync(); 332var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 343var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 359var model1 = await document1.ReuseExistingSpeculativeModelAsync(source1.IndexOf("return"), CancellationToken.None); 371var model2 = await document2.ReuseExistingSpeculativeModelAsync(source2.IndexOf("return"), CancellationToken.None); 382var model3 = await document3.ReuseExistingSpeculativeModelAsync(source2.IndexOf("return"), CancellationToken.None); 398var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 409var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 420var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 438var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 451var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 464var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 482var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 495var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 508var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 526var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 537var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 558var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 570var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None);
SerializationTests.cs (1)
67var model = document.GetSemanticModelAsync().Result;
Simplifier\SimplifierTests.cs (2)
38var semanticModel = await GetDocument().GetRequiredSemanticModelAsync(CancellationToken.None); 49var semanticModel = await GetDocument().GetRequiredSemanticModelAsync(CancellationToken.None);
SolutionTests\SolutionTests.cs (2)
1938var semantics = await document.GetSemanticModelAsync(); 2864var docModel = doc.GetSemanticModelAsync().Result;
SymbolKeyTests.cs (21)
548var model = compilation.GetSemanticModel(tree); 584var model = compilation.GetSemanticModel(tree); 606var model = compilation.GetSemanticModel(tree); 631var model = compilation.GetSemanticModel(tree); 649var model = compilation.GetSemanticModel(tree); 667var model = compilation.GetSemanticModel(tree); 687var model = compilation.GetSemanticModel(tree); 710var model = compilation.GetSemanticModel(tree); 753var model = compilation.GetSemanticModel(tree); 767var model = compilation.GetSemanticModel(tree); 796var firstModel = await document.GetSemanticModelAsync(); 799var firstReusedModel = await document.ReuseExistingSpeculativeModelAsync(position, CancellationToken.None); 809var testModel = await document.ReuseExistingSpeculativeModelAsync(position, CancellationToken.None); 843var firstModel = await document.GetSemanticModelAsync(); 846var firstReusedModel = await document.ReuseExistingSpeculativeModelAsync(position, CancellationToken.None); 856var testModel = await document.ReuseExistingSpeculativeModelAsync(position, CancellationToken.None); 1206var semanticModel = compilation1.GetSemanticModel(tree); 1416SemanticModel model, Func<SyntaxNode, bool> predicate = null) 1424SemanticModel model, SyntaxNode node, 1483var semanticModel = compilation.GetSemanticModel(node.SyntaxTree); 1491private static void GetInteriorSymbols(SemanticModel model, SyntaxNode root, List<ISymbol> symbols)
Microsoft.VisualStudio.LanguageServices (12)
CallHierarchy\CallHierarchyCommandHandler.cs (1)
90var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ChangeSignature\AddParameterDialogViewModel.cs (1)
24private readonly SemanticModel _semanticModel;
Library\ClassView\AbstractSyncClassViewCommandHandler.cs (1)
74var semanticModel = document
Progression\GraphNodeIdCreation.cs (1)
538var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Progression\GraphQueries\CallsGraphQuery.cs (1)
49var semanticModel = await solution.GetDocument(reference.SyntaxTree).GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Progression\SymbolContainment.cs (1)
41var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Snippets\AbstractSnippetExpansionClient.cs (2)
758var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); 898var semanticModel = document.GetRequiredSemanticModelAsync(cancellationToken).AsTask().WaitAndGetResult(cancellationToken);
Venus\ContainedLanguageCodeSupport.cs (4)
63var semanticModel = document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult_Venus(cancellationToken); 302var semanticModel = document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult_Venus(cancellationToken); 429var semanticModel = document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult_Venus(cancellationToken); 487var semanticModel = document.GetSemanticModelAsync(cancellationToken).WaitAndGetResult_Venus(cancellationToken);
Microsoft.VisualStudio.LanguageServices.CSharp (15)
CodeModel\CSharpCodeModelService.cs (10)
957public override string GetFullName(SyntaxNode node, SemanticModel semanticModel) 972public override string GetFullyQualifiedName(string name, int position, SemanticModel semanticModel) 2897public override string GetMethodXml(SyntaxNode node, SemanticModel semanticModel) 3017protected override ITypeSymbol? GetTypeSymbolFromPartialName(string partialName, SemanticModel semanticModel, int position) 3054var semanticModel = compilation.GetSemanticModel(tree); 3694private static TypeDeclarationSyntax InsertIntoBaseList(TypeDeclarationSyntax typeDeclaration, ITypeSymbol typeSymbol, SemanticModel semanticModel, int insertionIndex) 3726public override SyntaxNode AddBase(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel, int? position) 3759public override SyntaxNode RemoveBase(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel) 3819public override SyntaxNode AddImplementedInterface(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel, int? position) 3854public override SyntaxNode RemoveImplementedInterface(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel)
CodeModel\MethodXml\MethodXmlBuilder.cs (2)
17private MethodXmlBuilder(IMethodSymbol symbol, SemanticModel semanticModel) 609public static string Generate(MethodDeclarationSyntax methodDeclaration, SemanticModel semanticModel)
LanguageService\CSharpHelpContextService.cs (3)
54var semanticModel = await document.ReuseExistingSpeculativeModelAsync(span, cancellationToken).ConfigureAwait(false); 95private string? TryGetText(SyntaxToken token, SemanticModel semanticModel, Document document, CancellationToken cancellationToken) 156SyntaxToken token, SemanticModel semanticModel, Document document, CancellationToken cancellationToken,
Microsoft.VisualStudio.LanguageServices.Implementation (46)
CodeModel\AbstractCodeModelService.cs (11)
488public abstract string GetFullName(SyntaxNode node, SemanticModel semanticModel); 490public abstract string GetFullyQualifiedName(string name, int position, SemanticModel semanticModel); 737public abstract string GetMethodXml(SyntaxNode node, SemanticModel semanticModel); 807protected abstract ITypeSymbol? GetTypeSymbolFromPartialName(string partialName, SemanticModel semanticModel, int position); 810public ITypeSymbol GetTypeSymbol(object type, SemanticModel semanticModel, int position) 1258public virtual IList<string> GetHandledEventNames(SyntaxNode method, SemanticModel semanticModel) 1265public virtual bool HandlesEvent(string eventName, SyntaxNode method, SemanticModel semanticModel) 1296public abstract SyntaxNode AddBase(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel, int? position); 1297public abstract SyntaxNode RemoveBase(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel); 1300public abstract SyntaxNode AddImplementedInterface(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel, int? position); 1301public abstract SyntaxNode RemoveImplementedInterface(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel);
CodeModel\Collections\BasesCollection.cs (2)
65var semanticModel = FileCodeModel.GetSemanticModel(); 109var semanticModel = FileCodeModel.GetSemanticModel();
CodeModel\FileCodeModel.cs (1)
440internal SemanticModel GetSemanticModel()
CodeModel\FileCodeModel_CodeGen.cs (13)
196var semanticModel = GetSemanticModel(); 230var semanticModel = GetSemanticModel(); 264var semanticModel = GetSemanticModel(); 289var semanticModel = GetSemanticModel(); 313var semanticModel = GetSemanticModel(); 349var semanticModel = GetSemanticModel(); 395var semanticModel = GetSemanticModel(); 419var semanticModel = GetSemanticModel(); 445var semanticModel = GetSemanticModel(); 700var semanticModel = GetSemanticModel(); 723var semanticModel = GetSemanticModel(); 736var semanticModel = GetSemanticModel(); 761var semanticModel = GetSemanticModel();
CodeModel\ICodeModelService.cs (10)
119string GetFullName(SyntaxNode node, SemanticModel semanticModel); 124string GetFullyQualifiedName(string name, int position, SemanticModel semanticModel); 266string GetMethodXml(SyntaxNode node, SemanticModel semanticModel); 286ITypeSymbol GetTypeSymbol(object type, SemanticModel semanticModel, int position); 354IList<string> GetHandledEventNames(SyntaxNode method, SemanticModel semanticModel); 355bool HandlesEvent(string eventName, SyntaxNode method, SemanticModel semanticModel); 369SyntaxNode AddBase(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel, int? position); 370SyntaxNode RemoveBase(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel); 373SyntaxNode AddImplementedInterface(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel, int? position); 374SyntaxNode RemoveImplementedInterface(SyntaxNode node, ITypeSymbol typeSymbol, SemanticModel semanticModel);
CodeModel\InternalElements\AbstractCodeElement.cs (3)
48protected SemanticModel GetSemanticModel() 87var semanticModel = GetSemanticModel(); 121var semanticModel = GetSemanticModel();
CodeModel\InternalElements\CodeFunctionWithEventHandler.cs (4)
61var semanticModel = GetSemanticModel(); 74var semanticModel = GetSemanticModel(); 87var semanticModel = GetSemanticModel(); 97var semanticModel = GetSemanticModel();
CodeModel\MethodXml\AbstractMethodXmlBuilder.cs (2)
66protected readonly SemanticModel SemanticModel; 69protected AbstractMethodXmlBuilder(IMethodSymbol symbol, SemanticModel semanticModel)
Microsoft.VisualStudio.LanguageServices.VisualBasic (14)
CodeModel\MethodXML\MethodXmlBuilder.vb (2)
20Private Sub New(symbol As IMethodSymbol, semanticModel As SemanticModel) 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)
51var semanticModel = await codeDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);