175 references to GetFirstToken
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_QueryErrors.cs (1)
210symbols), queryClause.GetFirstToken().GetLocation());
Syntax\CompilationUnitSyntax.cs (3)
27var firstToken = (SyntaxNodeOrToken)this.GetFirstToken(includeZeroWidth: true); 40var firstToken = (SyntaxNodeOrToken)this.GetFirstToken(includeZeroWidth: true); 56var firstToken = this.GetFirstToken(includeZeroWidth: true);
Syntax\CSharpSyntaxNode.cs (1)
168var firstToken = this.GetFirstToken(includeZeroWidth: true);
Syntax\LookupPosition.cs (1)
497firstIncluded = body.GetFirstToken(includeZeroWidth: true);
Microsoft.CodeAnalysis.CSharp.CodeStyle (44)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (2)
63return root.Members.OfType<GlobalStatementSyntax>().First().GetFirstToken().GetLocation(); 67var lastPragma = root.GetFirstToken().LeadingTrivia.LastOrDefault(t => t.Kind() is SyntaxKind.PragmaWarningDirectiveTrivia);
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
180var previousToken = expressionStatement.GetFirstToken().GetPreviousToken();
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (2)
76statement.GetFirstToken().GetLocation(), 97var statementStartToken = statement.GetFirstToken();
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (1)
211expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (2)
63expression.GetFirstToken().GetLocation(), 103expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
122localDeclarationStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfDiagnosticAnalyzer.cs (1)
76invocation.GetFirstToken().GetLocation(),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
84var firstToken = expression.GetFirstToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (2)
46var tokenBeforeParen = node.GetFirstToken().GetPreviousToken(); 47var tokenAfterParen = node.Expression.GetFirstToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\StatementSyntaxExtensions.cs (1)
20var previousToken = statement.GetFirstToken().GetPreviousToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (2)
384queryExpression.GetFirstToken().Equals(token); 494return (node.GetFirstToken(includeZeroWidth: true), node.GetLastToken(includeZeroWidth: true));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (4)
124var startToken = section.Statements.First().GetFirstToken(includeZeroWidth: true); 182SetAlignmentBlockOperation(list, switchExpression.GetFirstToken(), switchExpression.OpenBraceToken, switchExpression.CloseBraceToken, IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine); 185SetAlignmentBlockOperation(list, withExpression.GetFirstToken(), withExpression.Initializer.OpenBraceToken, withExpression.Initializer.CloseBraceToken, IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine); 358var firstToken = statement.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (1)
155&& switchExpressionArm.GetFirstToken() == currentToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\QueryExpressionFormattingRule.cs (5)
48AddSuppressWrappingIfOnSingleLineOperation(list, queryExpression.GetFirstToken(includeZeroWidth: true), queryExpression.GetLastToken(includeZeroWidth: true)); 76var startToken = fromClause.Expression.GetFirstToken(includeZeroWidth: true); 100var baseToken = queryExpression.GetFirstToken(includeZeroWidth: true); 117var firstToken = queryClause.GetFirstToken(includeZeroWidth: true); 124var firstToken = selectOrGroupClause.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (9)
99AddSuppressWrappingIfOnSingleLineOperation(list, casePattern.GetFirstToken(), casePattern.GetLastToken()); 107AddSuppressWrappingIfOnSingleLineOperation(list, isPattern.GetFirstToken(), isPattern.GetLastToken()); 144AddSuppressWrappingIfOnSingleLineOperation(list, whileStatementNode.GetFirstToken(includeZeroWidth: true), whileStatementNode.Statement.GetLastToken(includeZeroWidth: true)); 165attributes[i].GetFirstToken(includeZeroWidth: true), 188AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.GetFirstToken(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true)); 198AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[i].GetFirstToken(includeZeroWidth: true), switchSection.Labels[i].GetLastToken(includeZeroWidth: true)); 205AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[switchSection.Labels.Count - 1].GetFirstToken(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true)); 270var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 332: endDirective.GetFirstToken(includeDirectives: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\WrappingFormattingRule.cs (5)
72var firstTokenOfEmbeddedStatement = embeddedStatement.GetFirstToken(includeZeroWidth: true); 86SwitchSectionSyntax switchSection => (switchSection.GetFirstToken(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true)), 108var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 118var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 133RemoveSuppressOperation(list, ifStatementNode.Else.ElseKeyword, ifStatementNode.Else.Statement.GetFirstToken(includeZeroWidth: true));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (2)
43return _tokenComparer.Compare(x.GetFirstToken(includeSkipped: true), y.GetFirstToken());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
95var name1 = using1.Name.GetFirstToken().ValueText; 96var name2 = using2.Name.GetFirstToken().ValueText;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (14)
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
110var endToken = sourceText.AreOnSameLine(conditional.ColonToken, conditional.WhenFalse.GetFirstToken())
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (3)
124var localDeclarationToken = localDeclarationStatement.GetFirstToken(); 200if (sourceText.AreOnSameLine(declarator.GetFirstToken(), declarator.GetFirstToken().GetPreviousToken(includeSkipped: true)))
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
431var firstToken = compilationUnit.GetFirstToken(includeZeroWidth: true);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
554var expressionFirstToken = expression.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
185var firstToken = firstArgument.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\MultiLineConditionalExpressionFormattingRule.cs (1)
57var baseToken = statement.GetFirstToken();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (1)
59? root.Members.First().GetFirstToken().Span.End
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1372return IsAtStartOfPattern(syntaxTree, parenthesizedExpression.GetFirstToken().GetPreviousToken(), parenthesizedExpression.SpanStart);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.cs (1)
180var startToken = section.Statements.First().GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (1)
419var clauseToken = clause.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
187var firstToken = resultCompilationUnit.GetFirstToken(); 239var firstToken = resultNamespace.Members.First().GetFirstToken();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
601&& IsTokenPartOfExpression(switchStatementNode.GetFirstToken().GetPreviousToken()))
RawStringLiteral\RawStringLiteralCommandHandler_Return.cs (1)
167var indentation = expression.GetFirstToken().GetPreferredIndentation(parsedDocument, indentationOptions, cancellationToken);
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
258return stringExpressionBeforePaste.GetFirstToken().GetPreferredIndentation(documentBeforePaste, indentationOptions, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Features (43)
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
94var tokenBeforeType = typeNode.GetFirstToken().GetPreviousToken();
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
66nextToken = typeSyntax.GetFirstToken().GetPreviousToken();
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
111SyntaxNodeOrTokenExtensions.GetTrivia(forEachStatement.Type.GetFirstToken()) 171SyntaxNodeOrTokenExtensions.GetTrivia(forEachStatement.Type.GetFirstToken())
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
129var fileBanner = root.GetFirstToken() == namespaceDeclaration.GetFirstToken()
DecompiledSource\CSharpDecompiledSourceFormattingRule.cs (1)
45if (previousStatement.GetLastToken() != previousToken || nextStatement.GetFirstToken() != currentToken)
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (2)
79=> member.GetFirstToken().LeadingTrivia.Any(t => t is (kind: SyntaxKind.SingleLineDocumentationCommentTrivia or SyntaxKind.MultiLineDocumentationCommentTrivia)); 83var firstToken = member.GetFirstToken();
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
66var firstToken = firstStatement.GetFirstToken(includeZeroWidth: true);
ExtractMethod\CSharpSelectionValidator.cs (1)
128.With(s => s.FirstTokenInFinalSpan = assign.Right.GetFirstToken(includeZeroWidth: true))
InheritanceMargin\CSharpInheritanceMarginService.cs (1)
75ConversionOperatorDeclarationSyntax conversionOperatorDeclarationNode => conversionOperatorDeclarationNode.Type.GetFirstToken(),
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
472var priorToken = nextStatement.GetFirstToken().GetPreviousToken();
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (1)
139var isSingleLine = sourceText.AreOnSameLine(ifNode.GetFirstToken(), ifNode.GetLastToken());
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (1)
143position = targetExpression.GetFirstToken().SpanStart;
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (2)
63return root.Members.OfType<GlobalStatementSyntax>().First().GetFirstToken().GetLocation(); 67var lastPragma = root.GetFirstToken().LeadingTrivia.LastOrDefault(t => t.Kind() is SyntaxKind.PragmaWarningDirectiveTrivia);
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
180var previousToken = expressionStatement.GetFirstToken().GetPreviousToken();
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (2)
76statement.GetFirstToken().GetLocation(), 97var statementStartToken = statement.GetFirstToken();
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (1)
211expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (2)
63expression.GetFirstToken().GetLocation(), 103expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
122localDeclarationStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfDiagnosticAnalyzer.cs (1)
76invocation.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
110var endToken = sourceText.AreOnSameLine(conditional.ColonToken, conditional.WhenFalse.GetFirstToken())
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
226(tokensForLeadingTrivia: new[] { s.Labels[0].GetFirstToken(), s.Labels[0].GetLastToken() }, 227tokensForTrailingTrivia: new[] { s.Statements[0].GetFirstToken(), s.Statements[0].GetLastToken() },
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (3)
124var localDeclarationToken = localDeclarationStatement.GetFirstToken(); 200if (sourceText.AreOnSameLine(declarator.GetFirstToken(), declarator.GetFirstToken().GetPreviousToken(includeSkipped: true)))
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
431var firstToken = compilationUnit.GetFirstToken(includeZeroWidth: true);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
554var expressionFirstToken = expression.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
185var firstToken = firstArgument.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\MultiLineConditionalExpressionFormattingRule.cs (1)
57var baseToken = statement.GetFirstToken();
Structure\CSharpStructureHelpers.cs (5)
278FieldDeclarationSyntax fieldDeclaration => fieldDeclaration.Modifiers.FirstOrNull() ?? fieldDeclaration.Declaration.GetFirstToken(), 279IndexerDeclarationSyntax indexerDeclaration => indexerDeclaration.Modifiers.FirstOrNull() ?? indexerDeclaration.Type.GetFirstToken(), 280MethodDeclarationSyntax methodDeclaration => methodDeclaration.Modifiers.FirstOrNull() ?? methodDeclaration.ReturnType.GetFirstToken(), 281OperatorDeclarationSyntax operatorDeclaration => operatorDeclaration.Modifiers.FirstOrNull() ?? operatorDeclaration.ReturnType.GetFirstToken(), 282PropertyDeclarationSyntax propertyDeclaration => propertyDeclaration.Modifiers.FirstOrNull() ?? propertyDeclaration.Type.GetFirstToken(),
Structure\Providers\BlockSyntaxStructureProvider.cs (1)
165var previousToken = node.GetFirstToken().GetPreviousToken();
Wrapping\SeparatedSyntaxList\CSharpArgumentWrapper.cs (3)
67var startToken = listSyntax.GetFirstToken(); 77startToken = name == null ? listSyntax.GetFirstToken() : name.GetFirstToken();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\UnsafeTests.cs (1)
8381foreach (var declarationSyntax in tree.GetCompilationUnitRoot().DescendantNodes().OfType<VariableDeclarationSyntax>().Where(syntax => syntax.GetFirstToken().IsKind(SyntaxKind.VoidKeyword)))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Parsing\ParsingErrorRecoveryTests.cs (1)
6580Assert.Equal(SyntaxKind.ReturnKeyword, getBodyStmts[0].GetFirstToken().Kind());
Syntax\SyntaxNodeTests.cs (10)
883Assert.False(tree.GetCompilationUnitRoot().GetFirstToken().IsIncrementallyIdenticalTo(tree.GetCompilationUnitRoot().GetFirstToken().GetNextToken())); 892Assert.True(tree1.GetCompilationUnitRoot().GetFirstToken().IsIncrementallyIdenticalTo(tree2.GetCompilationUnitRoot().GetFirstToken())); 945var first = tree.GetCompilationUnitRoot().GetFirstToken(); 953var first = tree.GetCompilationUnitRoot().GetFirstToken(includeZeroWidth: true); 1008var token = tree.GetCompilationUnitRoot().GetFirstToken(includeSkipped: true); 1038var token = tree.GetCompilationUnitRoot().GetFirstToken(includeSkipped: true); 1063var token = tree.GetCompilationUnitRoot().GetFirstToken(includeSkipped: false); 1214var token = tree.GetCompilationUnitRoot().GetFirstToken(includeZeroWidth: true);
Microsoft.CodeAnalysis.CSharp.Workspaces (47)
Formatting\TypingFormattingRule.cs (1)
84if (FormattingRangeHelper.AreTwoTokensOnSameLine(firstTokenOfNode, firstStatement.GetFirstToken()))
Simplification\CSharpSimplificationService.Expander.cs (3)
502var firstReplacementToken = replacement.GetFirstToken(true, false, true, true); 503var firstOriginalToken = originalSimpleName.GetFirstToken(true, false, true, true); 1109.WithLeadingTrivia(thisExpression.GetFirstToken().LeadingTrivia);
Simplification\Reducers\CSharpMiscellaneousReducer.cs (2)
154if (!FormattingRangeHelper.AreTwoTokensOnSameLine(node.Statements[0].GetFirstToken(), node.Statements[0].GetLastToken())) 160if (!FormattingRangeHelper.AreTwoTokensOnSameLine(node.Parent.GetFirstToken(), node.GetFirstToken().GetPreviousToken()))
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
175aliasReplacement = GetAliasForSymbol((INamespaceOrTypeSymbol)symbol, node.GetFirstToken(), semanticModel, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
84var firstToken = expression.GetFirstToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (2)
46var tokenBeforeParen = node.GetFirstToken().GetPreviousToken(); 47var tokenAfterParen = node.Expression.GetFirstToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\StatementSyntaxExtensions.cs (1)
20var previousToken = statement.GetFirstToken().GetPreviousToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (2)
384queryExpression.GetFirstToken().Equals(token); 494return (node.GetFirstToken(includeZeroWidth: true), node.GetLastToken(includeZeroWidth: true));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (4)
124var startToken = section.Statements.First().GetFirstToken(includeZeroWidth: true); 182SetAlignmentBlockOperation(list, switchExpression.GetFirstToken(), switchExpression.OpenBraceToken, switchExpression.CloseBraceToken, IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine); 185SetAlignmentBlockOperation(list, withExpression.GetFirstToken(), withExpression.Initializer.OpenBraceToken, withExpression.Initializer.CloseBraceToken, IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine); 358var firstToken = statement.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (1)
155&& switchExpressionArm.GetFirstToken() == currentToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\QueryExpressionFormattingRule.cs (5)
48AddSuppressWrappingIfOnSingleLineOperation(list, queryExpression.GetFirstToken(includeZeroWidth: true), queryExpression.GetLastToken(includeZeroWidth: true)); 76var startToken = fromClause.Expression.GetFirstToken(includeZeroWidth: true); 100var baseToken = queryExpression.GetFirstToken(includeZeroWidth: true); 117var firstToken = queryClause.GetFirstToken(includeZeroWidth: true); 124var firstToken = selectOrGroupClause.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (9)
99AddSuppressWrappingIfOnSingleLineOperation(list, casePattern.GetFirstToken(), casePattern.GetLastToken()); 107AddSuppressWrappingIfOnSingleLineOperation(list, isPattern.GetFirstToken(), isPattern.GetLastToken()); 144AddSuppressWrappingIfOnSingleLineOperation(list, whileStatementNode.GetFirstToken(includeZeroWidth: true), whileStatementNode.Statement.GetLastToken(includeZeroWidth: true)); 165attributes[i].GetFirstToken(includeZeroWidth: true), 188AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.GetFirstToken(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true)); 198AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[i].GetFirstToken(includeZeroWidth: true), switchSection.Labels[i].GetLastToken(includeZeroWidth: true)); 205AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[switchSection.Labels.Count - 1].GetFirstToken(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true)); 270var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 332: endDirective.GetFirstToken(includeDirectives: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\WrappingFormattingRule.cs (5)
72var firstTokenOfEmbeddedStatement = embeddedStatement.GetFirstToken(includeZeroWidth: true); 86SwitchSectionSyntax switchSection => (switchSection.GetFirstToken(includeZeroWidth: true), switchSection.GetLastToken(includeZeroWidth: true)), 108var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 118var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 133RemoveSuppressOperation(list, ifStatementNode.Else.ElseKeyword, ifStatementNode.Else.Statement.GetFirstToken(includeZeroWidth: true));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (2)
43return _tokenComparer.Compare(x.GetFirstToken(includeSkipped: true), y.GetFirstToken());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
95var name1 = using1.Name.GetFirstToken().ValueText; 96var name2 = using2.Name.GetFirstToken().ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (1)
59? root.Members.First().GetFirstToken().Span.End
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1372return IsAtStartOfPattern(syntaxTree, parenthesizedExpression.GetFirstToken().GetPreviousToken(), parenthesizedExpression.SpanStart);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.cs (1)
180var startToken = section.Statements.First().GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (1)
419var clauseToken = clause.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
187var firstToken = resultCompilationUnit.GetFirstToken(); 239var firstToken = resultNamespace.Members.First().GetFirstToken();
Microsoft.VisualStudio.LanguageServices.CSharp (6)
CodeModel\CSharpCodeModelService.cs (1)
3301var firstToken = newMember.GetFirstToken();
CodeModel\CSharpCodeModelService.NodeLocator.cs (5)
261startPosition = node.GetFirstToken().SpanStart; 331startPosition = node.GetFirstToken().SpanStart; 379startPosition = node.GetFirstToken().SpanStart; 574startPosition = node.GetFirstToken().SpanStart; 628startPosition = node.GetFirstToken().SpanStart;