1 write to Expression
Microsoft.CodeAnalysis.Features (1)
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
66
Expression
= await document.Document.TryGetRelevantNodeAsync<TExpressionSyntax>(textSpan, cancellationToken).ConfigureAwait(false);
18 references to Expression
Microsoft.CodeAnalysis.Features (18)
IntroduceVariable\AbstractIntroduceVariableService.State.cs (18)
67
if (
Expression
== null || CodeRefactoringHelpers.IsNodeUnderselected(
Expression
, textSpan))
71
if (IsInitializerOfConstant(document,
Expression
))
76
if (syntaxFacts.IsThisExpression(
Expression
))
79
var expressionType = Document.SemanticModel.GetTypeInfo(
Expression
, cancellationToken).Type;
85
!Document.SemanticModel.GetConstantValue(
Expression
, cancellationToken).HasValue)
90
var containingType =
Expression
.AncestorsAndSelf()
103
IsConstant = IsExpressionConstant(Document,
Expression
, _service, cancellationToken);
129
var enclosingBlocks = _service.GetContainingExecutableBlocks(
Expression
);
149
if (_service.IsInExpressionBodiedMember(
Expression
))
160
if (_service.IsInAutoPropertyInitializer(
Expression
))
241
_semanticMap ??= Document.SemanticModel.GetSemanticMap(
Expression
, cancellationToken);
249
if (!_service.CanIntroduceVariableFor(
Expression
))
254
if (isSpanEmpty &&
Expression
is TNameSyntax)
260
if (
Expression
is TTypeSyntax and not TNameSyntax)
275
return semanticFacts.CanReplaceWithRValue(Document.SemanticModel,
Expression
, cancellationToken);
286
var syntax =
Expression
.GetAncestor<TSyntax>();
292
if (
Expression
.GetAncestorOrThis<TTypeDeclarationSyntax>() != null)