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