233 references to GetTypeInfo
Microsoft.CodeAnalysis.CSharp.CodeStyle (61)
AnalyzedPattern.cs (1)
62var originalInfo = operation.SemanticModel.GetTypeInfo(binaryExpression.Right);
CastSimplifier.cs (21)
120var enumType = semanticModel.GetTypeInfo(castExpression.Expression, cancellationToken).Type as INamedTypeSymbol; 121var castedType = semanticModel.GetTypeInfo(castExpression.Type, cancellationToken).Type; 155var enumType = semanticModel.GetTypeInfo(castExpression.Expression, cancellationToken).Type as INamedTypeSymbol; 156var castedType = semanticModel.GetTypeInfo(castExpression.Type, cancellationToken).Type; 160var parentCastType = semanticModel.GetTypeInfo(parentCast.Type, cancellationToken).Type; 296var originalConvertedType = originalSemanticModel.GetTypeInfo(castNode.WalkUpParentheses(), cancellationToken).ConvertedType; 455var castedExpressionType = originalSemanticModel.GetTypeInfo(castedExpressionNode, cancellationToken).Type; 456var isType = originalSemanticModel.GetTypeInfo(isExpression.Right, cancellationToken).Type; 540var castType = semanticModel.GetTypeInfo(castNode, cancellationToken).Type; 712var originalCastExpressionTypeInfo = originalSemanticModel.GetTypeInfo(castExpression, cancellationToken); 713var originalConditionalTypeInfo = originalSemanticModel.GetTypeInfo(originalConditionalExpression, cancellationToken); 714var rewrittenConditionalTypeInfo = rewrittenSemanticModel.GetTypeInfo(rewrittenConditionalExpression, cancellationToken); 731var castType = originalSemanticModel.GetTypeInfo(castExpression, cancellationToken).Type; 877var castSideType = semanticModel.GetTypeInfo(castSide, cancellationToken).Type; 878var castedExpressionType = semanticModel.GetTypeInfo(castExpression.Expression, cancellationToken).Type; 882var otherSideType = semanticModel.GetTypeInfo(otherSide, cancellationToken).Type; 900var castType = semanticModel.GetTypeInfo(castNode, cancellationToken).Type; 901var castedExpressionType = semanticModel.GetTypeInfo(castedExpressionNode, cancellationToken).Type; 941var typeInfo = semanticModel.GetTypeInfo(arrayInitializer, cancellationToken); 1099var rewrittenType = rewrittenSemanticModel.GetTypeInfo(rewrittenExpression, cancellationToken).Type; 1330var rewrittenConvertedType = rewrittenSemanticModel.GetTypeInfo(rewrittenExpression, cancellationToken).ConvertedType;
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
85var castType = semanticModel.GetTypeInfo(castExpression.Type).Type; 121var asType = semanticModel.GetTypeInfo(typeNode, cancellationToken).Type; 244var rightType = semanticModel.GetTypeInfo(assignmentExpression.Right);
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
103var isType = semanticModel.GetTypeInfo(castExpression.Type).Type;
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (2)
126var lambdaTypeInfo = semanticModel.GetTypeInfo(anonymousFunction, cancellationToken); 194var rewrittenConvertedType = rewrittenSemanticModel.GetTypeInfo(rewrittenExpression, cancellationToken).ConvertedType;
CSharpTypeStyleHelper.State.cs (3)
78var declaredTypeSymbol = semanticModel.GetTypeInfo(variableDeclaration.Type.StripRefIfNeeded(), cancellationToken).Type; 96? IsMadeOfSpecialTypes(semanticModel.GetTypeInfo(typeSyntax.StripRefIfNeeded()).Type) 136semanticModel.GetTypeInfo(typeSyntax).Type?.IsSpecialType() == true;
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
169if (semanticModel.GetTypeInfo(testedExpression, cancellationToken).Type is IPointerTypeSymbol or IFunctionPointerTypeSymbol)
CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
165var type = semanticModel.GetTypeInfo(typeNode, cancellationToken).Type;
CSharpUseExplicitTypeHelper.cs (2)
149var declaredType = semanticModel.GetTypeInfo(typeName.StripRefIfNeeded(), cancellationToken).Type; 156var initializerTypeInfo = semanticModel.GetTypeInfo(initializer, cancellationToken);
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (2)
110var leftType = semanticModel.GetTypeInfo(typeNode, cancellationToken).Type; 111var rightType = semanticModel.GetTypeInfo(objectCreation, cancellationToken).Type;
CSharpUseImplicitTypeHelper.cs (3)
195var declarationType = semanticModel.GetTypeInfo(declarationTypeNode, cancellationToken).Type; 293var declaredType = semanticModel.GetTypeInfo(typeName.StripRefIfNeeded(), cancellationToken).Type; 332var initializerType = semanticModel.GetTypeInfo(expression, cancellationToken).Type;
CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (2)
77if (semanticModel.GetTypeInfo(castExpression.Type).Type?.SpecialType == SpecialType.System_Object) 79var expressionType = semanticModel.GetTypeInfo(castExpression.Expression).Type;
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (2)
113var delegateType = semanticModel.GetTypeInfo(anonymousFunction, cancellationToken).ConvertedType as INamedTypeSymbol; 262var convertedType = semanticModel.GetTypeInfo(nodeToCheck, cancellationToken).ConvertedType;
DefaultExpressionSyntaxExtensions.cs (2)
52var entityType = semanticModel.GetTypeInfo(typeSyntax, cancellationToken).Type; 53var defaultType = semanticModel.GetTypeInfo(defaultExpression.Type, cancellationToken).Type;
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
92if (syntaxContext.SemanticModel.GetTypeInfo(invocationExpression.Expression, syntaxContext.CancellationToken).Type is { TypeKind: TypeKind.FunctionPointer })
ParenthesizedExpressionSyntaxExtensions.cs (1)
76if (semanticModel.GetTypeInfo(varDecl.Type, cancellationToken).Type is
SemanticModelExtensions.cs (2)
113var typeInfo = semanticModel.GetTypeInfo(qualifier, cancellationToken); 414var info = semanticModel.GetTypeInfo(expression, cancellationToken);
SpeculationAnalyzer.cs (8)
370var originalExpressionTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression, this.CancellationToken); 371var newExpressionTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression, this.CancellationToken); 478var originalExprType = this.OriginalSemanticModel.GetTypeInfo(originalSwitchExpression.GoverningExpression, CancellationToken); 479var replacedExprType = this.SpeculativeSemanticModel.GetTypeInfo(replacedSwitchExpression.GoverningExpression, CancellationToken); 548var originalExpressionType = this.OriginalSemanticModel.GetTypeInfo(originalAnonymousObjectMemberDeclarator.Expression, this.CancellationToken).Type; 549var newExpressionType = this.SpeculativeSemanticModel.GetTypeInfo(replacedAnonymousObjectMemberDeclarator.Expression, this.CancellationToken).Type; 685var originalConvertedType = this.OriginalSemanticModel.GetTypeInfo(originalIsOrAsExpression.Right).Type; 686var newConvertedType = this.SpeculativeSemanticModel.GetTypeInfo(newIsOrAsExpression.Right).Type;
TypeStyleHelper.cs (1)
129var containingType = semanticModel.GetTypeInfo(containingTypeName, cancellationToken).Type;
TypeSyntaxExtensions.cs (1)
38var type = semanticModel.GetTypeInfo(typeSyntax).Type;
UseExpressionBodyForLambdaHelpers.cs (1)
41if (semanticModel.GetTypeInfo(declaration, cancellationToken).ConvertedType is not INamedTypeSymbol lambdaType || lambdaType.DelegateInvokeMethod == null)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (21)
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
192var typeInfo = _semanticModel.GetTypeInfo(node, _cancellationToken); 263var expressionConvertedType = _semanticModel.GetTypeInfo(node.Expression).ConvertedType;
ConvertToRecordEngine.cs (1)
310=> iEquatable.Equals(semanticModel.GetTypeInfo(baseItem.Type, cancellationToken).Type));
CSharpAddYieldCodeFixProvider.cs (1)
100var info = model.GetTypeInfo(expression);
CSharpAsAndNullCheckCodeFixProvider.cs (1)
140var asExpressionTypeInfo = semanticModel.GetTypeInfo(asExpression, cancellationToken);
CSharpFixReturnTypeCodeFixProvider.cs (2)
96var previousReturnType = semanticModel.GetTypeInfo(declarationTypeToFix, cancellationToken).Type; 173var type = semanticModel.GetTypeInfo(argumentExpression, cancellationToken).Type;
CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
110semanticModel.GetTypeInfo(implicitObjectCreation).Type is { } type)
CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
89var type = semanticModel.GetTypeInfo(defaultLiteral, cancellationToken).ConvertedType;
CSharpSemanticFactsService.cs (1)
141var type = semanticModel.GetTypeInfo(expression, cancellationToken).Type;
CSharpTypeInferenceService.TypeInferrer.cs (4)
440var info = SemanticModel.GetTypeInfo(creation, CancellationToken); 491var typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken); 562var info = SemanticModel.GetTypeInfo(elementAccess.Expression, CancellationToken); 1247var typeInfo = SemanticModel.GetTypeInfo(propertyDeclaration.Type);
CSharpUseLocalFunctionCodeFixProvider.cs (1)
109var delegateType = (INamedTypeSymbol)semanticModel.GetTypeInfo(anonymousFunction, cancellationToken).ConvertedType;
CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
119var type = semanticModel.GetTypeInfo(expr).Type;
InternalExtensions.cs (2)
28var typeInfo = semanticModel.GetTypeInfo(decl.Type, cancellationToken); 35var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
689var typeInfo = semanticModel.GetTypeInfo(memberAccessExpression.Expression, cancellationToken);
UseExplicitTypeForConstCodeFixProvider.cs (1)
51var type = semanticModel.GetTypeInfo(variableDeclaration.Type, cancellationToken).ConvertedType;
UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
76var lambdaType = (INamedTypeSymbol)semanticModel.GetTypeInfo(declaration).ConvertedType!;
Microsoft.CodeAnalysis.CSharp.Features (77)
AddImport\CSharpAddImportFeatureService.cs (1)
272return semanticModel.GetTypeInfo(fromClause.Expression, cancellationToken).Type;
AnalyzedPattern.cs (1)
62var originalInfo = operation.SemanticModel.GetTypeInfo(binaryExpression.Right);
CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
78type = model.GetTypeInfo(assignment.Right).Type;
Completion\CompletionProviders\AwaitCompletionProvider.cs (1)
107return symbol is ITypeSymbol ? null : semanticModel.GetTypeInfo(memberAccessExpression, cancellationToken).Type;
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
217var leftType = semanticModel.GetTypeInfo(parent.Container, cancellationToken).Type;
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
295var methodParameterType = semanticModel.GetTypeInfo(parameterType, cancellationToken).Type;
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (4)
175if (semanticModel.GetTypeInfo(objectCreationExpression, cancellationToken).Type is INamedTypeSymbol type && within != null && type.TypeKind != TypeKind.Delegate) 191var expressionType = semanticModel.GetTypeInfo(elementAccessExpression.Expression, cancellationToken).Type; 240var type = semanticModel.GetTypeInfo(recordBaseType.Type, cancellationToken).Type as INamedTypeSymbol; 260var expressionType = semanticModel.GetTypeInfo(invocationExpression.Expression, cancellationToken).Type as INamedTypeSymbol;
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (2)
86var initializedType = semanticModel.GetTypeInfo(expression, cancellationToken).Type; 169return semanticModel.GetTypeInfo(withExpression.Expression, cancellationToken).Type;
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
70returnType = semanticModel.GetTypeInfo(typeSyntax, cancellationToken).Type;
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
68model.GetTypeInfo(foreachCollectionExpression, cancellationToken).Type ??
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (6)
438if (typeCheckMethod(_semanticModel.GetTypeInfo(expressionToVerifyType, _cancellationToken).Type) && 528? _semanticModel.GetTypeInfo(expression, _cancellationToken).ConvertedType.GenerateTypeSyntax() 559var returnTypeInfo = _semanticModel.GetTypeInfo(_source, _cancellationToken); 672var forEachStatementTypeSymbolType = _semanticModel.GetTypeInfo(forEachStatement.Type, _cancellationToken).Type; 673var lastSelectExpressionTypeInfo = _semanticModel.GetTypeInfo(lastSelectExpression, _cancellationToken); 890if (_semanticModel.GetTypeInfo(selectClause.Expression, _cancellationToken).Type.ContainsAnonymousType())
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
192var typeInfo = _semanticModel.GetTypeInfo(node, _cancellationToken); 263var expressionConvertedType = _semanticModel.GetTypeInfo(node.Expression).ConvertedType;
ConvertToRecordEngine.cs (1)
310=> iEquatable.Equals(semanticModel.GetTypeInfo(baseItem.Type, cancellationToken).Type));
CSharpAddYieldCodeFixProvider.cs (1)
100var info = model.GetTypeInfo(expression);
CSharpAsAndNullCheckCodeFixProvider.cs (1)
140var asExpressionTypeInfo = semanticModel.GetTypeInfo(asExpression, cancellationToken);
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
85var castType = semanticModel.GetTypeInfo(castExpression.Type).Type; 121var asType = semanticModel.GetTypeInfo(typeNode, cancellationToken).Type; 244var rightType = semanticModel.GetTypeInfo(assignmentExpression.Right);
CSharpFixReturnTypeCodeFixProvider.cs (2)
96var previousReturnType = semanticModel.GetTypeInfo(declarationTypeToFix, cancellationToken).Type; 173var type = semanticModel.GetTypeInfo(argumentExpression, cancellationToken).Type;
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
103var isType = semanticModel.GetTypeInfo(castExpression.Type).Type;
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (2)
126var lambdaTypeInfo = semanticModel.GetTypeInfo(anonymousFunction, cancellationToken); 194var rewrittenConvertedType = rewrittenSemanticModel.GetTypeInfo(rewrittenExpression, cancellationToken).ConvertedType;
CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
110semanticModel.GetTypeInfo(implicitObjectCreation).Type is { } type)
CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
89var type = semanticModel.GetTypeInfo(defaultLiteral, cancellationToken).ConvertedType;
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
169if (semanticModel.GetTypeInfo(testedExpression, cancellationToken).Type is IPointerTypeSymbol or IFunctionPointerTypeSymbol)
CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
165var type = semanticModel.GetTypeInfo(typeNode, cancellationToken).Type;
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (2)
110var leftType = semanticModel.GetTypeInfo(typeNode, cancellationToken).Type; 111var rightType = semanticModel.GetTypeInfo(objectCreation, cancellationToken).Type;
CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (2)
77if (semanticModel.GetTypeInfo(castExpression.Type).Type?.SpecialType == SpecialType.System_Object) 79var expressionType = semanticModel.GetTypeInfo(castExpression.Expression).Type;
CSharpUseLocalFunctionCodeFixProvider.cs (1)
109var delegateType = (INamedTypeSymbol)semanticModel.GetTypeInfo(anonymousFunction, cancellationToken).ConvertedType;
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (2)
113var delegateType = semanticModel.GetTypeInfo(anonymousFunction, cancellationToken).ConvertedType as INamedTypeSymbol; 262var convertedType = semanticModel.GetTypeInfo(nodeToCheck, cancellationToken).ConvertedType;
CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
119var type = semanticModel.GetTypeInfo(expr).Type;
Debugging\DataTipInfoGetter.cs (2)
48var type = semanticModel.GetTypeInfo(expression, cancellationToken).Type; 81var type = semanticModel.GetTypeInfo(typeSyntax, cancellationToken).Type;
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (3)
68return model.GetTypeInfo(variableDeclExpression.Type).Type; 87return model.GetTypeInfo(castExpression).Type; 99var info = semanticModel.GetTypeInfo(expression);
GenerateConstructor\CSharpGenerateConstructorService.cs (1)
160var typeInfo = document.SemanticModel.GetTypeInfo(implicitObjectCreation, cancellationToken);
GenerateMember\GenerateParameterizedMember\CSharpGenerateConversionService.cs (2)
148typeToGenerateIn = document.SemanticModel.GetTypeInfo(castExpression.Type, cancellationToken).Type as INamedTypeSymbol; 150|| document.SemanticModel.GetTypeInfo(castExpression.Expression, cancellationToken).Type is not INamedTypeSymbol parameterSymbol
GenerateMember\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
59type: semanticModel.GetTypeInfo(((ConstantPatternSyntax)positionalPattern.Subpatterns[i].Pattern).Expression, cancellationToken).Type ?? semanticModel.Compilation.GetSpecialType(SpecialType.System_Object),
GenerateMember\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
70var semanticInfo = semanticModel.GetTypeInfo(methodDeclaration.ExplicitInterfaceSpecifier.Name, cancellationToken);
GenerateMember\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (2)
125var info = Document.SemanticModel.GetTypeInfo(type, cancellationToken); 162var typeInfo = Document.SemanticModel.GetTypeInfo(typeArgument, cancellationToken);
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
74var info = semanticModel.GetTypeInfo(propertyDeclaration.ExplicitInterfaceSpecifier.Name, cancellationToken);
GenerateType\CSharpGenerateTypeService.cs (1)
459var expressionType = semanticModel.GetTypeInfo(expression, cancellationToken).Type;
InlineHints\CSharpInlineTypeHintsService.cs (3)
42var type = semanticModel.GetTypeInfo(variableDeclaration.Type, cancellationToken).Type; 52var type = semanticModel.GetTypeInfo(declarationExpression.Type, cancellationToken).Type; 96var type = semanticModel.GetTypeInfo(implicitNew, cancellationToken).Type;
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
123if (document.SemanticModel.GetTypeInfo(oldLambda, cancellationToken).ConvertedType is INamedTypeSymbol delegateType &&
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
92if (syntaxContext.SemanticModel.GetTypeInfo(invocationExpression.Expression, syntaxContext.CancellationToken).Type is { TypeKind: TypeKind.FunctionPointer })
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (2)
190expressionType = semanticModel.GetTypeInfo(memberAccessExpression.Expression, cancellationToken).Type!; 202expressionType = semanticModel.GetTypeInfo(expression, cancellationToken).Type;
SignatureHelp\GenericNameSignatureHelpProvider.cs (1)
100: semanticModel.GetTypeInfo(beforeDotExpression, cancellationToken).Type as INamespaceOrTypeSymbol;
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (2)
85var invokedType = semanticModel.GetTypeInfo(invocationExpression.Expression, cancellationToken).Type; 138var invokedType = semanticModel.GetTypeInfo(invocationExpression.Expression, cancellationToken).Type;
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs (1)
54throughType = semanticModel.GetTypeInfo(throughExpression, cancellationToken).Type;
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (1)
79if (semanticModel.GetTypeInfo(objectCreationExpression, cancellationToken).Type is not INamedTypeSymbol type)
SignatureHelp\PrimaryConstructorBaseTypeSignatureHelpProvider.cs (1)
82var baseType = semanticModel.GetTypeInfo(baseTypeSyntax.Type, cancellationToken).Type as INamedTypeSymbol;
UseExplicitTypeForConstCodeFixProvider.cs (1)
51var type = semanticModel.GetTypeInfo(variableDeclaration.Type, cancellationToken).ConvertedType;
UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
76var lambdaType = (INamedTypeSymbol)semanticModel.GetTypeInfo(declaration).ConvertedType!;
UseExpressionBodyForLambdaHelpers.cs (1)
41if (semanticModel.GetTypeInfo(declaration, cancellationToken).ConvertedType is not INamedTypeSymbol lambdaType || lambdaType.DelegateInvokeMethod == null)
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
43var argType = semanticModel.GetTypeInfo(GetArgumentExpression(argument)).Type;
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
125var typeSymbol = semanticModel.GetTypeInfo(type, cancellationToken).Type;
Microsoft.CodeAnalysis.CSharp.Workspaces (66)
CastSimplifier.cs (21)
120var enumType = semanticModel.GetTypeInfo(castExpression.Expression, cancellationToken).Type as INamedTypeSymbol; 121var castedType = semanticModel.GetTypeInfo(castExpression.Type, cancellationToken).Type; 155var enumType = semanticModel.GetTypeInfo(castExpression.Expression, cancellationToken).Type as INamedTypeSymbol; 156var castedType = semanticModel.GetTypeInfo(castExpression.Type, cancellationToken).Type; 160var parentCastType = semanticModel.GetTypeInfo(parentCast.Type, cancellationToken).Type; 296var originalConvertedType = originalSemanticModel.GetTypeInfo(castNode.WalkUpParentheses(), cancellationToken).ConvertedType; 455var castedExpressionType = originalSemanticModel.GetTypeInfo(castedExpressionNode, cancellationToken).Type; 456var isType = originalSemanticModel.GetTypeInfo(isExpression.Right, cancellationToken).Type; 540var castType = semanticModel.GetTypeInfo(castNode, cancellationToken).Type; 712var originalCastExpressionTypeInfo = originalSemanticModel.GetTypeInfo(castExpression, cancellationToken); 713var originalConditionalTypeInfo = originalSemanticModel.GetTypeInfo(originalConditionalExpression, cancellationToken); 714var rewrittenConditionalTypeInfo = rewrittenSemanticModel.GetTypeInfo(rewrittenConditionalExpression, cancellationToken); 731var castType = originalSemanticModel.GetTypeInfo(castExpression, cancellationToken).Type; 877var castSideType = semanticModel.GetTypeInfo(castSide, cancellationToken).Type; 878var castedExpressionType = semanticModel.GetTypeInfo(castExpression.Expression, cancellationToken).Type; 882var otherSideType = semanticModel.GetTypeInfo(otherSide, cancellationToken).Type; 900var castType = semanticModel.GetTypeInfo(castNode, cancellationToken).Type; 901var castedExpressionType = semanticModel.GetTypeInfo(castedExpressionNode, cancellationToken).Type; 941var typeInfo = semanticModel.GetTypeInfo(arrayInitializer, cancellationToken); 1099var rewrittenType = rewrittenSemanticModel.GetTypeInfo(rewrittenExpression, cancellationToken).Type; 1330var rewrittenConvertedType = rewrittenSemanticModel.GetTypeInfo(rewrittenExpression, cancellationToken).ConvertedType;
CSharpSemanticFactsService.cs (1)
141var type = semanticModel.GetTypeInfo(expression, cancellationToken).Type;
CSharpTypeInferenceService.TypeInferrer.cs (4)
440var info = SemanticModel.GetTypeInfo(creation, CancellationToken); 491var typeInfo = SemanticModel.GetTypeInfo(memberAccess.Expression, CancellationToken); 562var info = SemanticModel.GetTypeInfo(elementAccess.Expression, CancellationToken); 1247var typeInfo = SemanticModel.GetTypeInfo(propertyDeclaration.Type);
CSharpTypeStyleHelper.State.cs (3)
78var declaredTypeSymbol = semanticModel.GetTypeInfo(variableDeclaration.Type.StripRefIfNeeded(), cancellationToken).Type; 96? IsMadeOfSpecialTypes(semanticModel.GetTypeInfo(typeSyntax.StripRefIfNeeded()).Type) 136semanticModel.GetTypeInfo(typeSyntax).Type?.IsSpecialType() == true;
CSharpUseExplicitTypeHelper.cs (2)
149var declaredType = semanticModel.GetTypeInfo(typeName.StripRefIfNeeded(), cancellationToken).Type; 156var initializerTypeInfo = semanticModel.GetTypeInfo(initializer, cancellationToken);
CSharpUseImplicitTypeHelper.cs (3)
195var declarationType = semanticModel.GetTypeInfo(declarationTypeNode, cancellationToken).Type; 293var declaredType = semanticModel.GetTypeInfo(typeName.StripRefIfNeeded(), cancellationToken).Type; 332var initializerType = semanticModel.GetTypeInfo(expression, cancellationToken).Type;
DefaultExpressionSyntaxExtensions.cs (2)
52var entityType = semanticModel.GetTypeInfo(typeSyntax, cancellationToken).Type; 53var defaultType = semanticModel.GetTypeInfo(defaultExpression.Type, cancellationToken).Type;
InternalExtensions.cs (2)
28var typeInfo = semanticModel.GetTypeInfo(decl.Type, cancellationToken); 35var typeInfo = semanticModel.GetTypeInfo(expression, cancellationToken);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs\TypeSyntaxExtensions.cs (1)
38var type = semanticModel.GetTypeInfo(typeSyntax).Type;
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
689var typeInfo = semanticModel.GetTypeInfo(memberAccessExpression.Expression, cancellationToken);
ParenthesizedExpressionSyntaxExtensions.cs (1)
76if (semanticModel.GetTypeInfo(varDecl.Type, cancellationToken).Type is
Recommendations\CSharpRecommendationServiceRunner.cs (5)
66explicitLambdaParameterType = _context.SemanticModel.GetTypeInfo(parameter.Type, _cancellationToken).Type; 370var container = _context.SemanticModel.GetTypeInfo(expression, _cancellationToken).Type; 393var container = _context.SemanticModel.GetTypeInfo(expression, _cancellationToken).Type; 406var container = _context.SemanticModel.GetTypeInfo(expression, _cancellationToken).Type; 563: semanticModel.GetTypeInfo(originalExpression, _cancellationToken).Type;
SemanticModelExtensions.cs (2)
113var typeInfo = semanticModel.GetTypeInfo(qualifier, cancellationToken); 414var info = semanticModel.GetTypeInfo(expression, cancellationToken);
Simplification\CSharpSimplificationService.Expander.cs (4)
80var objectCreationType = _semanticModel.GetTypeInfo(objectCreationExpression).Type; 269var argumentType = _semanticModel.GetTypeInfo(node.Expression).ConvertedType; 799var typeinfo = semanticModel.GetTypeInfo(argument.Expression); 1024var type = semanticModel.GetTypeInfo(typeOfExpression.Type, _cancellationToken).Type as INamedTypeSymbol;
Simplification\Reducers\CSharpNullableAnnotationReducer.cs (1)
53var type = semanticModel.GetTypeInfo(node, cancellationToken).Type;
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (3)
157var type = semanticModel.GetTypeInfo(node, cancellationToken).Type; 171var type = semanticModel.GetTypeInfo(node, cancellationToken).Type; 393semanticModel.GetTypeInfo(invocationExpr).Type.SpecialType == SpecialType.System_String;
Simplification\Simplifiers\NameSimplifier.cs (1)
250var type = semanticModel.GetTypeInfo(name, cancellationToken).Type;
SpeculationAnalyzer.cs (8)
370var originalExpressionTypeInfo = this.OriginalSemanticModel.GetTypeInfo(originalExpression, this.CancellationToken); 371var newExpressionTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression, this.CancellationToken); 478var originalExprType = this.OriginalSemanticModel.GetTypeInfo(originalSwitchExpression.GoverningExpression, CancellationToken); 479var replacedExprType = this.SpeculativeSemanticModel.GetTypeInfo(replacedSwitchExpression.GoverningExpression, CancellationToken); 548var originalExpressionType = this.OriginalSemanticModel.GetTypeInfo(originalAnonymousObjectMemberDeclarator.Expression, this.CancellationToken).Type; 549var newExpressionType = this.SpeculativeSemanticModel.GetTypeInfo(replacedAnonymousObjectMemberDeclarator.Expression, this.CancellationToken).Type; 685var originalConvertedType = this.OriginalSemanticModel.GetTypeInfo(originalIsOrAsExpression.Right).Type; 686var newConvertedType = this.SpeculativeSemanticModel.GetTypeInfo(newIsOrAsExpression.Right).Type;
TypeStyleHelper.cs (1)
129var containingType = semanticModel.GetTypeInfo(containingTypeName, cancellationToken).Type;
Microsoft.VisualStudio.LanguageServices.CSharp (8)
CodeModel\CSharpCodeModelService.cs (2)
3783var typeInfo = semanticModel.GetTypeInfo(type.Type, CancellationToken.None); 3871var typeInfo = semanticModel.GetTypeInfo(type.Type, CancellationToken.None);
CodeModel\MethodXml\MethodXmlBuilder.cs (5)
144var typeSymbol = SemanticModel.GetTypeInfo(type).Type; 255var type = SemanticModel.GetTypeInfo(expression).Type; 375var type = SemanticModel.GetTypeInfo(castExpression.Type).Type; 414var type = SemanticModel.GetTypeInfo(arrayCreationExpression).Type; 569var type = SemanticModel.GetTypeInfo(typeOfExpression.Type).Type;
LanguageService\CSharpHelpContextService.cs (1)
164symbol = semanticModel.GetSymbolInfo(genericName, cancellationToken).Symbol ?? semanticModel.GetTypeInfo(genericName, cancellationToken).Type;