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)
96
case SyntaxKind.
EndOfLineTrivia
:
Parser\LanguageParser.cs (5)
3626
if (!style.IsMissing && explicitInterfaceOpt is not null && this.CurrentToken.Kind != SyntaxKind.OperatorKeyword && style.TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
))
5213
var isAfterNewLine = parentType.GetLastToken().TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
);
6496
if (separator.TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
))
8201
token1.TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
))
11612
if (this.CurrentToken.TrailingTrivia.Any((int)SyntaxKind.
EndOfLineTrivia
) &&
Parser\Lexer.cs (1)
2695
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 (25)
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)
133
if (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)
259
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
273
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
299
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 (2)
159
if (!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)
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)
161
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\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
120
.Any(SyntaxKind.
EndOfLineTrivia
);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
455
ComputePositionAndTriviaForRemoveAttributeList(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)
198
case SyntaxKind.
EndOfLineTrivia
:
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
335
.SkipWhile(t => t is (kind: SyntaxKind.WhitespaceTrivia or SyntaxKind.
EndOfLineTrivia
))
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)
19
private static readonly HashSet<int> s_nonNoisySyntaxKindSet = new HashSet<int>([(int)SyntaxKind.WhitespaceTrivia, (int)SyntaxKind.
EndOfLineTrivia
]);
ExtractMethod\CSharpMethodExtractor.cs (2)
178
if (!leadingTrivia.Any(t => t.IsKind(SyntaxKind.
EndOfLineTrivia
)) && !methodDefinition.FindTokenOnLeftOfPosition(methodDefinition.SpanStart).IsKind(SyntaxKind.OpenBraceToken))
184
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 (1)
428
var precedingEndOfLine = nextStatementLeading.LastOrDefault(t => t.Kind() == SyntaxKind.
EndOfLineTrivia
);
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)
133
if (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)
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)
161
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\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
120
.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)
609
Assert.Equal(SyntaxKind.
EndOfLineTrivia
, list[1].Kind());
625
Assert.Equal(SyntaxKind.
EndOfLineTrivia
, list[0].Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
Classification\Worker.cs (1)
280
triviaList[index - 1].Kind() == SyntaxKind.
EndOfLineTrivia
&&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (3)
259
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
273
if (trivia.Kind() == SyntaxKind.
EndOfLineTrivia
)
299
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 (2)
159
if (!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)
455
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
))