167 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)
96
case SyntaxKind.
EndOfLineTrivia
:
Parser\LanguageParser.cs (5)
3645
if (!style.IsMissing && explicitInterfaceOpt is not null && this.CurrentToken.Kind != SyntaxKind.OperatorKeyword && style.TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
))
5256
var isAfterNewLine = parentType.GetLastToken().TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
);
6548
if (separator.TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
))
8253
token1.TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
))
11677
if (this.CurrentToken.TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
) &&
Parser\Lexer.cs (1)
2728
else if (tr.Kind == SyntaxKind.
EndOfLineTrivia
)
Parser\SyntaxParser.cs (1)
727
bool prevTokenHasEndOfLineTrivia = triviaList.Any((int)SyntaxKind.
EndOfLineTrivia
);
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
247
return this.Kind == SyntaxKind.
EndOfLineTrivia
Syntax\InternalSyntax\SyntaxFactory.cs (1)
71
trivia = SyntaxTrivia.Create(SyntaxKind.
EndOfLineTrivia
, text);
Syntax\SyntaxFactory.cs (2)
184
/// <see cref="SyntaxKind.WhitespaceTrivia"/>, <see cref="SyntaxKind.
EndOfLineTrivia
"/>,
202
case SyntaxKind.
EndOfLineTrivia
:
Syntax\SyntaxKindFacts.cs (2)
230
if (kind >= SyntaxKind.TildeToken && kind < SyntaxKind.
EndOfLineTrivia
) return true;
257
case SyntaxKind.
EndOfLineTrivia
:
Syntax\SyntaxNodeRemover.cs (4)
123
/// be true for <see cref="SyntaxKind.
EndOfLineTrivia
"/>, <see cref="SyntaxKind.SingleLineCommentTrivia"/>,
128
return trivia.Kind() == SyntaxKind.
EndOfLineTrivia
140
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
243
withSeps, i, (int)SyntaxKind.
EndOfLineTrivia
,
Syntax\SyntaxNormalizer.cs (2)
1029
trivia.IsKind(SyntaxKind.
EndOfLineTrivia
) ||
1229
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
Microsoft.CodeAnalysis.CSharp.CodeStyle (27)
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
96
if (token.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
77
if (token.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
128
endOfLineTrivia = secondBrace.LeadingTrivia.Last(t => t.IsKind(SyntaxKind.
EndOfLineTrivia
));
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
82
if (colonToken.TrailingTrivia.Last().Kind() != SyntaxKind.
EndOfLineTrivia
)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
128
if (trivia.IsKind(SyntaxKind.
EndOfLineTrivia
))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (1)
63
return !declaration.GetLeadingTrivia().Any(t => t.Kind() == 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)
263
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
277
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
303
if (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
)
52
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
55
t.Kind() is SyntaxKind.
EndOfLineTrivia
or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
41
=> trivia.RawKind == (int)SyntaxKind.
EndOfLineTrivia
;
188
structuredTrivia.GetTrailingTrivia().Any(SyntaxKind.
EndOfLineTrivia
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (2)
76
if (previousToken.TrailingTrivia is [.., (kind: SyntaxKind.
EndOfLineTrivia
)])
105
else if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (3)
38
Contract.ThrowIfTrue(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
156
if (trivia.Kind() != SyntaxKind.
EndOfLineTrivia
)
272
trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (1)
120
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
483
or SyntaxKind.
EndOfLineTrivia
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
27
public int EndOfLineTrivia => (int)SyntaxKind.
EndOfLineTrivia
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (3)
29
.Select(n => n.GetTrailingTrivia().FirstOrNull(t => t.Kind() == SyntaxKind.
EndOfLineTrivia
))
168
if (!trailingTrivia.Any() || trailingTrivia.Last().Kind() != SyntaxKind.
EndOfLineTrivia
)
186
=> node.WithLeadingTrivia(node.GetLeadingTrivia().SkipWhile(t => t.Kind() == SyntaxKind.
EndOfLineTrivia
));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (18)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (7)
307
if (leadingTrivia is [(kind: SyntaxKind.
EndOfLineTrivia
), ..])
313
if (leadingTrivia is [(kind: SyntaxKind.WhitespaceTrivia), (kind: SyntaxKind.
EndOfLineTrivia
), ..])
350
var originalHadTrailingNewLine = namespaceDeclaration.GetTrailingTrivia() is [.., (kind: SyntaxKind.
EndOfLineTrivia
)];
358
if (trailingTrivia is not [.., (kind: SyntaxKind.
EndOfLineTrivia
)])
367
(kind: SyntaxKind.
EndOfLineTrivia
or SyntaxKind.EndIfDirectiveTrivia or SyntaxKind.EndRegionDirectiveTrivia),
368
(kind: SyntaxKind.
EndOfLineTrivia
)
388
if (openBraceToken.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
154
var 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
))
363
if (firstMemberTrivia is [(kind: SyntaxKind.
EndOfLineTrivia
), ..])
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
60
var trailingTriviaTakeUntil = remainingLeadingTrivia.IndexOf(SyntaxKind.
EndOfLineTrivia
) is >= 0 and var eolIndex
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
131
if (nodesAndTokens.Count > 0 && nodesAndTokens.Last().GetTrailingTrivia() is [.., (kind: not SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
81
if (addLineBreak && item.GetTrailingTrivia() is not [.., (kind: SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundAssignmentCodeFixProvider.cs (1)
47
protected override SyntaxTriviaList PrepareRightExpressionLeadingTrivia(SyntaxTriviaList initialTrivia) => initialTrivia.SkipWhile(el => el.Kind() is SyntaxKind.WhitespaceTrivia or SyntaxKind.
EndOfLineTrivia
).ToSyntaxTriviaList();
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
42
Matcher.Single<SyntaxTrivia>(t => t.Kind() == SyntaxKind.
EndOfLineTrivia
, "first end of line"),
44
Matcher.Single<SyntaxTrivia>(t => t.IsKind(SyntaxKind.
EndOfLineTrivia
), "second end of line"));
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
152
.Any(SyntaxKind.
EndOfLineTrivia
);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
457
ComputePositionAndTriviaForRemoveAttributeList(attributeList, (SyntaxTrivia t) => t.IsKind(SyntaxKind.
EndOfLineTrivia
), out positionOfRemovedNode, out trivia);
Microsoft.CodeAnalysis.CSharp.Features (46)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
94
=> trivia.Kind() is SyntaxKind.
EndOfLineTrivia
or SyntaxKind.SingleLineDocumentationCommentTrivia;
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
198
case SyntaxKind.
EndOfLineTrivia
:
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
331
.SkipWhile(t => t is (kind: SyntaxKind.WhitespaceTrivia or SyntaxKind.
EndOfLineTrivia
))
ConvertAnonymousType\CSharpConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
49
if (i == n - 1 && i < originalSeparators.Length && originalSeparators[i].TrailingTrivia is [.., (kind: SyntaxKind.
EndOfLineTrivia
) newLine])
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (2)
137
while (triviaToMove is [.., SyntaxTrivia(SyntaxKind.SingleLineCommentTrivia), SyntaxTrivia(SyntaxKind.
EndOfLineTrivia
)])
165
while (commentIndex < leadingTrivia.Count && leadingTrivia[commentIndex].Kind() is SyntaxKind.
EndOfLineTrivia
)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (2)
222
if (!statements[0].GetLeadingTrivia().Any(t => t.Kind() is SyntaxKind.
EndOfLineTrivia
) &&
226
namespaceDeclaration.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)
17
private static readonly HashSet<int> s_nonNoisySyntaxKindSet = [(int)SyntaxKind.WhitespaceTrivia, (int)SyntaxKind.
EndOfLineTrivia
];
ExtractMethod\CSharpMethodExtractor.cs (2)
180
if (!leadingTrivia.Any(t => t.IsKind(SyntaxKind.
EndOfLineTrivia
) || t.GetStructure() is EndIfDirectiveTriviaSyntax) &&
187
if (!originalMethodDefinition.FindTokenOnLeftOfPosition(originalMethodDefinition.SpanStart).TrailingTrivia.Any(SyntaxKind.
EndOfLineTrivia
))
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
215
not 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 (4)
473
if (!priorToken.TrailingTrivia.Any(SyntaxKind.
EndOfLineTrivia
) &&
474
!nextStatement.GetLastToken().TrailingTrivia.Any(SyntaxKind.
EndOfLineTrivia
))
488
var precedingEndOfLine = nextStatementLeading.LastOrDefault(t => t.Kind() == SyntaxKind.
EndOfLineTrivia
);
507
nextStatement.GetTrailingTrivia() is [.., (kind: SyntaxKind.
EndOfLineTrivia
) endOfLine] ? endOfLine : ElasticCarriageReturnLineFeed);
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
129
else if (trivia.Kind() is not SyntaxKind.WhitespaceTrivia and not SyntaxKind.
EndOfLineTrivia
)
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
96
if (token.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
77
if (token.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
128
endOfLineTrivia = secondBrace.LeadingTrivia.Last(t => t.IsKind(SyntaxKind.
EndOfLineTrivia
));
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
82
if (colonToken.TrailingTrivia.Last().Kind() != SyntaxKind.
EndOfLineTrivia
)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
128
if (trivia.IsKind(SyntaxKind.
EndOfLineTrivia
))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (1)
63
return !declaration.GetLeadingTrivia().Any(t => t.Kind() == 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)
307
if (leadingTrivia is [(kind: SyntaxKind.
EndOfLineTrivia
), ..])
313
if (leadingTrivia is [(kind: SyntaxKind.WhitespaceTrivia), (kind: SyntaxKind.
EndOfLineTrivia
), ..])
350
var originalHadTrailingNewLine = namespaceDeclaration.GetTrailingTrivia() is [.., (kind: SyntaxKind.
EndOfLineTrivia
)];
358
if (trailingTrivia is not [.., (kind: SyntaxKind.
EndOfLineTrivia
)])
367
(kind: SyntaxKind.
EndOfLineTrivia
or SyntaxKind.EndIfDirectiveTrivia or SyntaxKind.EndRegionDirectiveTrivia),
368
(kind: SyntaxKind.
EndOfLineTrivia
)
388
if (openBraceToken.TrailingTrivia is not [.., SyntaxTrivia(SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
154
var 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
))
363
if (firstMemberTrivia is [(kind: SyntaxKind.
EndOfLineTrivia
), ..])
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
60
var trailingTriviaTakeUntil = remainingLeadingTrivia.IndexOf(SyntaxKind.
EndOfLineTrivia
) is >= 0 and var eolIndex
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
131
if (nodesAndTokens.Count > 0 && nodesAndTokens.Last().GetTrailingTrivia() is [.., (kind: not SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
81
if (addLineBreak && item.GetTrailingTrivia() is not [.., (kind: SyntaxKind.
EndOfLineTrivia
)])
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundAssignmentCodeFixProvider.cs (1)
47
protected override SyntaxTriviaList PrepareRightExpressionLeadingTrivia(SyntaxTriviaList initialTrivia) => initialTrivia.SkipWhile(el => el.Kind() is SyntaxKind.WhitespaceTrivia or SyntaxKind.
EndOfLineTrivia
).ToSyntaxTriviaList();
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
42
Matcher.Single<SyntaxTrivia>(t => t.Kind() == SyntaxKind.
EndOfLineTrivia
, "first end of line"),
44
Matcher.Single<SyntaxTrivia>(t => t.IsKind(SyntaxKind.
EndOfLineTrivia
), "second end of line"));
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
152
.Any(SyntaxKind.
EndOfLineTrivia
);
Structure\CSharpStructureHelpers.cs (2)
67
if (trivia.IsKind(SyntaxKind.
EndOfLineTrivia
))
188
SyntaxKind.WhitespaceTrivia or SyntaxKind.
EndOfLineTrivia
or SyntaxKind.EndOfFileToken))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (28)
LexicalAndXml\LexicalTests.cs (23)
486
Assert.Equal(SyntaxKind.
EndOfLineTrivia
, token.TrailingTrivia[0].Kind());
520
Assert.Equal(SyntaxKind.
EndOfLineTrivia
, token.TrailingTrivia[0].Kind());
3979
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4003
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4024
Assert.True(trivia2.Kind() == SyntaxKind.
EndOfLineTrivia
);
4057
Assert.True(trivia2.Kind() == SyntaxKind.
EndOfLineTrivia
);
4108
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4127
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4143
Assert.True(trivia2.Kind() == SyntaxKind.
EndOfLineTrivia
);
4180
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4220
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4285
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4308
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4330
Assert.True(trivia2.Kind() == SyntaxKind.
EndOfLineTrivia
);
4359
Assert.True(trivia2.Kind() == SyntaxKind.
EndOfLineTrivia
);
4389
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4398
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4428
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4444
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4484
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4500
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4542
Assert.True(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
4560
Assert.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)
632
Assert.Equal(SyntaxKind.
EndOfLineTrivia
, list[1].Kind());
648
Assert.Equal(SyntaxKind.
EndOfLineTrivia
, list[0].Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (22)
Classification\Worker.cs (1)
280
triviaList[index - 1].Kind() == SyntaxKind.
EndOfLineTrivia
&&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (3)
263
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
277
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
303
if (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
)
52
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
55
t.Kind() is SyntaxKind.
EndOfLineTrivia
or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
41
=> trivia.RawKind == (int)SyntaxKind.
EndOfLineTrivia
;
188
structuredTrivia.GetTrailingTrivia().Any(SyntaxKind.
EndOfLineTrivia
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (2)
76
if (previousToken.TrailingTrivia is [.., (kind: SyntaxKind.
EndOfLineTrivia
)])
105
else if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (3)
38
Contract.ThrowIfTrue(trivia.Kind() == SyntaxKind.
EndOfLineTrivia
);
156
if (trivia.Kind() != SyntaxKind.
EndOfLineTrivia
)
272
trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (1)
120
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
483
or SyntaxKind.
EndOfLineTrivia
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
27
public int EndOfLineTrivia => (int)SyntaxKind.
EndOfLineTrivia
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (3)
29
.Select(n => n.GetTrailingTrivia().FirstOrNull(t => t.Kind() == SyntaxKind.
EndOfLineTrivia
))
168
if (!trailingTrivia.Any() || trailingTrivia.Last().Kind() != SyntaxKind.
EndOfLineTrivia
)
186
=> node.WithLeadingTrivia(node.GetLeadingTrivia().SkipWhile(t => t.Kind() == SyntaxKind.
EndOfLineTrivia
));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
457
ComputePositionAndTriviaForRemoveAttributeList(attributeList, (SyntaxTrivia t) => t.IsKind(SyntaxKind.
EndOfLineTrivia
), out positionOfRemovedNode, out trivia);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Formatting\FormattingTriviaTests.cs (1)
1745
tree = tree.ReplaceTrivia(tree.DescendantTrivia().Where(tr => tr.IsKind(SyntaxKind.
EndOfLineTrivia
)), (o, r) => SyntaxFactory.ElasticMarker);
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (3)
1232
not SyntaxKind.
EndOfLineTrivia
)
1309
leadingTriviaList[firstIndex].Kind() == SyntaxKind.
EndOfLineTrivia
)
2858
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
CodeModel\CSharpCodeModelService.NodeLocator.cs (1)
163
.Where(t => t is not SyntaxTrivia(SyntaxKind.WhitespaceTrivia or SyntaxKind.
EndOfLineTrivia
))