2 instantiations of TypeInfo
Microsoft.CodeAnalysis (1)
Compilation\TypeInfo.cs (1)
13internal static readonly TypeInfo None = new TypeInfo(type: null, convertedType: null, nullability: default, convertedNullability: default);
Microsoft.CodeAnalysis.CSharp (1)
Compilation\TypeInfo.cs (1)
55return new TypeInfo(info.Type?.GetITypeSymbol(info.Nullability.FlowState.ToAnnotation()), info.ConvertedType?.GetITypeSymbol(info.ConvertedNullability.FlowState.ToAnnotation()),
338 references to TypeInfo
GenerateDocumentationAndConfigFiles (17)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
57var typeInfo = model.GetTypeInfo(receiverSyntax, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
218var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (3)
35var innerTypeInfo = semanticModel.GetTypeInfo(innerBinary); 66var outerTypeInfo = semanticModel.GetTypeInfo(parentBinary); 115private static bool IsFloatingPoint(TypeInfo typeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (8)
242TypeInfo originalTypeInfo, 243TypeInfo newTypeInfo) 266var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 267var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 290var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 291var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 632var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (4)
83var typeInfo = semanticModel.GetTypeInfo(assignmentOperation.Value.Syntax, cancellationToken); 112var typeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken); 120var typeInfo = semanticModel.GetTypeInfo(operation.Syntax, cancellationToken); 134static bool IsMaybeNull(TypeInfo typeInfo)
ILLink.CodeFixProvider (1)
RequiresUnsafeCodeFixProvider.cs (1)
182var typeInfo = semanticModel.GetTypeInfo(typeSyntax, cancellationToken);
Microsoft.CodeAnalysis (11)
Compilation\Extensions.cs (2)
55public static TypeInfo GetTypeInfo(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken = default(CancellationToken)) 114public static TypeInfo GetSpeculativeTypeInfo(this SemanticModel semanticModel, int position, SyntaxNode expression, SpeculativeBindingOption bindingOption)
Compilation\SemanticModel.cs (4)
174internal TypeInfo GetSpeculativeTypeInfo(int position, SyntaxNode expression, SpeculativeBindingOption bindingOption) 197protected abstract TypeInfo GetSpeculativeTypeInfoCore(int position, SyntaxNode expression, SpeculativeBindingOption bindingOption); 205internal TypeInfo GetTypeInfo(SyntaxNode node, CancellationToken cancellationToken = default(CancellationToken)) 216protected abstract TypeInfo GetTypeInfoCore(SyntaxNode node, CancellationToken cancellationToken = default(CancellationToken));
Compilation\TypeInfo.cs (5)
11public readonly struct TypeInfo : IEquatable<TypeInfo> 13internal static readonly TypeInfo None = new TypeInfo(type: null, convertedType: null, nullability: default, convertedNullability: default); 51public bool Equals(TypeInfo other) 61return obj is TypeInfo && this.Equals((TypeInfo)obj);
Microsoft.CodeAnalysis.Analyzers (19)
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (1)
219var typeInfo = semanticModel.GetTypeInfo(typeSyntax, cancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
254var typeInfo = model.GetTypeInfo(node, context.CancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
57var typeInfo = model.GetTypeInfo(receiverSyntax, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
218var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (3)
35var innerTypeInfo = semanticModel.GetTypeInfo(innerBinary); 66var outerTypeInfo = semanticModel.GetTypeInfo(parentBinary); 115private static bool IsFloatingPoint(TypeInfo typeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (8)
242TypeInfo originalTypeInfo, 243TypeInfo newTypeInfo) 266var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 267var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 290var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 291var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 632var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (4)
83var typeInfo = semanticModel.GetTypeInfo(assignmentOperation.Value.Syntax, cancellationToken); 112var typeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken); 120var typeInfo = semanticModel.GetTypeInfo(operation.Syntax, cancellationToken); 134static bool IsMaybeNull(TypeInfo typeInfo)
Microsoft.CodeAnalysis.AnalyzerUtilities (14)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
254var typeInfo = model.GetTypeInfo(node, context.CancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
57var typeInfo = model.GetTypeInfo(receiverSyntax, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
218var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (3)
35var innerTypeInfo = semanticModel.GetTypeInfo(innerBinary); 66var outerTypeInfo = semanticModel.GetTypeInfo(parentBinary); 115private static bool IsFloatingPoint(TypeInfo typeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (8)
242TypeInfo originalTypeInfo, 243TypeInfo newTypeInfo) 266var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 267var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 290var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 291var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 632var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression);
Microsoft.CodeAnalysis.CodeStyle (16)
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
149var typeInfo = semanticModel.GetTypeInfo(node, cancellationToken);
src\roslyn\src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
113var type = semanticModel.GetTypeInfo(conditionExpression, cancellationToken);
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
156var typeInfo = semanticModel.GetTypeInfo(left, cancellationToken);
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
148var objectType = context.SemanticModel.GetTypeInfo(objectCreationExpression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
218var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (3)
35var innerTypeInfo = semanticModel.GetTypeInfo(innerBinary); 66var outerTypeInfo = semanticModel.GetTypeInfo(parentBinary); 115private static bool IsFloatingPoint(TypeInfo typeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (8)
242TypeInfo originalTypeInfo, 243TypeInfo newTypeInfo) 266var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 267var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 290var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 291var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 632var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression);
Microsoft.CodeAnalysis.CodeStyle.Fixes (11)
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (3)
480var argumentTypeInfo = semanticModel.GetTypeInfo(expressionOfArgument); 520Compilation compilation, TypeInfo argumentTypeInfo, IParameterSymbol parameter, 537Compilation compilation, TypeInfo argumentTypeInfo, ITypeSymbol parameterType,
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (3)
116var typeInfo = semanticModel.GetTypeInfo(beforeArrowExpression, cancellationToken); 130var attributeType = semanticModel.GetTypeInfo(attributeName, cancellationToken); 190var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
544var typeInfo = semanticModel.GetTypeInfo(rightSide, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (4)
83var typeInfo = semanticModel.GetTypeInfo(assignmentOperation.Value.Syntax, cancellationToken); 112var typeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken); 120var typeInfo = semanticModel.GetTypeInfo(operation.Syntax, cancellationToken); 134static bool IsMaybeNull(TypeInfo typeInfo)
Microsoft.CodeAnalysis.CSharp (19)
Compilation\CSharpCompilation.cs (1)
887var info = model.GetTypeInfo(expression);
Compilation\CSharpSemanticModel.cs (9)
941public TypeInfo GetTypeInfo(ConstructorInitializerSyntax constructorInitializer, CancellationToken cancellationToken = default(CancellationToken)) 950public abstract TypeInfo GetTypeInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken)); 952public TypeInfo GetTypeInfo(PatternSyntax pattern, CancellationToken cancellationToken = default(CancellationToken)) 966public TypeInfo GetTypeInfo(ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 1012public TypeInfo GetTypeInfo(AttributeSyntax attributeSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1055public TypeInfo GetSpeculativeTypeInfo(int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption) 5038private TypeInfo GetTypeInfoFromNode(SyntaxNode node, CancellationToken cancellationToken) 5101protected sealed override TypeInfo GetSpeculativeTypeInfoCore(int position, SyntaxNode node, SpeculativeBindingOption bindingOption) 5120protected sealed override TypeInfo GetTypeInfoCore(SyntaxNode node, CancellationToken cancellationToken)
Compilation\MemberSemanticModel.cs (1)
1334public override TypeInfo GetTypeInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
500public override TypeInfo GetTypeInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (1)
438public override TypeInfo GetTypeInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken))
Compilation\TypeInfo.cs (1)
53public static implicit operator TypeInfo(CSharpTypeInfo info)
CSharpExtensions.cs (5)
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)
Microsoft.CodeAnalysis.CSharp.CodeStyle (24)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
121var lambdaTypeInfo = semanticModel.GetTypeInfo(anonymousFunction, cancellationToken);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
112var originalTypeInfo = semanticModel.GetTypeInfo(topMostExpression, cancellationToken); 180var replacedTypeInfo = speculationAnalyzer.SpeculativeSemanticModel.GetTypeInfo(speculationAnalyzer.ReplacedExpression, cancellationToken);
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (2)
64var originalInfo = operation.SemanticModel.GetTypeInfo(binaryExpression.Right); 65var newInfo = speculativeModel.GetTypeInfo(dummyStatement.GetAnnotatedNodes(s_annotation).Single());
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
244var rightType = semanticModel.GetTypeInfo(assignmentExpression.Right);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
386var expressionTypes = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
113var typeInfo = semanticModel.GetTypeInfo(qualifier, cancellationToken); 419var info = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
798var typeInfo = semanticModel.GetTypeInfo(current, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (5)
952var originalCastExpressionTypeInfo = originalSemanticModel.GetTypeInfo(castExpression, cancellationToken); 953var originalConditionalTypeInfo = originalSemanticModel.GetTypeInfo(originalConditionalOrSwitchExpression, cancellationToken); 954var rewrittenConditionalTypeInfo = rewrittenSemanticModel.GetTypeInfo(rewrittenConditionalOrSwitchExpression, cancellationToken); 1050private static bool IsNullOrErrorType(TypeInfo info) 1260var typeInfo = semanticModel.GetTypeInfo(arrayInitializer, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (8)
383var originalExpressionTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression, this.CancellationToken); 384var newExpressionTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression, this.CancellationToken); 491var originalExprType = this.OriginalSemanticModel.GetTypeInfo(originalSwitchExpression.GoverningExpression, CancellationToken); 492var replacedExprType = this.SpeculativeSemanticModel.GetTypeInfo(replacedSwitchExpression.GoverningExpression, CancellationToken); 542private bool ReplacementBreaksBoxingInConditionalExpression(TypeInfo originalExpressionTypeInfo, TypeInfo newExpressionTypeInfo, ExpressionSyntax previousOriginalNode, ExpressionSyntax previousReplacedNode) 745TypeInfo originalTypeInfo, 746TypeInfo newTypeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
145var initializerTypeInfo = semanticModel.GetTypeInfo(initializer, cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (20)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
192var typeInfo = _semanticModel.GetTypeInfo(node, _cancellationToken);
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
157var typeInfo = document.SemanticModel.GetTypeInfo(implicitObjectCreation, cancellationToken);
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
65var semanticInfo = semanticModel.GetTypeInfo(methodDeclaration.ExplicitInterfaceSpecifier.Name, cancellationToken);
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (2)
116var info = Document.SemanticModel.GetTypeInfo(type, cancellationToken); 153var typeInfo = Document.SemanticModel.GetTypeInfo(typeArgument, cancellationToken);
src\roslyn\src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
97var info = model.GetTypeInfo(expression);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
139var asExpressionTypeInfo = semanticModel.GetTypeInfo(asExpression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
692var typeInfo = semanticModel.GetTypeInfo(memberAccessExpression.Expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (2)
25var typeInfo = semanticModel.GetTypeInfo(decl.Type, cancellationToken); 32var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
62var rightType = semanticModel.GetTypeInfo(right, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
101var typeInfo = SemanticModel.GetTypeInfo(node, CancellationToken); 442var info = SemanticModel.GetTypeInfo(creation, CancellationToken); 463var info = SemanticModel.GetTypeInfo(primaryConstructorBaseType.Type, CancellationToken); 503var typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken); 570var info = SemanticModel.GetTypeInfo(elementAccess.Expression, CancellationToken); 1237var typeInfo = SemanticModel.GetTypeInfo(propertyDeclaration.Type); 1631var typeInfo = SemanticModel.GetTypeInfo(recursivePattern);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableExtensions.cs (2)
9public static ITypeSymbol? GetConvertedTypeWithAnnotatedNullability(this TypeInfo typeInfo) 12public static ITypeSymbol? GetTypeWithAnnotatedNullability(this TypeInfo typeInfo)
Microsoft.CodeAnalysis.CSharp.Features (23)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
151var typeInfo = semanticModel.GetSpeculativeTypeInfo(type.SpanStart, type, SpeculativeBindingOption.BindAsTypeOrNamespace);
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (2)
551var returnTypeInfo = _semanticModel.GetTypeInfo(_source, _cancellationToken); 665var lastSelectExpressionTypeInfo = _semanticModel.GetTypeInfo(lastSelectExpression, _cancellationToken);
ExtractMethod\CSharpMethodExtractor.Analyzer.cs (1)
28var info = this.SemanticModel.GetSpeculativeTypeInfo(SelectionResult.FinalSpan.Start, SyntaxFactory.ParseName(symbol.Name), SpeculativeBindingOption.BindAsExpression);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
1105var returnTypeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken);
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (2)
99var info = semanticModel.GetTypeInfo(expression, cancellationToken); 133private static bool IsCoClassImplicitConversion(TypeInfo info, Conversion conversion, INamedTypeSymbol? coclassSymbol)
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
76var info = semanticModel.GetTypeInfo(propertyDeclaration.ExplicitInterfaceSpecifier.Name, cancellationToken);
QuickInfo\CSharpSemanticQuickInfoProvider.cs (2)
256var typeInfo = GetTypeInfo(semanticModel, symbol, node, cancellationToken); 269static TypeInfo GetTypeInfo(SemanticModel semanticModel, ISymbol symbol, SyntaxNode node, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
121var lambdaTypeInfo = semanticModel.GetTypeInfo(anonymousFunction, cancellationToken);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
112var originalTypeInfo = semanticModel.GetTypeInfo(topMostExpression, cancellationToken); 180var replacedTypeInfo = speculationAnalyzer.SpeculativeSemanticModel.GetTypeInfo(speculationAnalyzer.ReplacedExpression, cancellationToken);
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (2)
64var originalInfo = operation.SemanticModel.GetTypeInfo(binaryExpression.Right); 65var newInfo = speculativeModel.GetTypeInfo(dummyStatement.GetAnnotatedNodes(s_annotation).Single());
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
244var rightType = semanticModel.GetTypeInfo(assignmentExpression.Right);
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
192var typeInfo = _semanticModel.GetTypeInfo(node, _cancellationToken);
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
157var typeInfo = document.SemanticModel.GetTypeInfo(implicitObjectCreation, cancellationToken);
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
65var semanticInfo = semanticModel.GetTypeInfo(methodDeclaration.ExplicitInterfaceSpecifier.Name, cancellationToken);
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (2)
116var info = Document.SemanticModel.GetTypeInfo(type, cancellationToken); 153var typeInfo = Document.SemanticModel.GetTypeInfo(typeArgument, cancellationToken);
src\roslyn\src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
97var info = model.GetTypeInfo(expression);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
139var asExpressionTypeInfo = semanticModel.GetTypeInfo(asExpression, cancellationToken);
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Runtime\CSharpAvoidRedundantRegexIsMatchBeforeMatch.Fixer.cs (1)
331var typeInfo = model.GetTypeInfo(typeSyntax, cancellationToken);
Microsoft.NetCore.Analyzers\Usage\CSharpPreferGenericOverloads.Fixer.cs (1)
49var typeInfo = invocationContext.SemanticModel.GetSpeculativeTypeInfo(
Microsoft.CodeAnalysis.CSharp.Workspaces (33)
Simplification\CSharpSimplificationService.Expander.cs (1)
792var typeinfo = semanticModel.GetTypeInfo(argument.Expression);
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
289var typeInfo = semanticModel.GetSpeculativeTypeInfo(node.SpanStart, aliasIdentifier, SpeculativeBindingOption.BindAsExpression);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
386var expressionTypes = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
113var typeInfo = semanticModel.GetTypeInfo(qualifier, cancellationToken); 419var info = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
798var typeInfo = semanticModel.GetTypeInfo(current, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (5)
952var originalCastExpressionTypeInfo = originalSemanticModel.GetTypeInfo(castExpression, cancellationToken); 953var originalConditionalTypeInfo = originalSemanticModel.GetTypeInfo(originalConditionalOrSwitchExpression, cancellationToken); 954var rewrittenConditionalTypeInfo = rewrittenSemanticModel.GetTypeInfo(rewrittenConditionalOrSwitchExpression, cancellationToken); 1050private static bool IsNullOrErrorType(TypeInfo info) 1260var typeInfo = semanticModel.GetTypeInfo(arrayInitializer, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (8)
383var originalExpressionTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression, this.CancellationToken); 384var newExpressionTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression, this.CancellationToken); 491var originalExprType = this.OriginalSemanticModel.GetTypeInfo(originalSwitchExpression.GoverningExpression, CancellationToken); 492var replacedExprType = this.SpeculativeSemanticModel.GetTypeInfo(replacedSwitchExpression.GoverningExpression, CancellationToken); 542private bool ReplacementBreaksBoxingInConditionalExpression(TypeInfo originalExpressionTypeInfo, TypeInfo newExpressionTypeInfo, ExpressionSyntax previousOriginalNode, ExpressionSyntax previousReplacedNode) 745TypeInfo originalTypeInfo, 746TypeInfo newTypeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
145var initializerTypeInfo = semanticModel.GetTypeInfo(initializer, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
692var typeInfo = semanticModel.GetTypeInfo(memberAccessExpression.Expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (2)
25var typeInfo = semanticModel.GetTypeInfo(decl.Type, cancellationToken); 32var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
62var rightType = semanticModel.GetTypeInfo(right, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
101var typeInfo = SemanticModel.GetTypeInfo(node, CancellationToken); 442var info = SemanticModel.GetTypeInfo(creation, CancellationToken); 463var info = SemanticModel.GetTypeInfo(primaryConstructorBaseType.Type, CancellationToken); 503var typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken); 570var info = SemanticModel.GetTypeInfo(elementAccess.Expression, CancellationToken); 1237var typeInfo = SemanticModel.GetTypeInfo(propertyDeclaration.Type); 1631var typeInfo = SemanticModel.GetTypeInfo(recursivePattern);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableExtensions.cs (2)
9public static ITypeSymbol? GetConvertedTypeWithAnnotatedNullability(this TypeInfo typeInfo) 12public static ITypeSymbol? GetTypeWithAnnotatedNullability(this TypeInfo typeInfo)
Microsoft.CodeAnalysis.Features (28)
AddImport\SymbolReferenceFinder.cs (1)
403var semanticInfo = _semanticModel.GetTypeInfo(leftExpression, cancellationToken);
ChangeSignature\AbstractChangeSignatureService.cs (1)
1061var fromType = semanticModel.GetTypeInfo(lastArgumentExpression, cancellationToken);
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (1)
122var typeInfo = semanticModel.GetTypeInfo(attributeNode, cancellationToken);
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
104var collectionType = semanticModel.GetTypeInfo(collectionExpression, cancellationToken);
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
102var typeInfo = semanticModel.GetTypeInfo(lastArgumentExpression, cancellationToken);
EmbeddedLanguages\AbstractLanguageDetector.cs (1)
126var exprType = semanticModel.GetTypeInfo(expr, cancellationToken);
GenerateType\AbstractGenerateTypeService.State.cs (1)
159var typeInfo = semanticModel.GetTypeInfo(ObjectCreationExpressionOpt, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.cs (1)
381var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
232var typeInfo = document.SemanticModel.GetTypeInfo(expression, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.State_ConstructorInitializer.cs (1)
35var info = Document.SemanticModel.GetTypeInfo(Expression, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.State_Field.cs (1)
42var info = Document.SemanticModel.GetTypeInfo(Expression, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.State_Query.cs (1)
29var info = Document.SemanticModel.GetTypeInfo(Expression, cancellationToken);
QuickInfo\CommonSemanticQuickInfoProvider.cs (1)
354var typeInfo = semanticModel.GetTypeInfo(token.Parent!, cancellationToken);
Snippets\InlineExpressionInfo.cs (2)
10internal sealed class InlineExpressionInfo(SyntaxNode node, TypeInfo typeInfo) 23public TypeInfo TypeInfo { get; } = typeInfo;
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (2)
127var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken); 160var typeInfo = semanticModel.GetSpeculativeTypeInfo(expression.SpanStart, expression, SpeculativeBindingOption.BindAsExpression);
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
149var typeInfo = semanticModel.GetTypeInfo(node, cancellationToken);
src\roslyn\src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
113var type = semanticModel.GetTypeInfo(conditionExpression, cancellationToken);
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
156var typeInfo = semanticModel.GetTypeInfo(left, cancellationToken);
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
148var objectType = context.SemanticModel.GetTypeInfo(objectCreationExpression, cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (3)
480var argumentTypeInfo = semanticModel.GetTypeInfo(expressionOfArgument); 520Compilation compilation, TypeInfo argumentTypeInfo, IParameterSymbol parameter, 537Compilation compilation, TypeInfo argumentTypeInfo, ITypeSymbol parameterType,
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (3)
116var typeInfo = semanticModel.GetTypeInfo(beforeArrowExpression, cancellationToken); 130var attributeType = semanticModel.GetTypeInfo(attributeName, cancellationToken); 190var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
544var typeInfo = semanticModel.GetTypeInfo(rightSide, cancellationToken);
Microsoft.CodeAnalysis.ResxSourceGenerator (14)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
254var typeInfo = model.GetTypeInfo(node, context.CancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
57var typeInfo = model.GetTypeInfo(receiverSyntax, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
218var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (3)
35var innerTypeInfo = semanticModel.GetTypeInfo(innerBinary); 66var outerTypeInfo = semanticModel.GetTypeInfo(parentBinary); 115private static bool IsFloatingPoint(TypeInfo typeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (8)
242TypeInfo originalTypeInfo, 243TypeInfo newTypeInfo) 266var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 267var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 290var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 291var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 632var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression);
Microsoft.CodeAnalysis.VisualBasic (9)
Compilation\SemanticModel.vb (5)
287Public Shadows Function GetTypeInfo(expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As TypeInfo 323Public Shadows Function GetSpeculativeTypeInfo(position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As TypeInfo 338Public Shadows Function GetTypeInfo(attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As TypeInfo 3159Protected NotOverridable Overrides Function GetSpeculativeTypeInfoCore(position As Integer, expression As SyntaxNode, bindingOption As SpeculativeBindingOption) As TypeInfo 3181Protected NotOverridable Overrides Function GetTypeInfoCore(node As SyntaxNode, Optional cancellationToken As CancellationToken = Nothing) As TypeInfo
Compilation\TypeInfo.vb (1)
51Public Shared Widening Operator CType(info As VisualBasicTypeInfo) As TypeInfo
VisualBasicExtensions.vb (3)
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
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (1)
57Private Shared Function GetOuterCastType(expression As ExpressionSyntax, expressionTypeInfo As TypeInfo, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol
Microsoft.CodeAnalysis.VisualBasic.Features (2)
ExtractMethod\VisualBasicSelectionResult.vb (2)
145Dim info As TypeInfo 189Private Shared Function IsCoClassImplicitConversion(info As TypeInfo, conversion As Conversion, coclassSymbol As INamedTypeSymbol) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Simplification\VisualBasicSimplificationService.Expander.vb (1)
74Private Function AddCasts(expression As ExpressionSyntax, typeInfo As TypeInfo, conversion As Conversion, oldExpression As ExpressionSyntax) As ExpressionSyntax
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (1)
57Private Shared Function GetOuterCastType(expression As ExpressionSyntax, expressionTypeInfo As TypeInfo, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol
Microsoft.CodeAnalysis.Workspaces (17)
Shared\Extensions\SemanticModelExtensions.cs (1)
113var typeInfo = bindableParent != null ? semanticModel.GetTypeInfo(bindableParent, cancellationToken) : default;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
218var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (3)
35var innerTypeInfo = semanticModel.GetTypeInfo(innerBinary); 66var outerTypeInfo = semanticModel.GetTypeInfo(parentBinary); 115private static bool IsFloatingPoint(TypeInfo typeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (8)
242TypeInfo originalTypeInfo, 243TypeInfo newTypeInfo) 266var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 267var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 290var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 291var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 632var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (4)
83var typeInfo = semanticModel.GetTypeInfo(assignmentOperation.Value.Syntax, cancellationToken); 112var typeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken); 120var typeInfo = semanticModel.GetTypeInfo(operation.Syntax, cancellationToken); 134static bool IsMaybeNull(TypeInfo typeInfo)
Roslyn.Diagnostics.Analyzers (21)
AbstractApplyTraitToClass`1.cs (2)
55var attributeType = semanticModel.GetTypeInfo(attribute, context.CancellationToken); 94var attributeType = state.SemanticModel.GetTypeInfo(attribute, cancellationToken);
SpecializedEnumerableCreationAnalyzer.cs (1)
134TypeInfo typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
254var typeInfo = model.GetTypeInfo(node, context.CancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
57var typeInfo = model.GetTypeInfo(receiverSyntax, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
218var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (3)
35var innerTypeInfo = semanticModel.GetTypeInfo(innerBinary); 66var outerTypeInfo = semanticModel.GetTypeInfo(parentBinary); 115private static bool IsFloatingPoint(TypeInfo typeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (8)
242TypeInfo originalTypeInfo, 243TypeInfo newTypeInfo) 266var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 267var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 290var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 291var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 632var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (4)
83var typeInfo = semanticModel.GetTypeInfo(assignmentOperation.Value.Syntax, cancellationToken); 112var typeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken); 120var typeInfo = semanticModel.GetTypeInfo(operation.Syntax, cancellationToken); 134static bool IsMaybeNull(TypeInfo typeInfo)
Roslyn.Diagnostics.CSharp.Analyzers (31)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
386var expressionTypes = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
113var typeInfo = semanticModel.GetTypeInfo(qualifier, cancellationToken); 419var info = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
798var typeInfo = semanticModel.GetTypeInfo(current, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (5)
952var originalCastExpressionTypeInfo = originalSemanticModel.GetTypeInfo(castExpression, cancellationToken); 953var originalConditionalTypeInfo = originalSemanticModel.GetTypeInfo(originalConditionalOrSwitchExpression, cancellationToken); 954var rewrittenConditionalTypeInfo = rewrittenSemanticModel.GetTypeInfo(rewrittenConditionalOrSwitchExpression, cancellationToken); 1050private static bool IsNullOrErrorType(TypeInfo info) 1260var typeInfo = semanticModel.GetTypeInfo(arrayInitializer, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (8)
383var originalExpressionTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression, this.CancellationToken); 384var newExpressionTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression, this.CancellationToken); 491var originalExprType = this.OriginalSemanticModel.GetTypeInfo(originalSwitchExpression.GoverningExpression, CancellationToken); 492var replacedExprType = this.SpeculativeSemanticModel.GetTypeInfo(replacedSwitchExpression.GoverningExpression, CancellationToken); 542private bool ReplacementBreaksBoxingInConditionalExpression(TypeInfo originalExpressionTypeInfo, TypeInfo newExpressionTypeInfo, ExpressionSyntax previousOriginalNode, ExpressionSyntax previousReplacedNode) 745TypeInfo originalTypeInfo, 746TypeInfo newTypeInfo)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
145var initializerTypeInfo = semanticModel.GetTypeInfo(initializer, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
692var typeInfo = semanticModel.GetTypeInfo(memberAccessExpression.Expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (2)
25var typeInfo = semanticModel.GetTypeInfo(decl.Type, cancellationToken); 32var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
62var rightType = semanticModel.GetTypeInfo(right, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
101var typeInfo = SemanticModel.GetTypeInfo(node, CancellationToken); 442var info = SemanticModel.GetTypeInfo(creation, CancellationToken); 463var info = SemanticModel.GetTypeInfo(primaryConstructorBaseType.Type, CancellationToken); 503var typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken); 570var info = SemanticModel.GetTypeInfo(elementAccess.Expression, CancellationToken); 1237var typeInfo = SemanticModel.GetTypeInfo(propertyDeclaration.Type); 1631var typeInfo = SemanticModel.GetTypeInfo(recursivePattern);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableExtensions.cs (2)
9public static ITypeSymbol? GetConvertedTypeWithAnnotatedNullability(this TypeInfo typeInfo) 12public static ITypeSymbol? GetTypeWithAnnotatedNullability(this TypeInfo typeInfo)
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (1)
57Private Shared Function GetOuterCastType(expression As ExpressionSyntax, expressionTypeInfo As TypeInfo, semanticModel As SemanticModel, cancellationToken As CancellationToken) As ITypeSymbol
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
71TypeInfo objectTypeInfo = context.SemanticModel.GetTypeInfo(memberAccess.Expression);
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (1)
72Dim objectTypeInfo As TypeInfo = context.SemanticModel.GetTypeInfo(memberAccess.Expression)