155 references to EndOfLineTrivia
Microsoft.AspNetCore.App.CodeFixes (1)
Authorization\AddAuthorizationBuilderFixer.cs (1)
120.Where(trivia => !trivia.IsKind(SyntaxKind.EndOfLineTrivia));
Microsoft.CodeAnalysis.CSharp (20)
DocumentationComments\SourceDocumentationCommentUtils.cs (1)
96case SyntaxKind.EndOfLineTrivia:
Parser\LanguageParser.cs (5)
3626if (!style.IsMissing && explicitInterfaceOpt is not null && this.CurrentToken.Kind != SyntaxKind.OperatorKeyword && style.TrailingTrivia.Any((int)SyntaxKind.EndOfLineTrivia)) 5213var isAfterNewLine = parentType.GetLastToken().TrailingTrivia.Any((int)SyntaxKind.EndOfLineTrivia); 6496if (separator.TrailingTrivia.Any((int)SyntaxKind.EndOfLineTrivia)) 8201token1.TrailingTrivia.Any((int)SyntaxKind.EndOfLineTrivia)) 11612if (this.CurrentToken.TrailingTrivia.Any((int)SyntaxKind.EndOfLineTrivia) &&
Parser\Lexer.cs (1)
2695else if (tr.Kind == SyntaxKind.EndOfLineTrivia)
Parser\SyntaxParser.cs (1)
727bool prevTokenHasEndOfLineTrivia = triviaList.Any((int)SyntaxKind.EndOfLineTrivia);
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
247return this.Kind == SyntaxKind.EndOfLineTrivia
Syntax\InternalSyntax\SyntaxFactory.cs (1)
71trivia = SyntaxTrivia.Create(SyntaxKind.EndOfLineTrivia, text);
Syntax\SyntaxFactory.cs (2)
184/// <see cref="SyntaxKind.WhitespaceTrivia"/>, <see cref="SyntaxKind.EndOfLineTrivia"/>, 202case SyntaxKind.EndOfLineTrivia:
Syntax\SyntaxKindFacts.cs (2)
230if (kind >= SyntaxKind.TildeToken && kind < SyntaxKind.EndOfLineTrivia) return true; 257case SyntaxKind.EndOfLineTrivia:
Syntax\SyntaxNodeRemover.cs (4)
123/// be true for <see cref="SyntaxKind.EndOfLineTrivia"/>, <see cref="SyntaxKind.SingleLineCommentTrivia"/>, 128return trivia.Kind() == SyntaxKind.EndOfLineTrivia 140if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 243withSeps, i, (int)SyntaxKind.EndOfLineTrivia,
Syntax\SyntaxNormalizer.cs (2)
1029trivia.IsKind(SyntaxKind.EndOfLineTrivia) || 1229if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
Microsoft.CodeAnalysis.CSharp.CodeStyle (25)
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
96if (token.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
77if (token.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
128endOfLineTrivia = secondBrace.LeadingTrivia.Last(t => t.IsKind(SyntaxKind.EndOfLineTrivia));
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
82if (colonToken.TrailingTrivia.Last().Kind() != SyntaxKind.EndOfLineTrivia)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
133if (trivia.IsKind(SyntaxKind.EndOfLineTrivia))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
236.Where(t => t.Kind() != SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (3)
259if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 273if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 299if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
148=> trivia.Kind() == SyntaxKind.EndOfLineTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaListExtensions.cs (3)
21.Where(t => t.Kind() == SyntaxKind.EndOfLineTrivia) 52if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 55t.Kind() is SyntaxKind.EndOfLineTrivia or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
41=> trivia.RawKind == (int)SyntaxKind.EndOfLineTrivia; 188structuredTrivia.GetTrailingTrivia().Any(SyntaxKind.EndOfLineTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (2)
76if (previousToken.TrailingTrivia is [.., (kind: SyntaxKind.EndOfLineTrivia)]) 105else if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (3)
38Contract.ThrowIfTrue(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 156if (trivia.Kind() != SyntaxKind.EndOfLineTrivia) 272trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (1)
120if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
483or SyntaxKind.EndOfLineTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
27public int EndOfLineTrivia => (int)SyntaxKind.EndOfLineTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
159if (!trailingTrivia.Any() || trailingTrivia.Last().Kind() != SyntaxKind.EndOfLineTrivia) 177=> node.WithLeadingTrivia(node.GetLeadingTrivia().SkipWhile(t => t.Kind() == SyntaxKind.EndOfLineTrivia));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (16)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (7)
307if (leadingTrivia is [(kind: SyntaxKind.EndOfLineTrivia), ..]) 313if (leadingTrivia is [(kind: SyntaxKind.WhitespaceTrivia), (kind: SyntaxKind.EndOfLineTrivia), ..]) 350var originalHadTrailingNewLine = namespaceDeclaration.GetTrailingTrivia() is [.., (kind: SyntaxKind.EndOfLineTrivia)]; 358if (trailingTrivia is not [.., (kind: SyntaxKind.EndOfLineTrivia)]) 367(kind: SyntaxKind.EndOfLineTrivia or SyntaxKind.EndIfDirectiveTrivia or SyntaxKind.EndRegionDirectiveTrivia), 368(kind: SyntaxKind.EndOfLineTrivia) 388if (openBraceToken.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
161var expressionTriviaWithoutEndOfLine = expressionTrivia.Where(t => !t.IsKind(SyntaxKind.EndOfLineTrivia));
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
328.SkipWhile(trivia => trivia.All(t => t.IsWhitespaceOrEndOfLine()) && trivia.Last().IsKind(SyntaxKind.EndOfLineTrivia)) 363if (firstMemberTrivia is [(kind: SyntaxKind.EndOfLineTrivia), ..])
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
60var trailingTriviaTakeUntil = remainingLeadingTrivia.IndexOf(SyntaxKind.EndOfLineTrivia) is >= 0 and var eolIndex
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
131if (nodesAndTokens.Count > 0 && nodesAndTokens.Last().GetTrailingTrivia() is [.., (kind: not SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
81if (addLineBreak && item.GetTrailingTrivia() is not [.., (kind: SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundAssignmentCodeFixProvider.cs (1)
47protected override SyntaxTriviaList PrepareRightExpressionLeadingTrivia(SyntaxTriviaList initialTrivia) => initialTrivia.SkipWhile(el => el.Kind() is SyntaxKind.WhitespaceTrivia or SyntaxKind.EndOfLineTrivia).ToSyntaxTriviaList();
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
120.Any(SyntaxKind.EndOfLineTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
455ComputePositionAndTriviaForRemoveAttributeList(attributeList, (SyntaxTrivia t) => t.IsKind(SyntaxKind.EndOfLineTrivia), out positionOfRemovedNode, out trivia);
Microsoft.CodeAnalysis.CSharp.Features (39)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
94=> trivia.Kind() is SyntaxKind.EndOfLineTrivia or SyntaxKind.SingleLineDocumentationCommentTrivia;
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
198case SyntaxKind.EndOfLineTrivia:
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
335.SkipWhile(t => t is (kind: SyntaxKind.WhitespaceTrivia or SyntaxKind.EndOfLineTrivia))
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (2)
137while (triviaToMove is [.., SyntaxTrivia(SyntaxKind.SingleLineCommentTrivia), SyntaxTrivia(SyntaxKind.EndOfLineTrivia)]) 165while (commentIndex < leadingTrivia.Count && leadingTrivia[commentIndex].Kind() is SyntaxKind.EndOfLineTrivia)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (2)
222if (!statements[0].GetLeadingTrivia().Any(t => t.Kind() is SyntaxKind.EndOfLineTrivia) && 226namespaceDeclaration.GetLeadingTrivia().TakeWhile(t => t.Kind() is SyntaxKind.WhitespaceTrivia or SyntaxKind.EndOfLineTrivia));
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
256=> trivia.RawKind == (int)SyntaxKind.EndOfLineTrivia;
ExtractMethod\CSharpMethodExtractor.Analyzer.cs (1)
19private static readonly HashSet<int> s_nonNoisySyntaxKindSet = new HashSet<int>([(int)SyntaxKind.WhitespaceTrivia, (int)SyntaxKind.EndOfLineTrivia]);
ExtractMethod\CSharpMethodExtractor.cs (2)
178if (!leadingTrivia.Any(t => t.IsKind(SyntaxKind.EndOfLineTrivia)) && !methodDefinition.FindTokenOnLeftOfPosition(methodDefinition.SpanStart).IsKind(SyntaxKind.OpenBraceToken)) 184if (!originalMethodDefinition.FindTokenOnLeftOfPosition(originalMethodDefinition.SpanStart).TrailingTrivia.Any(SyntaxKind.EndOfLineTrivia))
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
215not SyntaxKind.EndOfLineTrivia)
ExtractMethod\CSharpMethodExtractor.TriviaResult.cs (1)
33: base(document, result, (int)SyntaxKind.EndOfLineTrivia, (int)SyntaxKind.WhitespaceTrivia)
ExtractMethod\CSharpSyntaxTriviaService.cs (1)
14: base((int)SyntaxKind.EndOfLineTrivia)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
428var precedingEndOfLine = nextStatementLeading.LastOrDefault(t => t.Kind() == SyntaxKind.EndOfLineTrivia);
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
129else if (trivia.Kind() is not SyntaxKind.WhitespaceTrivia and not SyntaxKind.EndOfLineTrivia)
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
96if (token.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
77if (token.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
128endOfLineTrivia = secondBrace.LeadingTrivia.Last(t => t.IsKind(SyntaxKind.EndOfLineTrivia));
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
82if (colonToken.TrailingTrivia.Last().Kind() != SyntaxKind.EndOfLineTrivia)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
133if (trivia.IsKind(SyntaxKind.EndOfLineTrivia))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
236.Where(t => t.Kind() != SyntaxKind.EndOfLineTrivia)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (7)
307if (leadingTrivia is [(kind: SyntaxKind.EndOfLineTrivia), ..]) 313if (leadingTrivia is [(kind: SyntaxKind.WhitespaceTrivia), (kind: SyntaxKind.EndOfLineTrivia), ..]) 350var originalHadTrailingNewLine = namespaceDeclaration.GetTrailingTrivia() is [.., (kind: SyntaxKind.EndOfLineTrivia)]; 358if (trailingTrivia is not [.., (kind: SyntaxKind.EndOfLineTrivia)]) 367(kind: SyntaxKind.EndOfLineTrivia or SyntaxKind.EndIfDirectiveTrivia or SyntaxKind.EndRegionDirectiveTrivia), 368(kind: SyntaxKind.EndOfLineTrivia) 388if (openBraceToken.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
161var expressionTriviaWithoutEndOfLine = expressionTrivia.Where(t => !t.IsKind(SyntaxKind.EndOfLineTrivia));
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
328.SkipWhile(trivia => trivia.All(t => t.IsWhitespaceOrEndOfLine()) && trivia.Last().IsKind(SyntaxKind.EndOfLineTrivia)) 363if (firstMemberTrivia is [(kind: SyntaxKind.EndOfLineTrivia), ..])
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
60var trailingTriviaTakeUntil = remainingLeadingTrivia.IndexOf(SyntaxKind.EndOfLineTrivia) is >= 0 and var eolIndex
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
131if (nodesAndTokens.Count > 0 && nodesAndTokens.Last().GetTrailingTrivia() is [.., (kind: not SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
81if (addLineBreak && item.GetTrailingTrivia() is not [.., (kind: SyntaxKind.EndOfLineTrivia)])
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundAssignmentCodeFixProvider.cs (1)
47protected override SyntaxTriviaList PrepareRightExpressionLeadingTrivia(SyntaxTriviaList initialTrivia) => initialTrivia.SkipWhile(el => el.Kind() is SyntaxKind.WhitespaceTrivia or SyntaxKind.EndOfLineTrivia).ToSyntaxTriviaList();
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
120.Any(SyntaxKind.EndOfLineTrivia);
Structure\CSharpStructureHelpers.cs (2)
67if (trivia.IsKind(SyntaxKind.EndOfLineTrivia)) 188SyntaxKind.WhitespaceTrivia or SyntaxKind.EndOfLineTrivia or SyntaxKind.EndOfFileToken))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (28)
LexicalAndXml\LexicalTests.cs (23)
486Assert.Equal(SyntaxKind.EndOfLineTrivia, token.TrailingTrivia[0].Kind()); 520Assert.Equal(SyntaxKind.EndOfLineTrivia, token.TrailingTrivia[0].Kind()); 3979Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4003Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4024Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4057Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4108Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4127Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4143Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4180Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4220Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4285Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4308Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4330Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4359Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4389Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4398Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4428Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4444Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4484Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4500Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4542Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4560Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia);
LexicalAndXml\SyntaxTokenParserTests.cs (3)
331(SyntaxKind.EndOfLineTrivia, "\r\n"), 332(SyntaxKind.EndOfLineTrivia, "\r\n")); 399(SyntaxKind.EndOfLineTrivia, "\r\n"));
Syntax\SyntaxNodeTests.cs (2)
609Assert.Equal(SyntaxKind.EndOfLineTrivia, list[1].Kind()); 625Assert.Equal(SyntaxKind.EndOfLineTrivia, list[0].Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
Classification\Worker.cs (1)
280triviaList[index - 1].Kind() == SyntaxKind.EndOfLineTrivia &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (3)
259if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 273if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 299if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
148=> trivia.Kind() == SyntaxKind.EndOfLineTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaListExtensions.cs (3)
21.Where(t => t.Kind() == SyntaxKind.EndOfLineTrivia) 52if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 55t.Kind() is SyntaxKind.EndOfLineTrivia or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
41=> trivia.RawKind == (int)SyntaxKind.EndOfLineTrivia; 188structuredTrivia.GetTrailingTrivia().Any(SyntaxKind.EndOfLineTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (2)
76if (previousToken.TrailingTrivia is [.., (kind: SyntaxKind.EndOfLineTrivia)]) 105else if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (3)
38Contract.ThrowIfTrue(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 156if (trivia.Kind() != SyntaxKind.EndOfLineTrivia) 272trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (1)
120if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
483or SyntaxKind.EndOfLineTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
27public int EndOfLineTrivia => (int)SyntaxKind.EndOfLineTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
159if (!trailingTrivia.Any() || trailingTrivia.Last().Kind() != SyntaxKind.EndOfLineTrivia) 177=> node.WithLeadingTrivia(node.GetLeadingTrivia().SkipWhile(t => t.Kind() == SyntaxKind.EndOfLineTrivia));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
455ComputePositionAndTriviaForRemoveAttributeList(attributeList, (SyntaxTrivia t) => t.IsKind(SyntaxKind.EndOfLineTrivia), out positionOfRemovedNode, out trivia);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Formatting\FormattingTriviaTests.cs (1)
1745tree = tree.ReplaceTrivia(tree.DescendantTrivia().Where(tr => tr.IsKind(SyntaxKind.EndOfLineTrivia)), (o, r) => SyntaxFactory.ElasticMarker);
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (3)
1232not SyntaxKind.EndOfLineTrivia) 1309leadingTriviaList[firstIndex].Kind() == SyntaxKind.EndOfLineTrivia) 2858if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
CodeModel\CSharpCodeModelService.NodeLocator.cs (1)
163.Where(t => t is not SyntaxTrivia(SyntaxKind.WhitespaceTrivia or SyntaxKind.EndOfLineTrivia))