19 references to GetCommonRoot
Microsoft.CodeAnalysis.CSharp.Features (6)
ExtractMethod\CSharpMethodExtractor.cs (1)
148
var lastExpression = selection.GetFirstTokenInSelection().
GetCommonRoot
(selection.GetLastTokenInSelection()).GetAncestors<ExpressionSyntax>().LastOrDefault();
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (1)
46
var scope = firstToken.
GetCommonRoot
(lastToken).GetAncestorOrThis<ExpressionSyntax>();
ExtractMethod\CSharpSelectionValidator.cs (4)
139
var expressionNode = selectionInfo.FirstTokenInFinalSpan.
GetCommonRoot
(selectionInfo.LastTokenInFinalSpan);
178
var node = selectionInfo.FirstTokenInFinalSpan.
GetCommonRoot
(selectionInfo.LastTokenInFinalSpan);
237
var commonRoot = firstTokenInSelection.
GetCommonRoot
(lastTokenInSelection);
299
var commonNode = selectionInfo.FirstTokenInFinalSpan.
GetCommonRoot
(selectionInfo.LastTokenInFinalSpan);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CSharpSmartTokenFormatter.cs (1)
52
var common = startToken.
GetCommonRoot
(endToken);
Microsoft.CodeAnalysis.Features (3)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
352
return startToken.
GetCommonRoot
(endToken);
ExtractMethod\SelectionValidator.cs (2)
110
var commonRoot = token1.
GetCommonRoot
(token2).GetAncestorOrThis<T>() ?? root;
170
var commonRoot = token1.
GetCommonRoot
(token2).GetAncestorOrThis<T>() ?? root;
Microsoft.CodeAnalysis.VisualBasic.Features (5)
ExtractMethod\VisualBasicMethodExtractor.vb (1)
63
Dim lastExpression = selection.GetFirstTokenInSelection().
GetCommonRoot
(selection.GetLastTokenInSelection()).GetAncestors(Of ExpressionSyntax)().LastOrDefault()
ExtractMethod\VisualBasicSelectionResult.vb (3)
125
Dim scope = first.
GetCommonRoot
(last).GetAncestorOrThis(Of ExpressionSyntax)()
232
Dim commonRoot = firstToken.
GetCommonRoot
(lastToken)
307
Dim node = first.
GetCommonRoot
(last)
ExtractMethod\VisualBasicSelectionValidator.vb (1)
233
Return token1.
GetCommonRoot
(token2)
Microsoft.CodeAnalysis.Workspaces (4)
AbstractFormatEngine.cs (1)
75
_commonRoot = startToken.
GetCommonRoot
(endToken) ?? throw ExceptionUtilities.Unreachable();
BaseIndentationFormattingRule.cs (1)
146
commonNode = token1.
GetCommonRoot
(token2);
FormattingContext.InitialContextFinder.cs (1)
68
var node = startToken.
GetCommonRoot
(endToken)!.GetParentWithBiggerSpan();
TokenData.cs (1)
98
var commonRoot = this.Token.
GetCommonRoot
(other.Token);