370 references to GetTypeInfo
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
404var type = e.SemanticModel?.GetTypeInfo(e.Syntax).Type!;
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
205var typeInfo = model?.GetTypeInfo(receiverSyntax, cancellationToken);
Microsoft.AspNetCore.Mvc.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
205var typeInfo = model?.GetTypeInfo(receiverSyntax, cancellationToken);
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
205var typeInfo = model?.GetTypeInfo(receiverSyntax, cancellationToken);
Microsoft.CodeAnalysis.CodeStyle (43)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
74var collectionType = semanticModel.GetTypeInfo(syntaxFacts.GetExpressionOfForeachStatement(node), cancellationToken).Type;
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
150var typeInfo = semanticModel.GetTypeInfo(node, cancellationToken);
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
195return invocation.SemanticModel?.GetTypeInfo(expression).Type;
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
113var type = semanticModel.GetTypeInfo(conditionExpression, cancellationToken);
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
104var conditionType = semanticModel.GetTypeInfo(
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
168var typeInfo = semanticModel.GetTypeInfo(left, cancellationToken);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerAnalyzer.cs (1)
187var type = this.SemanticModel.GetTypeInfo(_objectCreationExpression, cancellationToken).Type;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
149var objectType = context.SemanticModel.GetTypeInfo(objectCreationExpression, cancellationToken);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
252var convertedType = this.SemanticModel.GetTypeInfo(SyntaxFacts.GetExpressionOfArgument(arguments[0]), cancellationToken).ConvertedType;
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
154var parameterType = semanticModel.GetTypeInfo(argumentExpression, cancellationToken).Type;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (3)
155var whenPartType = semanticModel.GetTypeInfo(whenPartMatch, cancellationToken).Type; 159var type = semanticModel.GetTypeInfo(conditionalExpression, cancellationToken).Type; 375var typeSymbol = semanticModel.GetTypeInfo(type, cancellationToken).Type;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (2)
85var whenPartType = semanticModel.GetTypeInfo(whenPartMatch, cancellationToken).Type; 89var whenPartIsNullable = semanticModel.GetTypeInfo(whenPartMatch).Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
122var type = this.SemanticModel.GetTypeInfo(_objectCreationExpression, cancellationToken).Type;
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
204return semanticModel.GetTypeInfo(expression).ConvertedType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
236var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (6)
35var innerTypeInfo = semanticModel.GetTypeInfo(innerBinary); 51if (!Equals(semanticModel.GetTypeInfo(parentBinaryLeft).Type, 52semanticModel.GetTypeInfo(parentBinaryRight).Type)) 57if (!Equals(semanticModel.GetTypeInfo(parentBinaryLeft).ConvertedType, 58semanticModel.GetTypeInfo(parentBinaryRight).ConvertedType)) 66var outerTypeInfo = semanticModel.GetTypeInfo(parentBinary);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (19)
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); 740var previousOriginalType = this.OriginalSemanticModel.GetTypeInfo(previousOriginalNode).Type; 741var previousReplacedType = this.SpeculativeSemanticModel.GetTypeInfo(previousReplacedNode).Type; 826var expressionType = this.SpeculativeSemanticModel.GetTypeInfo(newForEachStatementExpression, CancellationToken).ConvertedType; 849var originalThrowExpressionType = this.OriginalSemanticModel.GetTypeInfo(originalThrowExpression).Type; 851var newThrowExpressionType = this.SpeculativeSemanticModel.GetTypeInfo(newThrowExpression).Type; 964var originalTargetType = this.OriginalSemanticModel.GetTypeInfo(originalLeft).Type; 967var newTargetType = this.SpeculativeSemanticModel.GetTypeInfo(newLeft).Type; 1001? speculativeSemanticModel.GetTypeInfo(newReceiver).ConvertedType 1039var receiverType = semanticModel.GetTypeInfo(receiver).Type; 1208if (this.OriginalSemanticModel.GetTypeInfo(originalExpression).Type != null && 1209this.SpeculativeSemanticModel.GetTypeInfo(newExpression).Type != null) 1216var originalConvertedTypeSymbol = this.OriginalSemanticModel.GetTypeInfo(originalExpression).ConvertedType; 1222var newConvertedTypeSymbol = this.SpeculativeSemanticModel.GetTypeInfo(newExpression).ConvertedType;
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
143var castType = semanticModel.GetTypeInfo(castTypeNode, cancellationToken).Type;
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
169&& semanticModel.GetTypeInfo(argumentExpression, cancellationToken).Type is ITypeSymbol argumentType
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
186var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
601var type = semanticModel.GetTypeInfo(node, cancellationToken).Type;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (2)
83var typeInfo = semanticModel.GetTypeInfo(assignmentOperation.Value.Syntax, cancellationToken); 112var typeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
65var newInfo = speculativeModel.GetTypeInfo(dummyStatement.GetAnnotatedNodes(s_annotation).Single());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
796var typeInfo = semanticModel.GetTypeInfo(current, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
353var type = semanticModel.GetTypeInfo(node, cancellationToken).Type;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
199var newDeclarationType = newSemanticModel.GetTypeInfo(newDeclarationTypeNode, cancellationToken).Type;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
60var targetType = semanticModel.GetTypeInfo(target, cancellationToken: cancellationToken).Type;
src\Analyzers\CSharp\CodeFixes\UseCoalesceExpression\CSharpUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (3)
27var leftPartTypeSymbol = semanticModel.GetTypeInfo(expressionToCoalesce, cancellationToken).Type; 28var rightPartTypeSymbol = semanticModel.GetTypeInfo(rightAssignmentPart, cancellationToken).Type; 29var finalDestinationTypeSymbol = semanticModel.GetTypeInfo(leftAssignmentPart, cancellationToken).Type;
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
229var typeSymbol = semanticModel.GetTypeInfo(typeSyntax, cancellationToken).ConvertedType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
62var rightType = semanticModel.GetTypeInfo(right, cancellationToken);
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 (29)
CodeGen\CodeGenDeconstructTests.cs (7)
3137Assert.Null(model.GetTypeInfo(lhsNested).Type); 3191Assert.Null(model.GetTypeInfo(x34).Type); 6396Assert.Null(model.GetTypeInfo(discard1).Type); 6400Assert.Null(model.GetTypeInfo(discard1).Type); 6978Assert.Null(model.GetTypeInfo(discard1).Type); 6987Assert.Null(model.GetTypeInfo(discard2).Type); 7005Assert.Null(model.GetTypeInfo(discard4).Type);
CodeGen\CodeGenTupleTest.cs (22)
8352Assert.Equal("(System.Int16 c, System.String d)?", model.GetTypeInfo(node.Parent).Type.ToTestDisplayString()); 8353Assert.Equal("(System.Int16 a, System.String b)?", model.GetTypeInfo(node.Parent).ConvertedType.ToTestDisplayString()); 8457Assert.Equal("(System.Int16 c, System.String d)", model.GetTypeInfo(node.Parent).Type.ToTestDisplayString()); 8458Assert.Equal("(System.Int16 a, System.String b)?", model.GetTypeInfo(node.Parent).ConvertedType.ToTestDisplayString()); 8487Assert.Equal("(System.Int64 c, System.String d)", model.GetTypeInfo(node).Type.ToTestDisplayString()); 8488Assert.Equal("(System.Object a, System.String b)", model.GetTypeInfo(node).ConvertedType.ToTestDisplayString()); 8494Assert.Equal("(System.Int32 e, System.String f)", model.GetTypeInfo(node).Type.ToTestDisplayString()); 8495Assert.Equal("(System.Int32 e, System.String f)", model.GetTypeInfo(node).ConvertedType.ToTestDisplayString()); 8521Assert.Equal("(System.Int64 c, System.String d)", model.GetTypeInfo(node).Type.ToTestDisplayString()); 8522Assert.Equal("(System.Object a, System.String b)?", model.GetTypeInfo(node).ConvertedType.ToTestDisplayString()); 8528Assert.Equal("(System.Int32 e, System.String f)", model.GetTypeInfo(node).Type.ToTestDisplayString()); 8529Assert.Equal("(System.Int32 e, System.String f)", model.GetTypeInfo(node).ConvertedType.ToTestDisplayString()); 8601Assert.Equal("(System.Int32 c, System.String d)?", model.GetTypeInfo(node.Parent).Type.ToTestDisplayString()); 8602Assert.Equal("(System.Int32 a, System.String b)?", model.GetTypeInfo(node.Parent).ConvertedType.ToTestDisplayString()); 8636Assert.Equal("(System.Int32 c, System.String d)", model.GetTypeInfo(node.Parent).Type.ToTestDisplayString()); 8637Assert.Equal("(System.Int32 a, System.String b)?", model.GetTypeInfo(node.Parent).ConvertedType.ToTestDisplayString()); 8779Assert.Equal("(System.Int16 c, System.String d)", model.GetTypeInfo(node.Parent).Type.ToTestDisplayString()); 8780Assert.Equal("(System.Int16 a, System.String b)", model.GetTypeInfo(node.Parent).ConvertedType.ToTestDisplayString()); 8852Assert.Equal("(System.Int16 c, System.String d)", model.GetTypeInfo(node.Parent).Type.ToTestDisplayString()); 8853Assert.Equal("(System.Int16 a, System.String b)", model.GetTypeInfo(node.Parent).ConvertedType.ToTestDisplayString()); 8962Assert.Equal("(System.Int16 c, System.String d)", model.GetTypeInfo(node.Parent).Type.ToTestDisplayString()); 8963Assert.Equal("(System.Int16 a, System.String b)", model.GetTypeInfo(node.Parent).ConvertedType.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (149)
Semantics\InlineArrayTests.cs (8)
2521typeInfo = model.GetTypeInfo(access); 6212typeInfo = model.GetTypeInfo(access); 8838var typeInfo = model.GetTypeInfo(m3); 8848typeInfo = model.GetTypeInfo(access); 9206var typeInfo = model.GetTypeInfo(m3.Parent); 10560typeInfo = model.GetTypeInfo(access); 11304typeInfo = model.GetTypeInfo(access); 16498var typeInfo = model.GetTypeInfo(m3);
Semantics\OutVarTests.cs (2)
32980Assert.Null(model.GetTypeInfo(discard1).Type); 32989Assert.Null(model.GetTypeInfo(discard2).Type);
Semantics\PatternMatchingTestBase.cs (1)
381Assert.Null(model.GetTypeInfo(designation).Type);
Semantics\PatternMatchingTests.cs (4)
4295Assert.Equal("System.Int32", model.GetTypeInfo(declaration1).Type.ToTestDisplayString()); 4309Assert.Equal("System.Int32", model.GetTypeInfo(declaration3).Type.ToTestDisplayString()); 6575Assert.Equal("System.Int32", model.GetTypeInfo(caseDefault.Pattern).Type.ToTestDisplayString()); 6576Assert.Equal("System.Int32", model.GetTypeInfo(caseDefault.Pattern).ConvertedType.ToTestDisplayString());
Semantics\PatternMatchingTests_ListPatterns.cs (9)
3648var typeInfo = model.GetTypeInfo(designation); 3651typeInfo = model.GetTypeInfo(designation.Parent); 3690var typeInfo = model.GetTypeInfo(clause.Parent); // inner {} pattern 3729var typeInfo = model.GetTypeInfo(itemDesignation); 3733typeInfo = model.GetTypeInfo(itemDesignation.Parent); 3744typeInfo = model.GetTypeInfo(sliceDesignation); 3748typeInfo = model.GetTypeInfo(sliceDesignation.Parent); 4418var typeInfo = model.GetTypeInfo(designation); 4421typeInfo = model.GetTypeInfo(designation.Parent);
Semantics\PatternMatchingTests2.cs (13)
2162var typeInfo = model.GetTypeInfo(pat); 2255var ti = model.GetTypeInfo(patterns[0]); 2260ti = model.GetTypeInfo(patterns[1]); 2265ti = model.GetTypeInfo(patterns[2]); 2270ti = model.GetTypeInfo(patterns[3]); 2299var ti = model.GetTypeInfo(patterns[0]); 2304ti = model.GetTypeInfo(patterns[1]); 2309ti = model.GetTypeInfo(patterns[2]); 2345var ti = model.GetTypeInfo(patterns[0]); 2350ti = model.GetTypeInfo(patterns[1]); 2356ti = model.GetTypeInfo(patterns[2]); 2362ti = model.GetTypeInfo(patterns[3]); 2369ti = model.GetTypeInfo(patterns[4]);
Semantics\PatternMatchingTests3.cs (106)
4118Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4119Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4124Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4125Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4132Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4133Assert.Equal("System.Int32", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4140Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4141Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4146Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4147Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4153Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4154Assert.Equal("System.Int64", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4161Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4162Assert.Equal("System.Int64", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4167Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4168Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4176Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4177Assert.Equal("System.Int32", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4182Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4183Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4189Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4190Assert.Equal("System.Int64", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4196Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4197Assert.Equal("System.Int32", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4202Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4203Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4208Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4209Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4214Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4215Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4221Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4222Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4228Assert.Equal("System.Char", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4229Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4234Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4235Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4240Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4241Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4247Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4248Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4254Assert.Equal("System.Char", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4255Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4260Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4261Assert.Equal("System.Object", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4266Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4267Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4272Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4273Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4279Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4280Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4286Assert.Equal("System.Char", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4287Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4345Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4346Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4351Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4352Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4359Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4360Assert.Equal("System.Int32", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4367Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4368Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4373Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4374Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4380Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4381Assert.Equal("System.Int64", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4388Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4389Assert.Equal("System.Int64", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4394Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4395Assert.Equal("System.Int32", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4402Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4403Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4410Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4411Assert.Equal("System.Int32", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4416Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4417Assert.Equal("System.Runtime.CompilerServices.ITuple", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4423Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4424Assert.Equal("System.Int64", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4430Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4431Assert.Equal("System.Int32", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4436Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4437Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4442Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4443Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4448Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4449Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4455Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4456Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4462Assert.Equal("System.Char", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4463Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4468Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4469Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4474Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4475Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4481Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4482Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4488Assert.Equal("System.Char", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4489Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4494Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4495Assert.Equal("System.Object", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4500Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4501Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4506Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4507Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4513Assert.Equal("System.Object", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4514Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString()); 4520Assert.Equal("System.Char", model.GetTypeInfo(pattern).Type.ToTestDisplayString()); 4521Assert.Equal("System.Char", model.GetTypeInfo(pattern).ConvertedType.ToTestDisplayString());
Semantics\PrimaryConstructorTests.cs (3)
1088Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 2121Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 2303Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs));
Semantics\RecordTests.cs (3)
21205Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 22278Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs)); 22460Assert.Equal(TypeInfo.None, model.GetTypeInfo(baseWithargs));
Microsoft.CodeAnalysis.CSharp.Features (14)
AddImport\CSharpAddImportFeatureService.cs (1)
245return semanticModel.GetTypeInfo(node, cancellationToken).Type;
Completion\CompletionProviders\AwaitCompletionProvider.cs (1)
164return semanticModel.GetTypeInfo(potentialAwaitableExpression, cancellationToken).Type;
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (2)
263semanticModel.GetTypeInfo(typeSyntax, cancellationToken).Type, 305semanticModel.GetTypeInfo(typeSyntax, cancellationToken).Type,
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
148return semanticModel.GetTypeInfo(parent, cancellationToken).Type;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
801var returnTypeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken);
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
125var typeInfo = semanticModel.GetTypeInfo(node, cancellationToken);
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
65var newInfo = speculativeModel.GetTypeInfo(dummyStatement.GetAnnotatedNodes(s_annotation).Single());
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
60var targetType = semanticModel.GetTypeInfo(target, cancellationToken: cancellationToken).Type;
src\Analyzers\CSharp\CodeFixes\UseCoalesceExpression\CSharpUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (3)
27var leftPartTypeSymbol = semanticModel.GetTypeInfo(expressionToCoalesce, cancellationToken).Type; 28var rightPartTypeSymbol = semanticModel.GetTypeInfo(rightAssignmentPart, cancellationToken).Type; 29var finalDestinationTypeSymbol = semanticModel.GetTypeInfo(leftAssignmentPart, cancellationToken).Type;
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
229var typeSymbol = semanticModel.GetTypeInfo(typeSyntax, cancellationToken).ConvertedType;
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
127var governingType = semanticModel.GetTypeInfo(p.Target.Syntax).Type.RemoveNullableIfPresent();
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IConversionExpression.cs (1)
5381var typeInfo = semanticModel.GetTypeInfo(finalSyntax);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (28)
Semantics\BindingTests.cs (1)
3940var typeInfo = model.GetTypeInfo(lambda.Body);
Semantics\DeconstructionTests.cs (5)
5998type = model.GetTypeInfo(argument); 6041type = model.GetTypeInfo(argument); 6081type = model.GetTypeInfo(argument); 6123type = model.GetTypeInfo(argument); 6163type = model.GetTypeInfo(argument);
Semantics\LambdaTests.cs (1)
1983Assert.Equal("void System.EventHandler.Invoke(System.Object sender, System.EventArgs e)", model.GetTypeInfo(node1).ConvertedType.GetMembers("Invoke").Single().ToTestDisplayString());
Semantics\MethodTypeInferenceTests.cs (1)
842Assert.Null(model.GetTypeInfo(discard).Type);
Semantics\NullableReferenceTypesTests.cs (8)
71964Assert.Equal("System.Object", model.GetTypeInfo(discardPattern1).Type.ToTestDisplayString()); 71966Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discardPattern1).Nullability.Annotation); 71971Assert.Equal("System.Object", model.GetTypeInfo(discardPattern2).Type.ToTestDisplayString()); 71972Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discardPattern2).Nullability.Annotation); 155998Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(identifiers[0]).Nullability.Annotation); 155999Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(identifiers[1]).Nullability.Annotation); 156000Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(identifiers[2]).Nullability.Annotation); 156001Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(identifiers[3]).Nullability.Annotation);
Semantics\NullCoalesceAssignmentTests.cs (3)
46var typeInfo = semanticModel.GetTypeInfo(syntax); 88var typeInfo = semanticModel.GetTypeInfo(syntax); 131var typeInfo = semanticModel.GetTypeInfo(syntax);
Semantics\RefFieldTests.cs (5)
12426Assert.Null(model.GetTypeInfo(decl).Type); 12606Assert.Null(model.GetTypeInfo(decl).Type); 12839Assert.Null(model.GetTypeInfo(decl).Type); 13013Assert.Null(model.GetTypeInfo(decl).Type); 14881Assert.Null(model.GetTypeInfo(decl).Type);
Semantics\TopLevelStatementsTests.cs (4)
253var typeInfo = model1.GetTypeInfo(tree1.GetRoot()); 264typeInfo = model1.GetTypeInfo(globalStatement); 404var typeInfo = model1.GetTypeInfo(tree1.GetRoot()); 415typeInfo = model1.GetTypeInfo(globalStatement);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\GetSemanticInfoTests.cs (1)
5916Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType);
Symbols\CovariantReturnTests.cs (1)
2628var typeInfo = model.GetTypeInfo(initialValue);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (2)
274var typeInfo = semanticModel.GetTypeInfo(pattern); 355var typeInfo = model.GetTypeInfo(expression);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
796var typeInfo = semanticModel.GetTypeInfo(current, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
353var type = semanticModel.GetTypeInfo(node, cancellationToken).Type;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
199var newDeclarationType = newSemanticModel.GetTypeInfo(newDeclarationTypeNode, cancellationToken).Type;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
62var rightType = semanticModel.GetTypeInfo(right, cancellationToken);
Microsoft.CodeAnalysis.Features (31)
AddImport\AbstractAddImportFeatureService.cs (2)
639return semanticModel.GetTypeInfo(innerExpression).Type; 651return semanticModel.GetTypeInfo(collectionExpression).Type;
ChangeSignature\AbstractChangeSignatureService.cs (1)
1061var fromType = semanticModel.GetTypeInfo(lastArgumentExpression, cancellationToken);
CodeRefactorings\AddAwait\AbstractAddAwaitCodeRefactoringProvider.cs (1)
104var type = model.GetTypeInfo(node, cancellationToken).Type;
GenerateType\AbstractGenerateTypeService.cs (1)
198var type = argument == null ? null : semanticModel.GetTypeInfo(argument, cancellationToken).Type;
GenerateType\AbstractGenerateTypeService.State.cs (1)
157var typeInfo = semanticModel.GetTypeInfo(ObjectCreationExpressionOpt, cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.cs (1)
407var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
QuickInfo\CommonSemanticQuickInfoProvider.cs (1)
227var typeInfo = semanticModel.GetTypeInfo(token.Parent!, cancellationToken);
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
285var conditionalType = semanticModel.GetTypeInfo(conditionalExpression, cancellationToken).Type;
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (1)
123var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
74var collectionType = semanticModel.GetTypeInfo(syntaxFacts.GetExpressionOfForeachStatement(node), cancellationToken).Type;
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
150var typeInfo = semanticModel.GetTypeInfo(node, cancellationToken);
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
195return invocation.SemanticModel?.GetTypeInfo(expression).Type;
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\AbstractUseCollectionInitializerAnalyzer.cs (1)
187var type = this.SemanticModel.GetTypeInfo(_objectCreationExpression, cancellationToken).Type;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
149var objectType = context.SemanticModel.GetTypeInfo(objectCreationExpression, cancellationToken);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
252var convertedType = this.SemanticModel.GetTypeInfo(SyntaxFacts.GetExpressionOfArgument(arguments[0]), cancellationToken).ConvertedType;
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
154var parameterType = semanticModel.GetTypeInfo(argumentExpression, cancellationToken).Type;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (3)
155var whenPartType = semanticModel.GetTypeInfo(whenPartMatch, cancellationToken).Type; 159var type = semanticModel.GetTypeInfo(conditionalExpression, cancellationToken).Type; 375var typeSymbol = semanticModel.GetTypeInfo(type, cancellationToken).Type;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (2)
85var whenPartType = semanticModel.GetTypeInfo(whenPartMatch, cancellationToken).Type; 89var whenPartIsNullable = semanticModel.GetTypeInfo(whenPartMatch).Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
122var type = this.SemanticModel.GetTypeInfo(_objectCreationExpression, cancellationToken).Type;
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
204return semanticModel.GetTypeInfo(expression).ConvertedType;
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
143var castType = semanticModel.GetTypeInfo(castTypeNode, cancellationToken).Type;
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
169&& semanticModel.GetTypeInfo(argumentExpression, cancellationToken).Type is ITypeSymbol argumentType
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
479var argumentTypeInfo = semanticModel.GetTypeInfo(expressionOfArgument);
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
186var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
601var type = semanticModel.GetTypeInfo(node, cancellationToken).Type;
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (1)
1076Dim typeInfo = semanticModel.GetTypeInfo(current, cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
AddImport\VisualBasicAddImportFeatureService.vb (1)
348Dim semanticInfo = semanticModel.GetTypeInfo(leftExpression, cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\GetExtendedSemanticInfoTests.vb (1)
8529Dim TI = DirectCast(model, SemanticModel).GetTypeInfo(SLDeclaration)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (1)
1076Dim typeInfo = semanticModel.GetTypeInfo(current, cancellationToken)
Utilities\IntrinsicOperators\AbstractIntrinsicOperatorDocumentation.vb (1)
44Dim typeInfo = semanticModel.GetTypeInfo(nodeToBind, cancellationToken)
Microsoft.CodeAnalysis.Workspaces (33)
Editing\SymbolEditorExtensions.cs (1)
44var typeRef = gen.GetBaseAndInterfaceTypes(decl).FirstOrDefault(r => model.GetTypeInfo(r, cancellationToken).Type.Equals(baseOrInterfaceType));
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (2)
109var convertedType = semanticModel.GetTypeInfo(lambdaNode, cancellationToken).ConvertedType; 149var convertedType2 = semanticModel.GetTypeInfo(lambdaNode, cancellationToken).ConvertedType;
Shared\Extensions\SemanticModelExtensions.cs (1)
113var 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 (6)
35var innerTypeInfo = semanticModel.GetTypeInfo(innerBinary); 51if (!Equals(semanticModel.GetTypeInfo(parentBinaryLeft).Type, 52semanticModel.GetTypeInfo(parentBinaryRight).Type)) 57if (!Equals(semanticModel.GetTypeInfo(parentBinaryLeft).ConvertedType, 58semanticModel.GetTypeInfo(parentBinaryRight).ConvertedType)) 66var outerTypeInfo = semanticModel.GetTypeInfo(parentBinary);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (19)
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); 740var previousOriginalType = this.OriginalSemanticModel.GetTypeInfo(previousOriginalNode).Type; 741var previousReplacedType = this.SpeculativeSemanticModel.GetTypeInfo(previousReplacedNode).Type; 826var expressionType = this.SpeculativeSemanticModel.GetTypeInfo(newForEachStatementExpression, CancellationToken).ConvertedType; 849var originalThrowExpressionType = this.OriginalSemanticModel.GetTypeInfo(originalThrowExpression).Type; 851var newThrowExpressionType = this.SpeculativeSemanticModel.GetTypeInfo(newThrowExpression).Type; 964var originalTargetType = this.OriginalSemanticModel.GetTypeInfo(originalLeft).Type; 967var newTargetType = this.SpeculativeSemanticModel.GetTypeInfo(newLeft).Type; 1001? speculativeSemanticModel.GetTypeInfo(newReceiver).ConvertedType 1039var receiverType = semanticModel.GetTypeInfo(receiver).Type; 1208if (this.OriginalSemanticModel.GetTypeInfo(originalExpression).Type != null && 1209this.SpeculativeSemanticModel.GetTypeInfo(newExpression).Type != null) 1216var originalConvertedTypeSymbol = this.OriginalSemanticModel.GetTypeInfo(originalExpression).ConvertedType; 1222var newConvertedTypeSymbol = this.SpeculativeSemanticModel.GetTypeInfo(newExpression).ConvertedType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (3)
83var typeInfo = semanticModel.GetTypeInfo(assignmentOperation.Value.Syntax, cancellationToken); 112var typeInfo = semanticModel.GetTypeInfo(syntax, cancellationToken); 120var typeInfo = semanticModel.GetTypeInfo(operation.Syntax, cancellationToken);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SymbolKeyTests.cs (1)
1278var symbol = semanticModel.GetTypeInfo(node).Type;
Microsoft.Maui.Controls.BindingSourceGen (2)
InvocationParser.cs (2)
50 var type = _context.SemanticModel.GetTypeInfo(firstArgument, cancellationToken: t).Type; 98 var secondArgumentType = _context.SemanticModel.GetTypeInfo(secondArgument, cancellationToken: t).Type;
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
962? semanticModel.GetTypeInfo(node).Type
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.vb (1)
1068semanticModel.GetTypeInfo(node).Type,
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (1)
218ITypeSymbol? enumType = semanticModel.GetTypeInfo(argument, cancellationToken).Type;