protected override SyntaxNode GetOutermostCallSiteContainerToProcess(CancellationToken cancellationToken) { var callSiteContainer = GetCallSiteContainerFromOutermostMoveInVariable(cancellationToken); if (callSiteContainer != null) { return(callSiteContainer); } else { var firstStatement = CSharpSelectionResult.GetFirstStatement(); return(firstStatement.Parent); } }
protected override SyntaxNode GetLastStatementOrInitializerSelectedAtCallSite() { // it is a single statement case. either first statement is same as last statement or // last statement belongs (embedded statement) to the first statement. return(CSharpSelectionResult.GetFirstStatement()); }
protected override SyntaxNode GetFirstStatementOrInitializerSelectedAtCallSite() => CSharpSelectionResult.GetFirstStatement();
protected override ImmutableArray <StatementSyntax> GetInitialStatementsForMethodDefinitions() { Contract.ThrowIfFalse(IsExtractMethodOnSingleStatement(CSharpSelectionResult)); return(ImmutableArray.Create(CSharpSelectionResult.GetFirstStatement())); }
protected override IEnumerable <StatementSyntax> GetInitialStatementsForMethodDefinitions() { Contract.ThrowIfFalse(IsExtractMethodOnSingleStatement(CSharpSelectionResult)); return(SpecializedCollections.SingletonEnumerable <StatementSyntax>(CSharpSelectionResult.GetFirstStatement())); }