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