185 references to GetFirstToken
Microsoft.CodeAnalysis.CSharp (22)
Binder\Binder_Constraints.cs (3)
201
diagnostics.Add(ErrorCode.ERR_NewBoundWithVal, syntax.
GetFirstToken
().GetLocation());
205
diagnostics.Add(ErrorCode.ERR_NewBoundWithUnmanaged, syntax.
GetFirstToken
().GetLocation());
210
diagnostics.Add(ErrorCode.ERR_NewBoundMustBeLast, syntax.
GetFirstToken
().GetLocation());
Binder\Binder_Expressions.cs (3)
815
var firstToken = node.
GetFirstToken
();
824
var firstToken = node.
GetFirstToken
();
831
var firstToken = node.
GetFirstToken
();
Binder\Binder_Operators.cs (2)
4203
diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenFalse.
GetFirstToken
().GetLocation());
4208
diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenTrue.
GetFirstToken
().GetLocation());
Binder\Binder_QueryErrors.cs (1)
210
symbols), queryClause.
GetFirstToken
().GetLocation());
Binder\Binder_Statements.cs (1)
1429
MessageID.IDS_FeatureRefReassignment.CheckFeatureAvailability(diagnostics, node.Right, node.Right.
GetFirstToken
().GetLocation());
Compilation\MemberSemanticModel.cs (1)
408
if (LookupPosition.IsBetweenTokens(position, start, foreachStmt.Statement.
GetFirstToken
()))
Declarations\DeclarationTreeBuilder.cs (1)
169
nameLocation: new SourceLocation(firstGlobalStatement.
GetFirstToken
()),
Symbols\Source\SourceMethodSymbol.cs (1)
35
var refKeyword = returnTypeSyntax.
GetFirstToken
();
Syntax\CompilationUnitSyntax.cs (3)
27
var firstToken = (SyntaxNodeOrToken)this.
GetFirstToken
(includeZeroWidth: true);
40
var firstToken = (SyntaxNodeOrToken)this.
GetFirstToken
(includeZeroWidth: true);
56
var firstToken = this.
GetFirstToken
(includeZeroWidth: true);
Syntax\CSharpSyntaxNode.cs (1)
167
var firstToken = this.
GetFirstToken
(includeZeroWidth: true);
Syntax\LookupPosition.cs (5)
222
var firstNameToken = explicitInterfaceSpecifier == null ? methodDecl.Identifier : explicitInterfaceSpecifier.
GetFirstToken
();
326
return statement.
GetFirstToken
();
351
return ((SwitchStatementSyntax)statement).Expression.
GetFirstToken
();
366
return statement.
GetFirstToken
();
479
firstIncluded = body.
GetFirstToken
(includeZeroWidth: true);
Microsoft.CodeAnalysis.CSharp.CodeStyle (39)
ConvertProgramAnalysis_ProgramMain.cs (2)
68
return root.Members.OfType<GlobalStatementSyntax>().First().
GetFirstToken
().GetLocation();
72
var lastPragma = root.
GetFirstToken
().LeadingTrivia.LastOrDefault(t => t.Kind() is SyntaxKind.PragmaWarningDirectiveTrivia);
CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
124
localDeclarationStatement.
GetFirstToken
().GetLocation(),
EmbeddedStatementPlacementDiagnosticAnalyzer.cs (2)
75
statement.
GetFirstToken
().GetLocation(),
95
var statementStartToken = statement.
GetFirstToken
();
ExpressionSyntaxExtensions.cs (1)
74
var firstToken = expression.
GetFirstToken
();
FormattingHelpers.cs (2)
384
queryExpression.
GetFirstToken
().Equals(token);
492
return (node.
GetFirstToken
(includeZeroWidth: true), node.GetLastToken(includeZeroWidth: true));
IndentBlockFormattingRule.cs (4)
124
var startToken = section.Statements.First().
GetFirstToken
(includeZeroWidth: true);
176
SetAlignmentBlockOperation(list, switchExpression.
GetFirstToken
(), switchExpression.OpenBraceToken, switchExpression.CloseBraceToken, IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine);
179
SetAlignmentBlockOperation(list, withExpression.
GetFirstToken
(), withExpression.Initializer.OpenBraceToken, withExpression.Initializer.CloseBraceToken, IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine);
335
var firstToken = statement.
GetFirstToken
(includeZeroWidth: true);
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
179
var previousToken = expressionStatement.
GetFirstToken
().GetPreviousToken();
ParenthesizedExpressionSyntaxExtensions.cs (2)
46
var tokenBeforeParen = node.
GetFirstToken
().GetPreviousToken();
47
var tokenAfterParen = node.Expression.
GetFirstToken
();
QueryExpressionFormattingRule.cs (5)
47
AddSuppressWrappingIfOnSingleLineOperation(list, queryExpression.
GetFirstToken
(includeZeroWidth: true), queryExpression.GetLastToken(includeZeroWidth: true));
75
var startToken = fromClause.Expression.
GetFirstToken
(includeZeroWidth: true);
99
var baseToken = queryExpression.
GetFirstToken
(includeZeroWidth: true);
116
var firstToken = queryClause.
GetFirstToken
(includeZeroWidth: true);
123
var firstToken = selectOrGroupClause.
GetFirstToken
(includeZeroWidth: true);
StatementSyntaxExtensions.cs (1)
20
var previousToken = statement.
GetFirstToken
().GetPreviousToken();
SuppressFormattingRule.cs (9)
98
AddSuppressWrappingIfOnSingleLineOperation(list, casePattern.
GetFirstToken
(), casePattern.GetLastToken());
106
AddSuppressWrappingIfOnSingleLineOperation(list, isPattern.
GetFirstToken
(), isPattern.GetLastToken());
143
AddSuppressWrappingIfOnSingleLineOperation(list, whileStatementNode.
GetFirstToken
(includeZeroWidth: true), whileStatementNode.Statement.GetLastToken(includeZeroWidth: true));
164
attributes[i].
GetFirstToken
(includeZeroWidth: true),
187
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.
GetFirstToken
(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true));
197
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[i].
GetFirstToken
(includeZeroWidth: true), switchSection.Labels[i].GetLastToken(includeZeroWidth: true));
204
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[switchSection.Labels.Count - 1].
GetFirstToken
(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true));
270
var firstToken = statementNode.
GetFirstToken
(includeZeroWidth: true);
332
: endDirective.
GetFirstToken
(includeDirectives: true);
TypeSyntaxComparer.cs (2)
43
return _tokenComparer.Compare(x.
GetFirstToken
(includeSkipped: true), y.
GetFirstToken
());
UsingsAndExternAliasesOrganizer.cs (2)
86
var name1 = using1.Name.
GetFirstToken
().ValueText;
87
var name2 = using2.Name.
GetFirstToken
().ValueText;
WrappingFormattingRule.cs (5)
71
var firstTokenOfEmbeddedStatement = embeddedStatement.
GetFirstToken
(includeZeroWidth: true);
85
SwitchSectionSyntax switchSection => (switchSection.
GetFirstToken
(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true)),
107
var firstToken = statementNode.
GetFirstToken
(includeZeroWidth: true);
117
var firstToken = statementNode.
GetFirstToken
(includeZeroWidth: true);
132
RemoveSuppressOperation(list, ifStatementNode.Else.ElseKeyword, ifStatementNode.Else.Statement.
GetFirstToken
(includeZeroWidth: true));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (16)
CompilationUnitSyntaxExtensions.cs (1)
70
? root.Members.First().
GetFirstToken
().Span.End
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (3)
226
(tokensForLeadingTrivia: new[] { s.Labels[0].
GetFirstToken
(), s.Labels[0].GetLastToken() },
227
tokensForTrailingTrivia: new[] { s.Statements[0].
GetFirstToken
(), s.Statements[0].GetLastToken() },
240
(tokensForLeadingTrivia: new[] { nextStatement.
GetFirstToken
() },
CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
112
var endToken = sourceText.AreOnSameLine(conditional.ColonToken, conditional.WhenFalse.
GetFirstToken
())
CSharpIndentationService.cs (1)
182
var startToken = section.Statements.First().
GetFirstToken
(includeZeroWidth: true);
CSharpIndentationService.Indenter.cs (2)
189
token = token.GetAncestor<LabeledStatementSyntax>()!.
GetFirstToken
(includeZeroWidth: true).GetPreviousToken(includeZeroWidth: true);
420
var clauseToken = clause.
GetFirstToken
(includeZeroWidth: true);
CSharpInlineDeclarationCodeFixProvider.cs (3)
136
var localDeclarationToken = localDeclarationStatement.
GetFirstToken
();
213
if (sourceText.AreOnSameLine(declarator.
GetFirstToken
(), declarator.
GetFirstToken
().GetPreviousToken(includeSkipped: true)))
CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
174
var firstToken = resultCompilationUnit.
GetFirstToken
();
213
var firstToken = resultNamespace.Members.First().
GetFirstToken
();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
1358
return IsAtStartOfPattern(syntaxTree, parenthesizedExpression.
GetFirstToken
().GetPreviousToken(), parenthesizedExpression.SpanStart);
MisplacedUsingDirectivesCodeFixProvider.cs (1)
433
var firstToken = compilationUnit.
GetFirstToken
(includeZeroWidth: true);
MultiLineConditionalExpressionFormattingRule.cs (1)
66
var baseToken = statement.
GetFirstToken
();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
609
&& IsTokenPartOfExpression(switchStatementNode.
GetFirstToken
().GetPreviousToken()))
DecompiledSource\CSharpDecompiledSourceFormattingRule.cs (1)
46
if (previousStatement.GetLastToken() != previousToken || nextStatement.
GetFirstToken
() != currentToken)
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
269
return stringExpressionBeforePaste.
GetFirstToken
().GetPreferredIndentation(documentBeforePaste, indentationOptions, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Features (40)
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
96
var tokenBeforeType = typeNode.
GetFirstToken
().GetPreviousToken();
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
71
nextToken = typeSyntax.
GetFirstToken
().GetPreviousToken();
Completion\KeywordRecommenders\CheckedKeywordRecommender.cs (1)
44
var firstSpecifierToken = previousPossiblySkippedToken.GetRequiredAncestor<ExplicitInterfaceSpecifierSyntax>().
GetFirstToken
(includeSkipped: true);
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
111
SyntaxNodeOrTokenExtensions.GetTrivia(forEachStatement.Type.
GetFirstToken
())
171
SyntaxNodeOrTokenExtensions.GetTrivia(forEachStatement.Type.
GetFirstToken
())
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
129
var fileBanner = root.GetFirstToken() == namespaceDeclaration.
GetFirstToken
()
ConvertProgramAnalysis_ProgramMain.cs (2)
68
return root.Members.OfType<GlobalStatementSyntax>().First().
GetFirstToken
().GetLocation();
72
var lastPragma = root.
GetFirstToken
().LeadingTrivia.LastOrDefault(t => t.Kind() is SyntaxKind.PragmaWarningDirectiveTrivia);
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (3)
226
(tokensForLeadingTrivia: new[] { s.Labels[0].
GetFirstToken
(), s.Labels[0].GetLastToken() },
227
tokensForTrailingTrivia: new[] { s.Statements[0].
GetFirstToken
(), s.Statements[0].GetLastToken() },
240
(tokensForLeadingTrivia: new[] { nextStatement.
GetFirstToken
() },
CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
112
var endToken = sourceText.AreOnSameLine(conditional.ColonToken, conditional.WhenFalse.
GetFirstToken
())
CSharpInlineDeclarationCodeFixProvider.cs (3)
136
var localDeclarationToken = localDeclarationStatement.
GetFirstToken
();
213
if (sourceText.AreOnSameLine(declarator.
GetFirstToken
(), declarator.
GetFirstToken
().GetPreviousToken(includeSkipped: true)))
CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
124
localDeclarationStatement.
GetFirstToken
().GetLocation(),
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (2)
81
=> member.
GetFirstToken
().LeadingTrivia.Any(t => t is (kind: SyntaxKind.SingleLineDocumentationCommentTrivia or SyntaxKind.MultiLineDocumentationCommentTrivia));
85
var firstToken = member.
GetFirstToken
();
EmbeddedStatementPlacementDiagnosticAnalyzer.cs (2)
75
statement.
GetFirstToken
().GetLocation(),
95
var statementStartToken = statement.
GetFirstToken
();
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
64
var firstToken = firstStatement.
GetFirstToken
(includeZeroWidth: true);
ExtractMethod\CSharpSelectionValidator.cs (4)
153
return AssignFinalSpan(selectionInfo.With(s => s.FirstTokenInFinalSpan = assign.Right.
GetFirstToken
(includeZeroWidth: true))
385
.With(s => s.FirstTokenInFinalSpan = expression.
GetFirstToken
(includeZeroWidth: true))
391
.With(s => s.FirstTokenInFinalSpan = statement1.
GetFirstToken
(includeZeroWidth: true))
396
return selectionInfo.With(s => s.FirstTokenInFinalSpan = statement1.
GetFirstToken
(includeZeroWidth: true))
InheritanceMargin\CSharpInheritanceMarginService.cs (1)
76
ConversionOperatorDeclarationSyntax conversionOperatorDeclarationNode => conversionOperatorDeclarationNode.Type.
GetFirstToken
(),
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (1)
140
var isSingleLine = sourceText.AreOnSameLine(ifNode.
GetFirstToken
(), ifNode.GetLastToken());
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
179
var previousToken = expressionStatement.
GetFirstToken
().GetPreviousToken();
MisplacedUsingDirectivesCodeFixProvider.cs (1)
433
var firstToken = compilationUnit.
GetFirstToken
(includeZeroWidth: true);
MultiLineConditionalExpressionFormattingRule.cs (1)
66
var baseToken = statement.
GetFirstToken
();
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (1)
143
position = targetExpression.
GetFirstToken
().SpanStart;
Structure\CSharpStructureHelpers.cs (5)
300
FieldDeclarationSyntax fieldDeclaration => fieldDeclaration.Modifiers.FirstOrNull() ?? fieldDeclaration.Declaration.
GetFirstToken
(),
301
IndexerDeclarationSyntax indexerDeclaration => indexerDeclaration.Modifiers.FirstOrNull() ?? indexerDeclaration.Type.
GetFirstToken
(),
302
MethodDeclarationSyntax methodDeclaration => methodDeclaration.Modifiers.FirstOrNull() ?? methodDeclaration.ReturnType.
GetFirstToken
(),
303
OperatorDeclarationSyntax operatorDeclaration => operatorDeclaration.Modifiers.FirstOrNull() ?? operatorDeclaration.ReturnType.
GetFirstToken
(),
304
PropertyDeclarationSyntax propertyDeclaration => propertyDeclaration.Modifiers.FirstOrNull() ?? propertyDeclaration.Type.
GetFirstToken
(),
Structure\Providers\BlockSyntaxStructureProvider.cs (1)
97
var previousToken = node.
GetFirstToken
().GetPreviousToken();
Wrapping\SeparatedSyntaxList\CSharpArgumentWrapper.cs (3)
68
var startToken = listSyntax.
GetFirstToken
();
78
startToken = name == null ? listSyntax.
GetFirstToken
() : name.
GetFirstToken
();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\UnsafeTests.cs (1)
5543
foreach (var declarationSyntax in tree.GetCompilationUnitRoot().DescendantTokens().OfType<VariableDeclarationSyntax>().Where(syntax => syntax.
GetFirstToken
().IsKind(SyntaxKind.VoidKeyword)))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Parsing\ParsingErrorRecoveryTests.cs (1)
5776
Assert.Equal(SyntaxKind.ReturnKeyword, getBodyStmts[0].
GetFirstToken
().Kind());
Syntax\SyntaxNodeTests.cs (10)
858
Assert.False(tree.GetCompilationUnitRoot().
GetFirstToken
().IsIncrementallyIdenticalTo(tree.GetCompilationUnitRoot().
GetFirstToken
().GetNextToken()));
867
Assert.True(tree1.GetCompilationUnitRoot().
GetFirstToken
().IsIncrementallyIdenticalTo(tree2.GetCompilationUnitRoot().
GetFirstToken
()));
920
var first = tree.GetCompilationUnitRoot().
GetFirstToken
();
928
var first = tree.GetCompilationUnitRoot().
GetFirstToken
(includeZeroWidth: true);
983
var token = tree.GetCompilationUnitRoot().
GetFirstToken
(includeSkipped: true);
1013
var token = tree.GetCompilationUnitRoot().
GetFirstToken
(includeSkipped: true);
1038
var token = tree.GetCompilationUnitRoot().
GetFirstToken
(includeSkipped: false);
1189
var token = tree.GetCompilationUnitRoot().
GetFirstToken
(includeZeroWidth: true);
Microsoft.CodeAnalysis.CSharp.Workspaces (47)
CSharpIndentationService.cs (1)
182
var startToken = section.Statements.First().
GetFirstToken
(includeZeroWidth: true);
CSharpIndentationService.Indenter.cs (2)
189
token = token.GetAncestor<LabeledStatementSyntax>()!.
GetFirstToken
(includeZeroWidth: true).GetPreviousToken(includeZeroWidth: true);
420
var clauseToken = clause.
GetFirstToken
(includeZeroWidth: true);
CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
174
var firstToken = resultCompilationUnit.
GetFirstToken
();
213
var firstToken = resultNamespace.Members.First().
GetFirstToken
();
Formatting\TypingFormattingRule.cs (1)
84
if (FormattingRangeHelper.AreTwoTokensOnSameLine(firstTokenOfNode, firstStatement.
GetFirstToken
()))
FormattingHelpers.cs (2)
384
queryExpression.
GetFirstToken
().Equals(token);
492
return (node.
GetFirstToken
(includeZeroWidth: true), node.GetLastToken(includeZeroWidth: true));
IndentBlockFormattingRule.cs (4)
124
var startToken = section.Statements.First().
GetFirstToken
(includeZeroWidth: true);
176
SetAlignmentBlockOperation(list, switchExpression.
GetFirstToken
(), switchExpression.OpenBraceToken, switchExpression.CloseBraceToken, IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine);
179
SetAlignmentBlockOperation(list, withExpression.
GetFirstToken
(), withExpression.Initializer.OpenBraceToken, withExpression.Initializer.CloseBraceToken, IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine);
335
var firstToken = statement.
GetFirstToken
(includeZeroWidth: true);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (1)
74
var firstToken = expression.
GetFirstToken
();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs\CompilationUnitSyntaxExtensions.cs (1)
70
? root.Members.First().
GetFirstToken
().Span.End
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
1358
return IsAtStartOfPattern(syntaxTree, parenthesizedExpression.
GetFirstToken
().GetPreviousToken(), parenthesizedExpression.SpanStart);
ParenthesizedExpressionSyntaxExtensions.cs (2)
46
var tokenBeforeParen = node.
GetFirstToken
().GetPreviousToken();
47
var tokenAfterParen = node.Expression.
GetFirstToken
();
QueryExpressionFormattingRule.cs (5)
47
AddSuppressWrappingIfOnSingleLineOperation(list, queryExpression.
GetFirstToken
(includeZeroWidth: true), queryExpression.GetLastToken(includeZeroWidth: true));
75
var startToken = fromClause.Expression.
GetFirstToken
(includeZeroWidth: true);
99
var baseToken = queryExpression.
GetFirstToken
(includeZeroWidth: true);
116
var firstToken = queryClause.
GetFirstToken
(includeZeroWidth: true);
123
var firstToken = selectOrGroupClause.
GetFirstToken
(includeZeroWidth: true);
Simplification\CSharpSimplificationService.Expander.cs (3)
500
var firstReplacementToken = replacement.
GetFirstToken
(true, false, true, true);
501
var firstOriginalToken = originalSimpleName.
GetFirstToken
(true, false, true, true);
1108
.WithLeadingTrivia(thisExpression.
GetFirstToken
().LeadingTrivia);
Simplification\Reducers\CSharpMiscellaneousReducer.cs (2)
156
if (!FormattingRangeHelper.AreTwoTokensOnSameLine(node.Statements[0].
GetFirstToken
(), node.Statements[0].GetLastToken()))
162
if (!FormattingRangeHelper.AreTwoTokensOnSameLine(node.Parent.GetFirstToken(), node.
GetFirstToken
().GetPreviousToken()))
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
181
aliasReplacement = GetAliasForSymbol((INamespaceOrTypeSymbol)symbol, node.
GetFirstToken
(), semanticModel, cancellationToken);
StatementSyntaxExtensions.cs (1)
20
var previousToken = statement.
GetFirstToken
().GetPreviousToken();
SuppressFormattingRule.cs (9)
98
AddSuppressWrappingIfOnSingleLineOperation(list, casePattern.
GetFirstToken
(), casePattern.GetLastToken());
106
AddSuppressWrappingIfOnSingleLineOperation(list, isPattern.
GetFirstToken
(), isPattern.GetLastToken());
143
AddSuppressWrappingIfOnSingleLineOperation(list, whileStatementNode.
GetFirstToken
(includeZeroWidth: true), whileStatementNode.Statement.GetLastToken(includeZeroWidth: true));
164
attributes[i].
GetFirstToken
(includeZeroWidth: true),
187
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.
GetFirstToken
(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true));
197
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[i].
GetFirstToken
(includeZeroWidth: true), switchSection.Labels[i].GetLastToken(includeZeroWidth: true));
204
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[switchSection.Labels.Count - 1].
GetFirstToken
(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true));
270
var firstToken = statementNode.
GetFirstToken
(includeZeroWidth: true);
332
: endDirective.
GetFirstToken
(includeDirectives: true);
TypeSyntaxComparer.cs (2)
43
return _tokenComparer.Compare(x.
GetFirstToken
(includeSkipped: true), y.
GetFirstToken
());
UsingsAndExternAliasesOrganizer.cs (2)
86
var name1 = using1.Name.
GetFirstToken
().ValueText;
87
var name2 = using2.Name.
GetFirstToken
().ValueText;
WrappingFormattingRule.cs (5)
71
var firstTokenOfEmbeddedStatement = embeddedStatement.
GetFirstToken
(includeZeroWidth: true);
85
SwitchSectionSyntax switchSection => (switchSection.
GetFirstToken
(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true)),
107
var firstToken = statementNode.
GetFirstToken
(includeZeroWidth: true);
117
var firstToken = statementNode.
GetFirstToken
(includeZeroWidth: true);
132
RemoveSuppressOperation(list, ifStatementNode.Else.ElseKeyword, ifStatementNode.Else.Statement.
GetFirstToken
(includeZeroWidth: true));
Microsoft.VisualStudio.LanguageServices.CSharp (6)
CodeModel\CSharpCodeModelService.cs (1)
3305
var firstToken = newMember.
GetFirstToken
();
CodeModel\CSharpCodeModelService.NodeLocator.cs (5)
262
startPosition = node.
GetFirstToken
().SpanStart;
332
startPosition = node.
GetFirstToken
().SpanStart;
380
startPosition = node.
GetFirstToken
().SpanStart;
575
startPosition = node.
GetFirstToken
().SpanStart;
629
startPosition = node.
GetFirstToken
().SpanStart;