1 instantiation of TypeInfo
Microsoft.CodeAnalysis (1)
Compilation\TypeInfo.cs (1)
13internal static readonly TypeInfo None = new TypeInfo(type: null, convertedType: null, nullability: default, convertedNullability: default);
934 references to TypeInfo
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (1)
HubClientProxyGenerator.Parser.cs (1)
261var argTypeInfo = argModel.GetTypeInfo(als.Arguments[0].Expression);
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.CodeStyle (16)
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
150var typeInfo = semanticModel.GetTypeInfo(node, cancellationToken);
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
113var type = semanticModel.GetTypeInfo(conditionExpression, cancellationToken);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
168var typeInfo = semanticModel.GetTypeInfo(left, cancellationToken);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
143var objectType = context.SemanticModel.GetTypeInfo(objectCreationExpression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
236var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (8)
241TypeInfo originalTypeInfo, 242TypeInfo newTypeInfo) 265var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 266var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 289var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 290var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 632var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression);
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (3)
478var argumentTypeInfo = semanticModel.GetTypeInfo(expressionOfArgument); 518Compilation compilation, TypeInfo argumentTypeInfo, IParameterSymbol parameter, 535Compilation compilation, TypeInfo argumentTypeInfo, ITypeSymbol parameterType,
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (3)
126var typeInfo = semanticModel.GetTypeInfo(beforeArrowExpression, cancellationToken); 144var attributeType = semanticModel.GetTypeInfo(attributeName, cancellationToken); 186var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
Microsoft.CodeAnalysis.CSharp (19)
Compilation\CSharpCompilation.cs (1)
799var info = model.GetTypeInfo(expression);
Compilation\CSharpSemanticModel.cs (9)
925public TypeInfo GetTypeInfo(ConstructorInitializerSyntax constructorInitializer, CancellationToken cancellationToken = default(CancellationToken)) 934public abstract TypeInfo GetTypeInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken)); 936public TypeInfo GetTypeInfo(PatternSyntax pattern, CancellationToken cancellationToken = default(CancellationToken)) 950public TypeInfo GetTypeInfo(ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken)) 996public TypeInfo GetTypeInfo(AttributeSyntax attributeSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1039public TypeInfo GetSpeculativeTypeInfo(int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption) 4970private TypeInfo GetTypeInfoFromNode(SyntaxNode node, CancellationToken cancellationToken) 5033protected sealed override TypeInfo GetSpeculativeTypeInfoCore(int position, SyntaxNode node, SpeculativeBindingOption bindingOption) 5052protected sealed override TypeInfo GetTypeInfoCore(SyntaxNode node, CancellationToken cancellationToken)
Compilation\MemberSemanticModel.cs (1)
1295public override TypeInfo GetTypeInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
490public 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\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
126var lambdaTypeInfo = semanticModel.GetTypeInfo(anonymousFunction, cancellationToken);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
92var originalTypeInfo = semanticModel.GetTypeInfo(topMostExpression, cancellationToken); 160var replacedTypeInfo = speculationAnalyzer.SpeculativeSemanticModel.GetTypeInfo(speculationAnalyzer.ReplacedExpression, cancellationToken);
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\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
253var rightType = semanticModel.GetTypeInfo(assignmentExpression.Right);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
386var expressionTypes = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
113var typeInfo = semanticModel.GetTypeInfo(qualifier, cancellationToken); 416var info = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
796var typeInfo = semanticModel.GetTypeInfo(current, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (5)
821var originalCastExpressionTypeInfo = originalSemanticModel.GetTypeInfo(castExpression, cancellationToken); 822var originalConditionalTypeInfo = originalSemanticModel.GetTypeInfo(originalConditionalExpression, cancellationToken); 823var rewrittenConditionalTypeInfo = rewrittenSemanticModel.GetTypeInfo(rewrittenConditionalExpression, cancellationToken); 860private static bool IsNullOrErrorType(TypeInfo info) 1050var typeInfo = semanticModel.GetTypeInfo(arrayInitializer, cancellationToken);
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
156var initializerTypeInfo = semanticModel.GetTypeInfo(initializer, cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (14)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
192var typeInfo = _semanticModel.GetTypeInfo(node, _cancellationToken);
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
160var typeInfo = document.SemanticModel.GetTypeInfo(implicitObjectCreation, cancellationToken);
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
66var semanticInfo = semanticModel.GetTypeInfo(methodDeclaration.ExplicitInterfaceSpecifier.Name, cancellationToken);
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (2)
120var info = Document.SemanticModel.GetTypeInfo(type, cancellationToken); 158var typeInfo = Document.SemanticModel.GetTypeInfo(typeArgument, cancellationToken);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
96var info = model.GetTypeInfo(expression);
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
140var asExpressionTypeInfo = semanticModel.GetTypeInfo(asExpression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
693var typeInfo = semanticModel.GetTypeInfo(memberAccessExpression.Expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (2)
28var typeInfo = semanticModel.GetTypeInfo(decl.Type, cancellationToken); 35var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
62var rightType = semanticModel.GetTypeInfo(right, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableExtensions.cs (2)
9public static ITypeSymbol? GetConvertedTypeWithAnnotatedNullability(this TypeInfo typeInfo) 12public static ITypeSymbol? GetTypeWithAnnotatedNullability(this TypeInfo typeInfo)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (1)
82var typeInfo = semanticModel.GetTypeInfo(syntax);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
CodeGeneration\SyntaxGeneratorTests.cs (1)
90var typeInfo = speculativeModel.GetTypeInfo(replacement.Expression);
SymbolKey\SymbolKeyTestBase.cs (2)
56var typeinfo = model.GetTypeInfo(node); 398var tinfo = model.GetTypeInfo(expr);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (90)
CodeGen\CodeGenAsyncMethodBuilderOverrideTests.cs (4)
896var firstLambda = model.GetTypeInfo(lambdas[0]); 900var secondLambda = model.GetTypeInfo(lambdas[1]); 948var firstLambda = model.GetTypeInfo(lambdas[0]); 952var secondLambda = model.GetTypeInfo(lambdas[1]);
CodeGen\CodeGenFunctionPointersTests.cs (1)
10808var typeInfo = model.GetTypeInfo(lambdas[0]);
CodeGen\CodeGenLocalFunctionTests.cs (1)
165var info = model.GetTypeInfo(creation);
CodeGen\CodeGenTupleEqualityTests.cs (71)
372var xSymbol = model.GetTypeInfo(lastX); 376var tupleXSymbol = model.GetTypeInfo(tupleX); 389var ySymbol = model.GetTypeInfo(lastY); 393var tupleYSymbol = model.GetTypeInfo(tupleY); 683var symbol1 = model.GetTypeInfo(tuple1); 689var symbol2 = model.GetTypeInfo(tuple2); 721var tTypeInfo = model.GetTypeInfo(t); 731var tupleTypeInfo = model.GetTypeInfo(tuple); 795var tupleType1 = model.GetTypeInfo(tuple1); 800var tuple1NullTypeInfo = model.GetTypeInfo(tuple1Null); 808var tupleType2 = model.GetTypeInfo(tuple2); 813var tuple2NullTypeInfo = model.GetTypeInfo(tuple2Null); 860var t1TypeInfo = model.GetTypeInfo(t1); 869var tupleType = model.GetTypeInfo(tuple); 877var twoType = model.GetTypeInfo(two); 908var t1TypeInfo = model.GetTypeInfo(t1); 917var tupleType = model.GetTypeInfo(tuple); 925var twoType = model.GetTypeInfo(two); 957var t1TypeInfo = model.GetTypeInfo(t1); 966var tupleType = model.GetTypeInfo(tuple); 973var t2TypeInfo = model.GetTypeInfo(t2); 1003var tupleType = model.GetTypeInfo(tuple); 1011TypeInfo lastTupleTypeInfo = model.GetTypeInfo(lastTuple); 1018TypeInfo nullNullTypeInfo = model.GetTypeInfo(nullNull); 1025TypeInfo lastNullTypeInfo = model.GetTypeInfo(lastNull); 1061var info = model.GetTypeInfo(literal); 1095var info = model.GetTypeInfo(literal); 1127var info = model.GetTypeInfo(literal); 1158var info = model.GetTypeInfo(literal); 1216var type = model.GetTypeInfo(literal); 1500var tupleType = model.GetTypeInfo(tuple); 1509var tType = model.GetTypeInfo(t); 1520var nestedTupleType = model.GetTypeInfo(nestedTuple); 1531var nestedNullType = model.GetTypeInfo(nestedNull); 1561var symbol = model.GetTypeInfo(literal); 1570var symbol = model.GetTypeInfo(tuple); 1596var literalInfo = model.GetTypeInfo(lastLiteral); 1621var literalInfo = model.GetTypeInfo(rightTuple); 1627var nestedLiteralInfo = model.GetTypeInfo(rightTuple); 1633var twoInfo = model.GetTypeInfo(two); 1678var tupleType1 = model.GetTypeInfo(tuple1); 1686var tupleType2 = model.GetTypeInfo(tuple2); 1778var tupleType1 = model.GetTypeInfo(tuple1); 1784var tupleType2 = model.GetTypeInfo(tuple2); 1920var tupleType1 = model.GetTypeInfo(tuple1); 1926var tupleType2 = model.GetTypeInfo(tuple2); 2577var intTupleType = model.GetTypeInfo(intTuple); 2585var lastTupleType = model.GetTypeInfo(lastTuple); 2645var t1Type = model.GetTypeInfo(t1); 3280var nt1Type = model.GetTypeInfo(nt1); 3286var nt2Type = model.GetTypeInfo(nt2); 3686var nt1Type = model.GetTypeInfo(nt1); 3692var nt2Type = model.GetTypeInfo(nt2); 3810var nt1Type = model.GetTypeInfo(nt1); 3816var nt2Type = model.GetTypeInfo(nt2); 3913var nt1Type = model.GetTypeInfo(nt1); 3919var nt2Type = model.GetTypeInfo(nt2); 4038var tupleType = model.GetTypeInfo(tuple); 4044var ntType = model.GetTypeInfo(nt); 4086var tupleType = model.GetTypeInfo(tuple); 4092var ntType = model.GetTypeInfo(nt); 4186var nullType = model.GetTypeInfo(lastNull); 4279var left = model.GetTypeInfo(comparison.Left); 5126var leftInfo = model.GetTypeInfo(leftTuple); 5132var rightInfo = model.GetTypeInfo(rightTuple); 5163var leftCastInfo = model.GetTypeInfo(leftCast); 5171var leftTupleInfo = model.GetTypeInfo(leftTuple); 5179var leftNullInfo = model.GetTypeInfo(leftNull); 5187var leftNestedTupleInfo = model.GetTypeInfo(leftNestedTuple); 5194var rightCastInfo = model.GetTypeInfo(rightCast); 5201var rightTupleInfo = model.GetTypeInfo(rightTuple);
CodeGen\CodeGenTupleTest.cs (13)
8381var typeInfo = model.GetTypeInfo(node); 9017var typeInfo = model.GetTypeInfo(node); 9074var typeInfo = model.GetTypeInfo(node); 9146var typeInfo = model.GetTypeInfo(node); 9227var typeInfo = model.GetTypeInfo(node); 9310var typeInfo = model.GetTypeInfo(node); 13986var typeInfo = model.GetTypeInfo(t.Type); 16543var typeInfo = model.GetTypeInfo(node); 24201var typeInfo = model.GetTypeInfo(type); 25055var yType = model.GetTypeInfo(y); 25060var zType = model.GetTypeInfo(z); 25086var tupleType = model.GetTypeInfo(tuple); 26227var tupleSymbol = model.GetTypeInfo(node);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
6010var typeInfo = model.GetTypeInfo(expr);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (97)
FieldKeywordTests.cs (1)
9478var typeInfo = model.GetTypeInfo(value);
FirstClassSpanTests.cs (1)
2734var argType = model.GetTypeInfo(arg);
Semantics\CollectionExpressionTests.cs (21)
14312var typeInfo = model.GetTypeInfo(returnValue); 14388var typeInfo = model.GetTypeInfo(returnValue); 14453var typeInfo = model.GetTypeInfo(collection); 14522var typeInfo = model.GetTypeInfo(value); 14647var typeInfo = model.GetTypeInfo(value); 14727var typeInfo = model.GetTypeInfo(nestedCollection); 14822var typeInfo = model.GetTypeInfo(nestedCollection); 15164var typeInfo = model.GetTypeInfo(expr); 28702var typeInfo2 = model.GetTypeInfo(collections[1]); 28746var typeInfo2 = model.GetTypeInfo(collections[1]); 28836var typeInfo2 = model.GetTypeInfo(collections[1]); 28879var typeInfo2 = model.GetTypeInfo(collections[1]); 29029var typeInfo2 = model.GetTypeInfo(collections[1]); 29037var typeInfo3 = model.GetTypeInfo(collections[2]); 29082var typeInfo2 = model.GetTypeInfo(collections[1]); 29090var typeInfo3 = model.GetTypeInfo(collections[2]); 29146var typeInfo2 = model.GetTypeInfo(collections[1]); 29153var typeInfo3 = model.GetTypeInfo(collections[2]); 29207var typeInfo2 = model.GetTypeInfo(collections[1]); 29214var typeInfo3 = model.GetTypeInfo(collections[2]); 41620var info = model.GetTypeInfo(conditional);
Semantics\InlineArrayTests.cs (16)
2362var typeInfo = model.GetTypeInfo(c); 2397var typeInfo = model.GetTypeInfo(c); 2431var typeInfo = model.GetTypeInfo(c); 2511var typeInfo = model.GetTypeInfo(f); 6036var typeInfo = model.GetTypeInfo(f); 6202var typeInfo = model.GetTypeInfo(f); 8121var typeInfo = model.GetTypeInfo(f); 8838var typeInfo = model.GetTypeInfo(m3); 9206var typeInfo = model.GetTypeInfo(m3.Parent); 10550var typeInfo = model.GetTypeInfo(f); 11294var typeInfo = model.GetTypeInfo(f); 15211var typeInfo = model.GetTypeInfo(f[^2]); 16498var typeInfo = model.GetTypeInfo(m3); 18586var typeInfo = model.GetTypeInfo(f); 18912var typeInfo = model.GetTypeInfo(f); 19249var typeInfo = model.GetTypeInfo(collection);
Semantics\OutVarTests.cs (6)
1016var typeInfo = model.GetTypeInfo(decl); 18445var typeInfo = model.GetTypeInfo(initializer); 33025TypeInfo typeInfo = model.GetTypeInfo(declaration1.Type); 33097TypeInfo typeInfo = model.GetTypeInfo(declaration1.Type); 33139TypeInfo typeInfo = model.GetTypeInfo(declaration1.Type); 33203TypeInfo typeInfo = model.GetTypeInfo(declaration1.Type);
Semantics\ParamsCollectionTests.cs (8)
174var typeInfo = model.GetTypeInfo(argument); 230var typeInfo = model.GetTypeInfo(expression); 346var typeInfo = model.GetTypeInfo(expression); 529var typeInfo = model.GetTypeInfo(expression); 674var typeInfo = model.GetTypeInfo(expression); 1418var typeInfo = model.GetTypeInfo(expression); 2542var typeInfo = model.GetTypeInfo(expression); 2678var typeInfo = model.GetTypeInfo(expression);
Semantics\PatternMatchingTestBase.cs (2)
133TypeInfo typeInfo = model.GetTypeInfo(typeSyntax); 381TypeInfo typeInfo = model.GetTypeInfo(decl.Type);
Semantics\PatternMatchingTests.cs (3)
3448var typeInfo1 = model1.GetTypeInfo(declaration); 3458var typeInfo2 = model2.GetTypeInfo(o1); 11369var typeInfo = model.GetTypeInfo(expr);
Semantics\PatternMatchingTests_ListPatterns.cs (4)
3648var typeInfo = model.GetTypeInfo(designation); 3690var typeInfo = model.GetTypeInfo(clause.Parent); // inner {} pattern 3729var typeInfo = model.GetTypeInfo(itemDesignation); 4418var typeInfo = model.GetTypeInfo(designation);
Semantics\PatternMatchingTests2.cs (8)
730var typeInfo = model.GetTypeInfo(ident); 2027var typeInfo = speculativeModel.GetTypeInfo(modifiedReturnStatement.Expression); 2068var typeInfo = speculativeModel.GetTypeInfo(modifiedReturnStatement.Expression); 2162var typeInfo = model.GetTypeInfo(pat); 2255var ti = model.GetTypeInfo(patterns[0]); 2299var ti = model.GetTypeInfo(patterns[0]); 2345var ti = model.GetTypeInfo(patterns[0]); 2874var typeInfo = model.GetTypeInfo(expr);
Semantics\PatternMatchingTests5.cs (6)
1298var xyType = model.GetTypeInfo(xy); 1306var xType = model.GetTypeInfo(x); 1314var yNameType = model.GetTypeInfo(yName); 1325var yxType = model.GetTypeInfo(yx); 1333var yType = model.GetTypeInfo(y); 1341var xNameType = model.GetTypeInfo(xName);
Semantics\PatternSwitchTests.cs (2)
3256var type = model.GetTypeInfo(node); 3287var type = model.GetTypeInfo(node);
Semantics\PrimaryConstructorTests.cs (9)
1088Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 2121Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 2216Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(baseWithargs.ArgumentList.OpenParenToken.SpanStart, (SyntaxNode)speculativePrimaryInitializer, SpeculativeBindingOption.BindAsExpression)); 2217Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single().ArgumentList.OpenParenToken.SpanStart, 2252Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(baseWithargs.ArgumentList.OpenParenToken.SpanStart, (SyntaxNode)speculativePrimaryInitializer, SpeculativeBindingOption.BindAsExpression)); 2303Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 2355Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(baseWithargs.ArgumentList.OpenParenToken.SpanStart, (SyntaxNode)speculativePrimaryInitializer, SpeculativeBindingOption.BindAsExpression)); 2356Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single().ArgumentList.OpenParenToken.SpanStart, 2391Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(baseWithargs.ArgumentList.OpenParenToken.SpanStart, (SyntaxNode)speculativePrimaryInitializer, SpeculativeBindingOption.BindAsExpression));
Semantics\RecordTests.cs (10)
8604var typeInfo = model.GetTypeInfo(withExpr); 21160Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 22233Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 22328Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(baseWithargs.ArgumentList.OpenParenToken.SpanStart, (SyntaxNode)speculativePrimaryInitializer, SpeculativeBindingOption.BindAsExpression)); 22329Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single().ArgumentList.OpenParenToken.SpanStart, 22364Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(baseWithargs.ArgumentList.OpenParenToken.SpanStart, (SyntaxNode)speculativePrimaryInitializer, SpeculativeBindingOption.BindAsExpression)); 22415Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 22467Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(baseWithargs.ArgumentList.OpenParenToken.SpanStart, (SyntaxNode)speculativePrimaryInitializer, SpeculativeBindingOption.BindAsExpression)); 22468Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single().ArgumentList.OpenParenToken.SpanStart, 22503Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(baseWithargs.ArgumentList.OpenParenToken.SpanStart, (SyntaxNode)speculativePrimaryInitializer, SpeculativeBindingOption.BindAsExpression));
Microsoft.CodeAnalysis.CSharp.Features (22)
AddImport\CSharpAddImportFeatureService.cs (1)
618var semanticInfo = semanticModel.GetTypeInfo(leftExpression, cancellationToken);
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (2)
552var returnTypeInfo = _semanticModel.GetTypeInfo(_source, _cancellationToken); 666var lastSelectExpressionTypeInfo = _semanticModel.GetTypeInfo(lastSelectExpression, _cancellationToken);
ExtractMethod\CSharpMethodExtractor.Analyzer.cs (1)
41var info = model.GetSpeculativeTypeInfo(SelectionResult.FinalSpan.Start, SyntaxFactory.ParseName(symbol.Name), SpeculativeBindingOption.BindAsExpression);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
759var returnTypeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken);
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (2)
96var info = semanticModel.GetTypeInfo(expression); 131private static bool IsCoClassImplicitConversion(TypeInfo info, Conversion conversion, ISymbol? coclassSymbol)
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
76var info = semanticModel.GetTypeInfo(propertyDeclaration.ExplicitInterfaceSpecifier.Name, cancellationToken);
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
124var typeInfo = semanticModel.GetTypeInfo(node, cancellationToken);
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
126var lambdaTypeInfo = semanticModel.GetTypeInfo(anonymousFunction, cancellationToken);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
92var originalTypeInfo = semanticModel.GetTypeInfo(topMostExpression, cancellationToken); 160var replacedTypeInfo = speculationAnalyzer.SpeculativeSemanticModel.GetTypeInfo(speculationAnalyzer.ReplacedExpression, cancellationToken);
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\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
253var rightType = semanticModel.GetTypeInfo(assignmentExpression.Right);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
192var typeInfo = _semanticModel.GetTypeInfo(node, _cancellationToken);
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
160var typeInfo = document.SemanticModel.GetTypeInfo(implicitObjectCreation, cancellationToken);
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
66var semanticInfo = semanticModel.GetTypeInfo(methodDeclaration.ExplicitInterfaceSpecifier.Name, cancellationToken);
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (2)
120var info = Document.SemanticModel.GetTypeInfo(type, cancellationToken); 158var typeInfo = Document.SemanticModel.GetTypeInfo(typeArgument, cancellationToken);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
96var info = model.GetTypeInfo(expression);
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
140var asExpressionTypeInfo = semanticModel.GetTypeInfo(asExpression, cancellationToken);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (3)
IOperation\IOperationTests_IConversionExpression.cs (2)
176var typeInfo = compilation.GetSemanticModel(syntax.SyntaxTree).GetTypeInfo(initializerSyntax); 5381var typeInfo = semanticModel.GetTypeInfo(finalSyntax);
IOperation\IOperationTests_IFixedStatement.cs (1)
694var info = model.GetTypeInfo(expr);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (258)
Semantics\BindingTests.cs (1)
3940var typeInfo = model.GetTypeInfo(lambda.Body);
Semantics\DeconstructionTests.cs (20)
4260var typeInfo = model.GetTypeInfo(declarations[0]); 4395var typeInfo = model.GetTypeInfo(declarations[0]); 4519var typeInfo = model.GetTypeInfo(declarations[0]); 4669var typeInfo = model.GetTypeInfo(declarations[0]); 4763var typeInfo = model.GetTypeInfo(declarations[0]); 4841var typeInfo = model.GetTypeInfo(declarations[0]); 4945var typeInfo = model.GetTypeInfo(declaration); 4991var typeInfo = model.GetTypeInfo(declaration); 5049var typeInfo = model.GetTypeInfo(declaration); 5209var typeInfo = model.GetTypeInfo(declarations[0]); 5353var typeInfo = model.GetTypeInfo(declarations[0]); 5490var typeInfo = model.GetTypeInfo(declarations[0]); 5677var typeInfo = model.GetTypeInfo(declarations[0]); 5787var typeInfo = model.GetTypeInfo(declarations[0]); 5890var typeInfo = model.GetTypeInfo(declarations[0]); 5987var type = model.GetTypeInfo(mainCall); 6030var type = model.GetTypeInfo(mainCall); 6070var type = model.GetTypeInfo(mainCall); 6112var type = model.GetTypeInfo(two); 6152var type = model.GetTypeInfo(mainCall);
Semantics\DelegateTypeTests.cs (44)
750var typeInfo = model.GetTypeInfo(expr); 796var typeInfo = model.GetTypeInfo(expr); 896var typeInfo = model.GetTypeInfo(expr); 939var typeInfo = model.GetTypeInfo(expr); 997var typeInfo = model.GetTypeInfo(expr); 1037var typeInfo = model.GetTypeInfo(expr); 1212var typeInfo = model.GetTypeInfo(expr); 1248var typeInfo = model.GetTypeInfo(expr); 1333var typeInfo = model.GetTypeInfo(expr); 1373var typeInfo = model.GetTypeInfo(expr); 1416var typeInfo = model.GetTypeInfo(expr); 1460var typeInfo = model.GetTypeInfo(expr); 1555var typeInfo = model.GetTypeInfo(expr); 1635var typeInfo = model.GetTypeInfo(expr); 1685var typeInfo = model.GetTypeInfo(expr); 1735var typeInfo = model.GetTypeInfo(expr); 1785var typeInfo = model.GetTypeInfo(expr); 1835var typeInfo = model.GetTypeInfo(expr); 1885var typeInfo = model.GetTypeInfo(expr); 1935var typeInfo = model.GetTypeInfo(expr); 1981var typeInfo = model.GetTypeInfo(expr); 2029var typeInfo = model.GetTypeInfo(expr); 2083var typeInfo = model.GetTypeInfo(memberAccess); 2148var typeInfo = model.GetTypeInfo(memberAccess); 2210var typeInfo = model.GetTypeInfo(memberAccess); 2269var typeInfo = model.GetTypeInfo(memberAccess); 2318var typeInfo = model.GetTypeInfo(memberAccess); 2357var typeInfo = model.GetTypeInfo(memberAccess); 2400var typeInfo = model.GetTypeInfo(memberAccess); 2452var typeInfo = model.GetTypeInfo(memberAccess); 2493var typeInfo = model.GetTypeInfo(memberAccess); 2541var typeInfo = model.GetTypeInfo(memberAccess); 2593var typeInfo = model.GetTypeInfo(memberAccess); 2639var typeInfo = model.GetTypeInfo(memberAccess); 2687var typeInfo = model.GetTypeInfo(memberAccess); 2734var typeInfo = model.GetTypeInfo(memberAccess); 3563var typeInfo1 = model.GetTypeInfo(f1); 3570var typeInfo2 = model.GetTypeInfo(f2); 3608var typeInfo = model.GetTypeInfo(expr); 8029var typeInfo = model.GetTypeInfo(expr); 8052var typeInfo = model.GetTypeInfo(expr); 10398var typeInfo = model.GetTypeInfo(variable.Initializer!.Value); 19764var typeInfo = model.GetTypeInfo(declarator.Initializer!.Value); 19806var typeInfo = model.GetTypeInfo(declarator.Initializer!.Value);
Semantics\DynamicTests.cs (81)
4981var typeInfo = model.GetTypeInfo(node); 5105var typeInfo = model.GetTypeInfo(node); 5228var typeInfo = model.GetTypeInfo(node); 5350var typeInfo = model.GetTypeInfo(call); 5391var typeInfo = model.GetTypeInfo(call); 5435var typeInfo = model.GetTypeInfo(call); 5479var typeInfo = model.GetTypeInfo(call); 5523var typeInfo = model.GetTypeInfo(call); 5700var typeInfo = model.GetTypeInfo(call); 5741var typeInfo = model.GetTypeInfo(call); 5786var typeInfo = model.GetTypeInfo(call); 5831var typeInfo = model.GetTypeInfo(call); 5876var typeInfo = model.GetTypeInfo(call); 6027var typeInfo = model.GetTypeInfo(node); 6150var typeInfo = model.GetTypeInfo(node); 6270var typeInfo = model.GetTypeInfo(node); 6385var typeInfo = model.GetTypeInfo(elementAccess); 6427var typeInfo = model.GetTypeInfo(elementAccess); 6474var typeInfo = model.GetTypeInfo(elementAccess); 6518var typeInfo = model.GetTypeInfo(elementAccess); 6557TypeInfo typeInfo; 6611TypeInfo typeInfo; 6676var typeInfo = model.GetTypeInfo(node); 6785var typeInfo = model.GetTypeInfo(node); 6895var typeInfo = model.GetTypeInfo(node); 6999var typeInfo = model.GetTypeInfo(elementAccess); 7064var typeInfo = model.GetTypeInfo(node); 7167var typeInfo = model.GetTypeInfo(node); 7280var typeInfo = model.GetTypeInfo(node); 7396var typeInfo = model.GetTypeInfo(node); 7509var typeInfo = model.GetTypeInfo(node); 7586var typeInfo = model.GetTypeInfo(node); 7691var typeInfo = model.GetTypeInfo(node); 7797var typeInfo = model.GetTypeInfo(node); 7900var typeInfo = model.GetTypeInfo(node); 7972var typeInfo = model.GetTypeInfo(node); 8078var typeInfo = model.GetTypeInfo(node); 8183var typeInfo = model.GetTypeInfo(node); 8288var typeInfo = model.GetTypeInfo(node); 8397var typeInfo = model.GetTypeInfo(node); 8506var typeInfo = model.GetTypeInfo(node); 8616var typeInfo = model.GetTypeInfo(node); 8732var typeInfo = model.GetTypeInfo(elementAccess); 8801var typeInfo = model.GetTypeInfo(elementAccess); 8866var typeInfo = model.GetTypeInfo(node); 8929var typeInfo = model.GetTypeInfo(elementAccess); 9019var typeInfo = model.GetTypeInfo(elementAccess); 9110var typeInfo = model.GetTypeInfo(elementAccess); 9200var typeInfo = model.GetTypeInfo(elementAccess); 9256var typeInfo = model.GetTypeInfo(elementAccess); 9317var typeInfo = model.GetTypeInfo(elementAccess); 9438var typeInfo = model.GetTypeInfo(elementAccess); 9558var typeInfo = model.GetTypeInfo(elementAccess); 9672var typeInfo = model.GetTypeInfo(elementAccess); 9783var typeInfo = model.GetTypeInfo(elementAccess); 9894var typeInfo = model.GetTypeInfo(elementAccess); 10018var typeInfo = model.GetTypeInfo(node); 10033var tupleTypeInfo = model.GetTypeInfo(left); 10146var typeInfo = model.GetTypeInfo(node); 10161var tupleTypeInfo = model.GetTypeInfo(left); 10274var typeInfo = model.GetTypeInfo(node); 10289var tupleTypeInfo = model.GetTypeInfo(left); 10428var typeInfo = model.GetTypeInfo(node); 10443var tupleTypeInfo = model.GetTypeInfo(left); 10562var typeInfo = model.GetTypeInfo(node); 10577var tupleTypeInfo = model.GetTypeInfo(left); 10710var typeInfo = model.GetTypeInfo(node); 10725var tupleTypeInfo = model.GetTypeInfo(left); 10980var typeInfo = model.GetTypeInfo(node); 10995var tupleTypeInfo = model.GetTypeInfo(left); 11108var typeInfo = model.GetTypeInfo(elementAccess); 11192var typeInfo = model.GetTypeInfo(elementAccess); 11270var typeInfo = model.GetTypeInfo(elementAccess); 11322var typeInfo = model.GetTypeInfo(node); 11375var typeInfo = model.GetTypeInfo(node); 11459var typeInfo = model.GetTypeInfo(call); 11503var typeInfo = model.GetTypeInfo(call); 11544var typeInfo = model.GetTypeInfo(call); 11589var typeInfo = model.GetTypeInfo(node); 11641var typeInfo = model.GetTypeInfo(node); 11688var typeInfo = model.GetTypeInfo(elementAccess);
Semantics\ExpressionBodiedMemberTests.cs (2)
428var typeInfo1 = model.GetTypeInfo(node); 429var typeInfo2 = model.GetTypeInfo(node);
Semantics\ForEachTests.cs (1)
2143var typeInfo = model.GetTypeInfo(loopSyntax.Type);
Semantics\FunctionPointerTests.cs (10)
210var typeInfo = model.GetTypeInfo(initializer1); 296var typeInfo = model.GetTypeInfo(literal); 354var typeInfoOuter = model.GetTypeInfo(conversions[0]); 405var typeInfoOuter = model.GetTypeInfo(conversions[0]); 457var typeInfoOuter = model.GetTypeInfo(conversions[0]); 507var typeInfoOuter = model.GetTypeInfo(conv); 608var typeInfo = model.GetTypeInfo(decl); 849var typeInfo = model.GetTypeInfo(decl); 906var typeInfo = model.GetTypeInfo(initializer); 2094var typeInfo = model.GetTypeInfo(localSyntax.Initializer!.Value);
Semantics\ImplicitlyTypeArraysTests.cs (2)
71var info = model.GetTypeInfo(expr); 99var typeInfo = model.GetTypeInfo(expr);
Semantics\ImplicitObjectCreationTests.cs (2)
4161var typeInfo = model.GetSpeculativeTypeInfo(nodeLocation, newExpression, SpeculativeBindingOption.BindAsExpression); 4197var typeInfo = speculativeModel.GetTypeInfo(newExpression);
Semantics\InitOnlyMemberTests.cs (1)
3163var typeSpeculation =
Semantics\IteratorTests.cs (3)
464var typeInfo = model.GetTypeInfo(yieldNode.Expression); 614var typeInfo = model.GetTypeInfo(node); 652var typeInfo = model.GetTypeInfo(node);
Semantics\LambdaTests.cs (18)
844var tinfo = model.GetTypeInfo(expr); 1039var typeInfo = model.GetTypeInfo(xReference); 1093var typeInfo = model.GetTypeInfo(oReference); 2123var typeInfo = sm.GetTypeInfo(eReference); 2169var typeInfo = sm.GetTypeInfo(eReference); 2215var typeInfo = sm.GetTypeInfo(eReference); 2261var typeInfo = sm.GetTypeInfo(eReference); 2307var typeInfo = sm.GetTypeInfo(eReference); 2337var typeInfo = sm.GetTypeInfo(eReference); 2364var typeInfo = sm.GetTypeInfo(eReference); 2419var typeInfo = sm.GetTypeInfo(reference); 2465var typeInfo = sm.GetTypeInfo(reference); 2511var typeInfo = sm.GetTypeInfo(reference); 2544var typeInfo = sm.GetTypeInfo(reference); 2577var typeInfo = sm.GetTypeInfo(reference); 2614var typeInfo = sm.GetTypeInfo(reference); 3948var typeInfo = model.GetTypeInfo(attributeSyntax); 5646var typeInfo = model.GetTypeInfo(returnTypeSyntax);
Semantics\LocalFunctionTests.cs (3)
1778var aTypeInfo = model.GetTypeInfo(a); 1853var aTypeInfo = model.GetTypeInfo(a); 7651var typeInfo = model.GetTypeInfo(tParameterUsage);
Semantics\LockTests.cs (1)
710var typeInfo = model.GetTypeInfo(lockStatements[index - 1].Expression);
Semantics\LookupTests.cs (1)
687var baseExprInfo = model.GetTypeInfo((ExpressionSyntax)baseExprNode);
Semantics\NamedAndOptionalTests.cs (1)
813var typeInfo = nodeAndModel.Item2.GetTypeInfo(nodeAndModel.Item1);
Semantics\NativeIntegerTests.cs (1)
9496var typeInfo = model.GetTypeInfo(expr);
Semantics\NullableContextTests.cs (11)
352var typeInfo = model.GetTypeInfo(syntax.Expression); 391var typeInfo = model.GetTypeInfo(syntax.Expression); 426var typeInfo = model.GetTypeInfo(syntax); 1775var typeInfo = model.GetTypeInfo(syntax.Expression); 1843var typeInfo = model.GetTypeInfo(syntax); 1889var typeInfo = model.GetTypeInfo(syntax.Expression); 1944var typeInfo = model.GetTypeInfo(syntax.Expression); 1981var typeInfo = model.GetTypeInfo(value); 2021var typeInfo = model.GetTypeInfo(syntax.Initializer.Value); 2060var typeInfo = model.GetTypeInfo(syntax.Initializer.Value); 2231var typeInfo = model.GetTypeInfo(type);
Semantics\NullableReferenceTypesTests.cs (4)
62845var typeInfo = model.GetTypeInfo(declarator.Expression); 146471var typeInfo = speculativeModel.GetTypeInfo(assignment); 161252var typeInfo = model.GetTypeInfo(identifier); 161298var typeInfo = model.GetTypeInfo(identifier);
Semantics\NullCoalesceAssignmentTests.cs (5)
46var typeInfo = semanticModel.GetTypeInfo(syntax); 81var whenNullTypeInfo = semanticModel.GetTypeInfo(coalesceAssignment.Right); 88var typeInfo = semanticModel.GetTypeInfo(syntax); 121var whenNullTypeInfo = semanticModel.GetTypeInfo(coalesceAssignment); 131var typeInfo = semanticModel.GetTypeInfo(syntax);
Semantics\ObjectAndCollectionInitializerTests.cs (7)
3820var typeInfo = model.GetTypeInfo(literal); 3843var typeInfo = model.GetTypeInfo(literal); 3867var typeInfo = model.GetTypeInfo(literal); 4098var typeInfo = semanticModel.GetTypeInfo(node); 4170var typeInfo = semanticModel.GetTypeInfo(node); 4230var typeInfo = model.GetTypeInfo(elementAccess); 4284var typeInfo = model.GetTypeInfo(propertyAccess);
Semantics\OperatorTests.cs (2)
7059var info = model.GetTypeInfo(syntax); 7214var info = model.GetTypeInfo(syntax);
Semantics\QueryTests.cs (5)
2300var info = semanticModel.GetSpeculativeTypeInfo(selectExpression.SpanStart, SyntaxFactory.ParseExpression("x"), SpeculativeBindingOption.BindAsExpression); 3140var typeInfo = model.GetTypeInfo(selectNode); 3381var typeInfo2 = model.GetTypeInfo(assem2); 3390var typeInfo1 = model.GetTypeInfo(assem1); 3483var selectClauseTypeInfo = speculativeModel.GetTypeInfo(q.Body.SelectOrGroup);
Semantics\RecordStructTests.cs (2)
6926var type = model.GetTypeInfo(with); 7607var type = model.GetTypeInfo(with);
Semantics\SuppressAccessibilityChecksTests.cs (2)
94var creationExpression = 238var typeSpeculation =
Semantics\TargetTypedConditionalOperatorTests.cs (2)
669var typeInfo = model.GetTypeInfo(expr); 690var typeInfo = model.GetTypeInfo(expr);
Semantics\TargetTypedDefaultTests.cs (2)
2485var typeInfo = model.GetSpeculativeTypeInfo(digit.SpanStart, expressionSyntax, SpeculativeBindingOption.BindAsExpression); 3525var conversionTypeInfo = model.GetTypeInfo(conversionSyntax);
Semantics\TopLevelStatementsTests.cs (2)
253var typeInfo = model1.GetTypeInfo(tree1.GetRoot()); 404var typeInfo = model1.GetTypeInfo(tree1.GetRoot());
Semantics\TypeOfTests.cs (1)
38var typeInfo = model.GetTypeInfo(node);
Semantics\UnsafeTests.cs (7)
7265var typeInfo = model.GetTypeInfo(syntax); 7332var typeInfo = model.GetTypeInfo(syntax); 7370var typeInfo = model.GetTypeInfo(syntax); 7412var typeInfo = model.GetTypeInfo(syntax); 7543var typeInfo = model.GetTypeInfo(syntax); 8348var typeInfo = model.GetTypeInfo(node); 8384var typeInfo = model.GetTypeInfo(value);
Semantics\Utf8StringsLiteralsTests.cs (13)
2975var typeInfo = model.GetTypeInfo(node); 3003var typeInfo = model.GetTypeInfo(node); 3031var typeInfo = model.GetTypeInfo(node); 3059var typeInfo = model.GetTypeInfo(node); 3087var typeInfo = model.GetTypeInfo(node); 3115var typeInfo = model.GetTypeInfo(node); 3143var typeInfo = model.GetTypeInfo(node); 3171var typeInfo = model.GetTypeInfo(node); 3199var typeInfo = model.GetTypeInfo(node); 3227var typeInfo = model.GetTypeInfo(node); 3255var typeInfo = model.GetTypeInfo(node); 3283var typeInfo = model.GetTypeInfo(node); 3311var typeInfo = model.GetTypeInfo(node);
SourceGeneration\SyntaxAwareGeneratorTests.cs (1)
795var typeInfo = ctx.SemanticModel.GetTypeInfo(cds.BaseList!.Types[0].Type);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (124)
Compilation\GetSemanticInfoBrokenCodeTests.cs (2)
247var info = model.GetTypeInfo(typeOfSyntax); //Used to throw 270var info = model.GetTypeInfo(literalSyntax); //Used to throw
Compilation\GetSemanticInfoTests.cs (34)
77var info = model.GetTypeInfo(expr); 107var info = model.GetTypeInfo(expr); 141var info = model.GetTypeInfo(expr); 192var info = model.GetTypeInfo(expr); 600var info = model.GetTypeInfo(expr1); 631var info = model.GetTypeInfo(expr1); 647var info = model.GetTypeInfo(syntax); 844var info = semanticModel.GetTypeInfo(expr); 871var info = semanticModel.GetTypeInfo(expr); 2398var typeInfo = model.GetTypeInfo(expr); 2455var info = model.GetTypeInfo(expr); 2484var info = model.GetTypeInfo(expr); 2510var info = model.GetTypeInfo(expr); 2731var typeInfo = model.GetTypeInfo(expr); 2802var typeInfo = model.GetTypeInfo(expr); 3473var argTypeInfo = model.GetTypeInfo(argexpr); 3527var argTypeInfo = model.GetTypeInfo(argexpr); 3586var argTypeInfo = model.GetTypeInfo(expr.ArgumentList.Arguments.First().Expression); 3609var literalTypeInfo = model.GetTypeInfo(literal); 3634var literalTypeInfo = model.GetTypeInfo(literal); 3642var castTypeInfo = model.GetTypeInfo(cast); 3667var literalTypeInfo = model.GetTypeInfo(literal); 3675var castTypeInfo = model.GetTypeInfo(cast); 3703var literalTypeInfo = model.GetTypeInfo(literal); 3711var cast1TypeInfo = model.GetTypeInfo(cast1); 3723var cast2TypeInfo = model.GetTypeInfo(cast2); 4244var info = model.GetSpeculativeTypeInfo(syntax.SpanStart, syntax, SpeculativeBindingOption.BindAsTypeOrNamespace); 4245Assert.Equal(TypeInfo.None, info); 4274var info = model.GetSpeculativeTypeInfo(syntax.SpanStart, syntax, SpeculativeBindingOption.BindAsTypeOrNamespace); 4328var typeInfo = model.GetSpeculativeTypeInfo(0, initializerSyntax, SpeculativeBindingOption.BindAsExpression); 4329Assert.Equal(TypeInfo.None, typeInfo); 4378var info = model.GetTypeInfo(syntax); 5525var typeInfo = model.GetTypeInfo(lambdaSyntax); 5541var typeInfo = model.GetTypeInfo(lambdaSyntax);
Compilation\IndexedProperties_BindingTests.cs (1)
146var typeInfo = model.GetTypeInfo(expr);
Compilation\SemanticModelAPITests.cs (33)
54var typeInfo = speculativeModel.GetTypeInfo(indexerAccess); 141var typeInfo = model.GetTypeInfo(indexerAccess); 928var type1 = model.GetTypeInfo(exprs[0]); 929var type2 = model.GetTypeInfo(exprs[1]); 1432var typeInfo = speculativeModel.GetTypeInfo(expr); 1470var typeInfo = speculativeModel.GetTypeInfo(expr); 1506var ti = model.GetTypeInfo(paramDefaultArg); 1518var typeInfo = speculativeModel.GetTypeInfo(expr); 1566var typeInfo = speculativeModel.GetTypeInfo(binaryExpr); 1594var ti = model.GetTypeInfo(paramDefaultArg); 1606var typeInfo = speculativeModel.GetTypeInfo(expr); 1691var typeInfo = speculativeModel.GetTypeInfo(expr); 1793var typeInfo = speculativeModel.GetTypeInfo(localDecl.Declaration.Type); 2042var typeInfo = speculativeModel.GetTypeInfo(expr); 2275var typeInfo = speculativeModel.GetTypeInfo(initializer); 2399var typeInfo = speculativeModel.GetTypeInfo(localDecl.Declaration.Type); 3165var info = speculativeModel.GetTypeInfo(yieldStatement.Expression); 3200var info = speculativeModel.GetTypeInfo(yieldStatement.Expression); 3757var identifierInfo = model.GetTypeInfo(identifier); 3786var typeInfo = model.GetTypeInfo(localFunctionBody.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!); 3913var typeInfo0 = model.GetTypeInfo(init0); 3922var typeInfo1 = model.GetTypeInfo(init1); 3929var typeInfo2 = model.GetTypeInfo(init2); 4330var dynamicType = model.GetSpeculativeTypeInfo(spanStart, typeSyntax, SpeculativeBindingOption.BindAsTypeOrNamespace); 4432var originalTypeInfo = model.GetTypeInfo(ifStatement.Condition); 4435var speculativeTypeInfo = specModel.GetTypeInfo(replacementIfStatement.Condition); 4480var varTypeInfo = model.GetTypeInfo(varNode); 4481var declarationExpressionTypeInfo = model.GetTypeInfo(declarationExpression); 4491static void assertTypeInfo(TypeInfo typeInfo) 4544var varTypeInfo = model.GetTypeInfo(varNode); 4545var declarationExpressionTypeInfo = model.GetTypeInfo(declarationExpression); 4555static void assertTypeInfoForVar(TypeInfo typeInfo) 4569static void assertTypeInfoForDeclarationExpression(TypeInfo typeInfo)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
1033var type = model.GetTypeInfo(usingDirective.Name); 5662var type = model.GetTypeInfo(valueSyntax);
Compilation\SemanticModelGetSemanticInfoTests.cs (8)
14486var typeInfo = model.GetTypeInfo(node); // Ensure that this doesn't throw. 14740var info1 = model.GetTypeInfo(syntaxToBind); 14805TypeInfo typeInfo = model.GetTypeInfo(creation.Type); 14901TypeInfo typeInfo = model.GetTypeInfo(creation.Type); 15012TypeInfo typeInfo = model.GetTypeInfo(creation.Type); 15061var typeInfo1 = model.GetTypeInfo(expr); 15062var typeInfo2 = model.GetTypeInfo(expr); 15063var typeComparer = (IEquatable<TypeInfo>)typeInfo1;
Compilation\TypeInfoTests.cs (2)
25EqualityTesting.AssertEqual(default(TypeInfo), default(TypeInfo));
Symbols\AnonymousTypesSymbolTests.cs (2)
1479var info1 = model.GetSpeculativeTypeInfo(position, expr1, SpeculativeBindingOption.BindAsExpression); 1648var info = model.GetTypeInfo(expr);
Symbols\CovariantReturnTests.cs (2)
385var typeInfo = model.GetTypeInfo(right); 2628var typeInfo = model.GetTypeInfo(initialValue);
Symbols\FunctionPointerTypeSymbolTests.cs (3)
1266var typeInfo = model.GetTypeInfo(functionPointerTypeSyntax); 1270var nestedTypeInfo = model.GetTypeInfo(functionPointerTypeSyntax.ParameterList.Parameters.Single().Type!); 1742var typeInfo = model.GetTypeInfo(invocationExpressionSyntax);
Symbols\Source\BaseClassTests.cs (1)
2032var typeInfo = model.GetTypeInfo(baseY);
Symbols\Source\EventTests.cs (2)
438var lambdaTypeInfo = model.GetTypeInfo(lambdaSyntax); 484var lambdaTypeInfo = model.GetTypeInfo(lambdaSyntax);
Symbols\Source\FileModifierTests.cs (7)
1234var info = model.GetTypeInfo(cReference); 1368var info = model.GetTypeInfo(cReference); 1434var info = model.GetTypeInfo(cReference); 1492var info = model.GetTypeInfo(cReference); 1806var info = model.GetTypeInfo(cReference); 1881var info = model.GetTypeInfo(cReference); 4125var typeInfo = model.GetTypeInfo(voidTypeSyntax);
Symbols\Source\NullablePublicAPITests.cs (24)
1403var referenceTypeInfo = speculativeModel.GetSpeculativeTypeInfo(whenTrue.SpanStart, newReference, SpeculativeBindingOption.BindAsExpression); 1405var coalesceTypeInfo = speculativeModel.GetSpeculativeTypeInfo(whenTrue.SpanStart, newCoalesce, SpeculativeBindingOption.BindAsExpression); 1531var specTypeInfo = model.GetSpeculativeTypeInfo(position, newReference, SpeculativeBindingOption.BindAsExpression); 1587var specTypeInfo = model.GetSpeculativeTypeInfo(position, newReference, SpeculativeBindingOption.BindAsExpression); 1629var type = model.GetTypeInfo(varDecl.Type); 1672var type = model.GetTypeInfo(varDecl.Type); 1715var type = model.GetTypeInfo(varDecl.Type); 1793var info = model.GetTypeInfo(node.Expression); 2919var typeInfo = model.GetTypeInfo(memberAccess[0].Expression); 3698var typeInfo = model.GetTypeInfo(localFunctionBody.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!); 3733var typeInfo = model.GetTypeInfo(localFunctionBody.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!); 4247var symbolInfo = model.GetTypeInfo(type); 4820var info = model.GetTypeInfo(receiver); 4849var info = model.GetTypeInfo(node.Expression); 4915var typeInfo = speculativeModel.GetTypeInfo(newAccess.Expression); 5198var typeInfo = model.GetTypeInfo(xUsage); 5233var typeInfo = model.GetTypeInfo(xUsage); 5256var typeInfo = model.GetTypeInfo(collectionExpr); 5279var typeInfo = model.GetTypeInfo(collectionExpr); 5311var typeInfo = model.GetTypeInfo(collectionExpr); 5334var typeInfo = model.GetTypeInfo(collectionExpr); 5356var typeInfo = model.GetTypeInfo(collectionExpr); 5404var typeInfo = model.GetTypeInfo(collectionExpr); 5461var typeInfo = model.GetTypeInfo(collectionExpr);
Symbols\TypeTests.cs (1)
1773var tinfo = model.GetTypeInfo(nodes[0] as IdentifierNameSyntax);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (9)
CompilationTestUtils.cs (9)
237var typeInfo = semanticModel.GetTypeInfo(expr); 248var typeInfo = semanticModel.GetTypeInfo(attribute); 265var typeInfo = semanticModel.GetTypeInfo(initializer); 274var typeInfo = semanticModel.GetTypeInfo(pattern); 311var typeInfo = semanticModel.GetSpeculativeTypeInfo(position, expr, bindingOption); 353internal static TypeInfo GetTypeInfoAndVerifyIOperation(this SemanticModel model, SyntaxNode expression) 355var typeInfo = model.GetTypeInfo(expression); 419static void assertTypeInfoNull(IOperation iop, TypeInfo typeInfo) 473var typeInfo = model.GetTypeInfoAndVerifyIOperation(annotation.Expression);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
CodeGen\WinMdEventTests.cs (1)
672var type = model.GetTypeInfo(syntax);
Microsoft.CodeAnalysis.CSharp.Workspaces (27)
Simplification\CSharpSimplificationService.Expander.cs (1)
800var typeinfo = semanticModel.GetTypeInfo(argument.Expression);
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
293var typeInfo = semanticModel.GetSpeculativeTypeInfo(node.SpanStart, aliasIdentifier, SpeculativeBindingOption.BindAsExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
386var expressionTypes = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
113var typeInfo = semanticModel.GetTypeInfo(qualifier, cancellationToken); 416var info = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
796var typeInfo = semanticModel.GetTypeInfo(current, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (5)
821var originalCastExpressionTypeInfo = originalSemanticModel.GetTypeInfo(castExpression, cancellationToken); 822var originalConditionalTypeInfo = originalSemanticModel.GetTypeInfo(originalConditionalExpression, cancellationToken); 823var rewrittenConditionalTypeInfo = rewrittenSemanticModel.GetTypeInfo(rewrittenConditionalExpression, cancellationToken); 860private static bool IsNullOrErrorType(TypeInfo info) 1050var typeInfo = semanticModel.GetTypeInfo(arrayInitializer, cancellationToken);
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
156var initializerTypeInfo = semanticModel.GetTypeInfo(initializer, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
693var typeInfo = semanticModel.GetTypeInfo(memberAccessExpression.Expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (2)
28var typeInfo = semanticModel.GetTypeInfo(decl.Type, cancellationToken); 35var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
62var rightType = semanticModel.GetTypeInfo(right, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableExtensions.cs (2)
9public static ITypeSymbol? GetConvertedTypeWithAnnotatedNullability(this TypeInfo typeInfo) 12public static ITypeSymbol? GetTypeWithAnnotatedNullability(this TypeInfo typeInfo)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (1)
82var typeInfo = semanticModel.GetTypeInfo(syntax);
Microsoft.CodeAnalysis.Features (27)
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);
EmbeddedLanguages\AbstractLanguageDetector.cs (1)
126var exprType = semanticModel.GetTypeInfo(expr, cancellationToken);
GenerateType\AbstractGenerateTypeService.State.cs (1)
162var typeInfo = semanticModel.GetTypeInfo(ObjectCreationExpressionOpt, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.AbstractIntroduceVariableCodeAction.cs (1)
112var typeInfo = semanticModel.GetTypeInfo(_expression, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.cs (1)
410var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
224var typeInfo = document.SemanticModel.GetTypeInfo(expression, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.State_ConstructorInitializer.cs (1)
37var info = Document.SemanticModel.GetTypeInfo(Expression, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.State_Field.cs (1)
44var info = Document.SemanticModel.GetTypeInfo(Expression, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.State_Query.cs (1)
31var info = Document.SemanticModel.GetTypeInfo(Expression, cancellationToken);
QuickInfo\CommonSemanticQuickInfoProvider.cs (1)
227var typeInfo = semanticModel.GetTypeInfo(token.Parent!, cancellationToken);
Snippets\InlineExpressionInfo.cs (3)
10internal sealed class InlineExpressionInfo(SyntaxNode node, TypeInfo typeInfo) 16/// If you need type information about this node use <see cref="TypeInfo" /> property 23public TypeInfo TypeInfo { get; } = typeInfo;
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (2)
123var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken); 156var typeInfo = semanticModel.GetSpeculativeTypeInfo(expression.SpanStart, expression, SpeculativeBindingOption.BindAsExpression);
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
150var typeInfo = semanticModel.GetTypeInfo(node, cancellationToken);
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
113var type = semanticModel.GetTypeInfo(conditionExpression, cancellationToken);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
168var typeInfo = semanticModel.GetTypeInfo(left, cancellationToken);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
143var objectType = context.SemanticModel.GetTypeInfo(objectCreationExpression, cancellationToken);
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (3)
478var argumentTypeInfo = semanticModel.GetTypeInfo(expressionOfArgument); 518Compilation compilation, TypeInfo argumentTypeInfo, IParameterSymbol parameter, 535Compilation compilation, TypeInfo argumentTypeInfo, ITypeSymbol parameterType,
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (3)
126var typeInfo = semanticModel.GetTypeInfo(beforeArrowExpression, cancellationToken); 144var attributeType = semanticModel.GetTypeInfo(attributeName, cancellationToken); 186var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
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 3164Protected NotOverridable Overrides Function GetSpeculativeTypeInfoCore(position As Integer, expression As SyntaxNode, bindingOption As SpeculativeBindingOption) As TypeInfo 3186Protected 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\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.Emit.UnitTests (3)
CodeGen\CodeGenTuples.vb (3)
11777Dim typeInfo As TypeInfo = model.GetTypeInfo(node) 11896Dim typeInfo As TypeInfo = model.GetTypeInfo(node) 11926Dim typeInfo As TypeInfo = model.GetTypeInfo(node)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
ExtractMethod\VisualBasicSelectionResult.vb (2)
187Dim info As TypeInfo 231Private Shared Function IsCoClassImplicitConversion(info As TypeInfo, conversion As Conversion, coclassSymbol As ISymbol) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (122)
Binding\MethodBodyBindingTests.vb (2)
522Dim typeInfo As TypeInfo = model.GetTypeInfo(node1) 716Dim typeInfo As TypeInfo = model.GetTypeInfo(node1)
Semantics\CompoundAssignment.vb (5)
298Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 311Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node2) 1025Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1039Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1053Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1)
Semantics\ConditionalAccessTests.vb (3)
640Dim typeInfo As TypeInfo 1317Dim typeInfo As TypeInfo 1486Dim typeInfo As TypeInfo
Semantics\Conversions_AnonymousDelegates.vb (27)
49Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 140Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 197Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 282Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 363Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 387Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 431Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 512Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 542Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 949Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1035Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1088Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1190Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1238Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1317Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1348Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1400Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1505Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1591Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1638Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1716Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1739Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1787Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1835Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1890Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 1987Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1) 2018Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(node1)
Semantics\GetExtendedSemanticInfoTests.vb (7)
8371Assert.Equal(TypeInfo.None, info) 9055Dim typeInfo As TypeInfo = model.GetTypeInfo(creation.Type) 9119Dim typeInfo As TypeInfo = model.GetTypeInfo(creation.Type) 9183Dim typeInfo As TypeInfo = model.GetTypeInfo(creation.Type) 9248Dim typeInfo As TypeInfo = model.GetTypeInfo(creation.Type) 9309Dim typeInfo As TypeInfo = model.GetTypeInfo(creation.Type) 10182Dim typeComparer = DirectCast(typeInfo1, IEquatable(Of TypeInfo))
Semantics\GetSemanticInfoTests.vb (3)
5356Dim typeInfo As TypeInfo = model.GetTypeInfo(creation.Type) 5445Dim typeInfo As TypeInfo = model.GetTypeInfo(creation.Type) 5550Dim typeInfo As TypeInfo = model.GetTypeInfo(creation.Type)
Semantics\Lambda_AnonymousDelegateInference.vb (3)
441Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 453Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node2.Parent, LambdaExpressionSyntax)) 465Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node3.Parent, LambdaExpressionSyntax))
Semantics\Lambda_Relaxation.vb (31)
42Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 158Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 256Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 354Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 449Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 855Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 930Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 975Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1030Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1185Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1247Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1298Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1310Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node2.Parent, LambdaExpressionSyntax)) 1411Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1423Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node2.Parent, LambdaExpressionSyntax)) 1456Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1468Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node2.Parent, LambdaExpressionSyntax)) 1522Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1621Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1698Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1752Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1764Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node2.Parent, LambdaExpressionSyntax)) 1912Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 1924Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node2.Parent, LambdaExpressionSyntax)) 1936Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node3.Parent, LambdaExpressionSyntax)) 1948Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node4.Parent, LambdaExpressionSyntax)) 2004Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 2057Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 2149Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 2177Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax)) 2232Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax))
Semantics\NameOfTests.vb (39)
53Dim typeInfo As TypeInfo 452Dim typeInfo As TypeInfo 524Dim typeInfo As TypeInfo 608Dim typeInfo As TypeInfo 660Dim typeInfo As TypeInfo 710Dim typeInfo As TypeInfo 763Dim typeInfo As TypeInfo 813Dim typeInfo As TypeInfo 863Dim typeInfo As TypeInfo 940Dim typeInfo As TypeInfo 1053Dim typeInfo As TypeInfo 1121Dim typeInfo As TypeInfo 1186Dim typeInfo As TypeInfo 1268Dim typeInfo As TypeInfo 1350Dim typeInfo As TypeInfo 1431Dim typeInfo As TypeInfo 1511Dim typeInfo As TypeInfo 1642Dim typeInfo As TypeInfo 1735Dim typeInfo As TypeInfo 1792Dim typeInfo As TypeInfo 1849Dim typeInfo As TypeInfo 1906Dim typeInfo As TypeInfo 2048Dim typeInfo As TypeInfo 2147Dim typeInfo As TypeInfo 2248Dim typeInfo As TypeInfo 2354Dim typeInfo As TypeInfo 2458Dim typeInfo As TypeInfo 2791Dim typeInfo As TypeInfo 2866Dim typeInfo As TypeInfo 2931Dim typeInfo As TypeInfo 2994Dim typeInfo As TypeInfo 3055Dim typeInfo As TypeInfo 3116Dim typeInfo As TypeInfo 3176Dim typeInfo As TypeInfo 3239Dim typeInfo As TypeInfo 3300Dim typeInfo As TypeInfo 3357Dim typeInfo As TypeInfo 3416Dim typeInfo As TypeInfo 3472Dim typeInfo As TypeInfo
Semantics\Parenthesized.vb (1)
245Dim typeInfo As TypeInfo = semanticModel.GetTypeInfo(DirectCast(node1.Parent, LambdaExpressionSyntax))
Semantics\QueryExpressions_SemanticModel.vb (1)
3890Assert.Equal(TypeInfo.None, info)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
SymbolsTests\Source\GroupClassTests.vb (3)
3272Dim typeInfo As TypeInfo 3353Dim typeInfo As TypeInfo 3759Dim typeInfo As TypeInfo
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\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 (14)
FindSymbols\FindReferences\Finders\AbstractTypeParameterSymbolReferenceFinder.cs (1)
62var typeInfo = state.SemanticModel.GetTypeInfo(token.Parent.Parent, cancellationToken);
Shared\Extensions\SemanticModelExtensions.cs (1)
109var typeInfo = bindableParent != null ? semanticModel.GetTypeInfo(bindableParent, cancellationToken) : default;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
236var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (8)
241TypeInfo originalTypeInfo, 242TypeInfo newTypeInfo) 265var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 266var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 289var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 290var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 632var originalTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression); 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression);
Microsoft.Interop.SourceGeneration (20)
Marshalling\StatefulMarshallingStrategy.cs (9)
362if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out) 370if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 397|| TypeInfo.ByValueContentsMarshalKind != ByValueContentsMarshalKind.Default) 424if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 432if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
Marshalling\StatelessMarshallingStrategy.cs (10)
440if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 653if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out) 662if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 700if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 708if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
Marshalling\StaticPinnableManagedValueMarshaller.cs (1)
69return context.SingleFrameSpansNativeContext && !TypeInfo.IsByRef && !context.IsInStubReturnPosition(TypeInfo);
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (2)
3778var typeInfo = semanticModel.GetTypeInfo(type.Type, CancellationToken.None); 3866var typeInfo = semanticModel.GetTypeInfo(type.Type, CancellationToken.None);
LanguageService\CSharpHelpContextService.cs (1)
194var info = semanticModel.GetTypeInfo(token.GetRequiredParent(), cancellationToken);
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
42TypeInfo objectTypeInfo = context.SemanticModel.GetTypeInfo(memberAccessExpr.Expression);
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (1)
47Dim objectTypeInfo As TypeInfo = context.SemanticModel.GetTypeInfo(memberAccessExpr.Expression)