Implemented interface member:
property
SpeculativeSemanticModel
Microsoft.CodeAnalysis.Shared.Utilities.ISpeculationAnalyzer.SpeculativeSemanticModel
49 references to SpeculativeSemanticModel
Microsoft.CodeAnalysis.CodeStyle (25)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (25)
267var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 291var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 302return ConversionsAreCompatible(this.OriginalSemanticModel, originalExpression, this.SpeculativeSemanticModel, newExpression); 325var newSymbolInfo = this.SpeculativeSemanticModel.GetSymbolInfo(newNode); 521if (this.SpeculativeSemanticModel == null) 562if (this.SpeculativeSemanticModel == null) 633var newTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression); 679var replacedIsStaticAccess = IsStaticAccess(this.SpeculativeSemanticModel.GetSymbolInfo(newExpression, CancellationToken).Symbol); 736var replacedExpressionSymbol = this.SpeculativeSemanticModel.GetSymbolInfo(currentReplacedNode).Symbol; 741var previousReplacedType = this.SpeculativeSemanticModel.GetTypeInfo(previousReplacedNode).Type; 767var newAttributeSym = this.SpeculativeSemanticModel.GetSymbolInfo(newAttribute).Symbol; 781GetForEachSymbols(this.SpeculativeSemanticModel, newForEachStatement, out var newGetEnumerator, out var newElementType, out var newLocalVariables); 799!ForEachConversionsAreCompatible(this.OriginalSemanticModel, forEachStatement, this.SpeculativeSemanticModel, newForEachStatement) || 826var expressionType = this.SpeculativeSemanticModel.GetTypeInfo(newForEachStatementExpression, CancellationToken).ConvertedType; 851var newThrowExpressionType = this.SpeculativeSemanticModel.GetTypeInfo(newThrowExpression).Type; 855newThrowExpressionType.IsOrDerivesFromExceptionType(this.SpeculativeSemanticModel.Compilation); 865newSymbol = this.SpeculativeSemanticModel.GetSymbolInfo(newType, CancellationToken).Symbol; 894var newSymbolInfo = this.SpeculativeSemanticModel.GetSymbolInfo(node: newExpression); 906IsReceiverNonUniquePossibleValueTypeParam(newExpression, this.SpeculativeSemanticModel)) 931symbol, newSymbol, expression, newExpression, this.SpeculativeSemanticModel)) 964var newTargetType = this.SpeculativeSemanticModel.GetTypeInfo(newLeft).Type; 1206this.SpeculativeSemanticModel.GetTypeInfo(newExpression).Type != null) 1209newConversion = ClassifyConversion(this.SpeculativeSemanticModel, newExpression, newTargetType); 1219var newConvertedTypeSymbol = this.SpeculativeSemanticModel.GetTypeInfo(newExpression).ConvertedType; 1222newConversion = ClassifyConversion(this.SpeculativeSemanticModel, newConvertedTypeSymbol, newTargetType);
Microsoft.CodeAnalysis.CSharp.CodeStyle (23)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
210var rewrittenSemanticModel = analyzer.SpeculativeSemanticModel;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
166var conversion = speculationAnalyzer.SpeculativeSemanticModel.GetConversion(speculationAnalyzer.ReplacedExpression, cancellationToken); 180var replacedTypeInfo = speculationAnalyzer.SpeculativeSemanticModel.GetTypeInfo(speculationAnalyzer.ReplacedExpression, cancellationToken);
src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (1)
90analyzer.SpeculativeSemanticModel.GetSymbolInfo(analyzer.ReplacedExpression, cancellationToken).Symbol is not IMethodSymbol implicitLambdaMethod)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1563var rewrittenSemanticModel = analyzer.SpeculativeSemanticModel;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (18)
268var replacedParamType = this.SpeculativeSemanticModel.GetDeclaredSymbol(replacedParam).Type; 384var newExpressionTypeInfo = this.SpeculativeSemanticModel.GetTypeInfo(newExpression, this.CancellationToken); 397this.SpeculativeSemanticModel.GetConversion(newExpression, this.CancellationToken).IsConditionalExpression) 410var newConversion = this.SpeculativeSemanticModel.ClassifyConversion(newOtherPartOfConditional, newExpressionType); 436var newCaseType = this.SpeculativeSemanticModel.GetTypeInfo(previousReplacedNode, this.CancellationToken).Type; 445var newConversion = this.SpeculativeSemanticModel.ClassifyConversion(newSwitchStatement.Expression, newCaseType); 492var replacedExprType = this.SpeculativeSemanticModel.GetTypeInfo(replacedSwitchExpression.GoverningExpression, CancellationToken); 548var newExpressionConvertedTypeConversion = this.SpeculativeSemanticModel.ClassifyConversion(previousReplacedNode, newExpressionTypeInfo.ConvertedType); 562var newExpressionType = this.SpeculativeSemanticModel.GetTypeInfo(replacedAnonymousObjectMemberDeclarator.Expression, this.CancellationToken).Type; 569var newSymbol = this.SpeculativeSemanticModel.GetSymbolInfo(newCtorInitializer, CancellationToken).Symbol; 576var newSymbol = this.SpeculativeSemanticModel.GetCollectionInitializerSymbolInfo(newInitializer, CancellationToken).Symbol; 703var newConvertedType = this.SpeculativeSemanticModel.GetTypeInfo(newIsOrAsExpression.Right).Type; 711var newConversion = this.SpeculativeSemanticModel.ClassifyConversion(newIsOrAsExpression.Left, newConvertedType, isExplicitInSource: true); 736var newClauseInfo = this.SpeculativeSemanticModel.GetQueryClauseInfo(newClause, this.CancellationToken); 775this.SpeculativeSemanticModel.GetConversion(newExpression).IsConditionalExpression) 784this.SpeculativeSemanticModel.GetConversion(newExpression).IsSwitchExpression && 794this.SpeculativeSemanticModel.GetConversion(newExpression).IsCollectionExpression) 803this.SpeculativeSemanticModel.GetConversion(newExpression).IsTupleLiteralConversion &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
134var speculativeSemanticModel = specAnalyzer.SpeculativeSemanticModel;