47 references to SingleLineCommentTrivia
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (1)
228=> trivia.IsKind(SyntaxKind.MultiLineCommentTrivia) || trivia.IsKind(SyntaxKind.SingleLineCommentTrivia);
Microsoft.CodeAnalysis.CSharp (11)
Compilation\CSharpCompilation.cs (1)
4756Func<SyntaxTrivia, bool> isComment = trivia => trivia.Kind() == SyntaxKind.SingleLineCommentTrivia || trivia.Kind() == SyntaxKind.MultiLineCommentTrivia;
Syntax\CSharpSyntaxTree.cs (1)
737isComment: trivia => trivia.Kind() == SyntaxKind.SingleLineCommentTrivia || trivia.Kind() == SyntaxKind.MultiLineCommentTrivia,
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
248|| this.Kind == SyntaxKind.SingleLineCommentTrivia;
Syntax\InternalSyntax\SyntaxFactory.cs (1)
99return SyntaxTrivia.Create(SyntaxKind.SingleLineCommentTrivia, text);
Syntax\SyntaxFactory.cs (2)
185/// <see cref="SyntaxKind.SingleLineCommentTrivia"/>, <see cref="SyntaxKind.MultiLineCommentTrivia"/>, 204case SyntaxKind.SingleLineCommentTrivia:
Syntax\SyntaxKindFacts.cs (1)
259case SyntaxKind.SingleLineCommentTrivia:
Syntax\SyntaxNodeRemover.cs (2)
123/// be true for <see cref="SyntaxKind.EndOfLineTrivia"/>, <see cref="SyntaxKind.SingleLineCommentTrivia"/>, 129|| trivia.Kind() == SyntaxKind.SingleLineCommentTrivia
Syntax\SyntaxNormalizer.cs (2)
1198case SyntaxKind.SingleLineCommentTrivia: 1211case SyntaxKind.SingleLineCommentTrivia:
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Analyzers\CSharp\Analyzers\FileHeaders\CSharpFileHeaderHelper.cs (1)
23if (commentTrivia.IsKind(SyntaxKind.SingleLineCommentTrivia))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (3)
25=> trivia.Kind() is SyntaxKind.MultiLineCommentTrivia or SyntaxKind.SingleLineCommentTrivia; 37=> trivia.Kind() == SyntaxKind.SingleLineCommentTrivia; 66if (trivia.Kind() == SyntaxKind.SingleLineCommentTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaListExtensions.cs (1)
38.Where(t => t is (kind: SyntaxKind.SingleLineCommentTrivia or SyntaxKind.MultiLineCommentTrivia or SyntaxKind.WhitespaceTrivia))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpFileBannerFacts.cs (1)
22=> trivia.Kind() is SyntaxKind.SingleLineCommentTrivia or SyntaxKind.MultiLineCommentTrivia or SyntaxKind.SingleLineDocumentationCommentTrivia or SyntaxKind.MultiLineDocumentationCommentTrivia
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
30public int SingleLineCommentTrivia => (int)SyntaxKind.SingleLineCommentTrivia;
Microsoft.CodeAnalysis.CSharp.Features (7)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
199case SyntaxKind.SingleLineCommentTrivia:
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
70SyntaxKind.SingleLineCommentTrivia or
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (2)
137while (triviaToMove is [.., SyntaxTrivia(SyntaxKind.SingleLineCommentTrivia), SyntaxTrivia(SyntaxKind.EndOfLineTrivia)]) 158c => c.Kind() is SyntaxKind.SingleLineCommentTrivia && c.ToString().Contains("https://aka.ms/new-console-template"));
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (1)
219return trivia.Kind() is SyntaxKind.MultiLineCommentTrivia or SyntaxKind.SingleLineCommentTrivia;
src\Analyzers\CSharp\Analyzers\FileHeaders\CSharpFileHeaderHelper.cs (1)
23if (commentTrivia.IsKind(SyntaxKind.SingleLineCommentTrivia))
Structure\CSharpStructureHelpers.cs (1)
244var firstComment = startToken.LeadingTrivia.FirstOrNull(t => t.Kind() is SyntaxKind.SingleLineCommentTrivia or SyntaxKind.SingleLineDocumentationCommentTrivia);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\SuppressionTests.cs (1)
1106foreach (var trivia in context.Node.DescendantTrivia().Where(t => t.Kind() is SyntaxKind.SingleLineCommentTrivia or SyntaxKind.MultiLineCommentTrivia))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (10)
LexicalAndXml\LexicalTests.cs (4)
116Assert.Equal(SyntaxKind.SingleLineCommentTrivia, trivia[0].Kind()); 135Assert.Equal(SyntaxKind.SingleLineCommentTrivia, trivia[0].Kind()); 172Assert.Equal(SyntaxKind.SingleLineCommentTrivia, trivia.Kind()); 604Assert.Equal(SyntaxKind.SingleLineCommentTrivia, trivia[0].Kind());
LexicalAndXml\XmlDocCommentTests.cs (2)
102Assert.Equal(SyntaxKind.SingleLineCommentTrivia, leading[0].Kind()); 120Assert.Equal(SyntaxKind.SingleLineCommentTrivia, leading[1].Kind());
Parsing\ScriptParsingTests.cs (1)
9713Assert.Equal(SyntaxKind.SingleLineCommentTrivia, eof.GetLeadingTrivia().Single().Kind());
Syntax\SyntaxNodeTests.cs (1)
631Assert.Equal(SyntaxKind.SingleLineCommentTrivia, list[0].Kind());
Syntax\SyntaxTriviaListTests.cs (2)
237Assert.Equal(-1, list.IndexOf(SyntaxKind.SingleLineCommentTrivia)); 238Assert.False(list.Any(SyntaxKind.SingleLineCommentTrivia));
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Classification\Worker.cs (1)
209case SyntaxKind.SingleLineCommentTrivia:
Classification\Worker_Preprocesser.cs (1)
101if (allowComments && trivia.Kind() == SyntaxKind.SingleLineCommentTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (3)
25=> trivia.Kind() is SyntaxKind.MultiLineCommentTrivia or SyntaxKind.SingleLineCommentTrivia; 37=> trivia.Kind() == SyntaxKind.SingleLineCommentTrivia; 66if (trivia.Kind() == SyntaxKind.SingleLineCommentTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaListExtensions.cs (1)
38.Where(t => t is (kind: SyntaxKind.SingleLineCommentTrivia or SyntaxKind.MultiLineCommentTrivia or SyntaxKind.WhitespaceTrivia))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpFileBannerFacts.cs (1)
22=> trivia.Kind() is SyntaxKind.SingleLineCommentTrivia or SyntaxKind.MultiLineCommentTrivia or SyntaxKind.SingleLineDocumentationCommentTrivia or SyntaxKind.MultiLineDocumentationCommentTrivia
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
30public int SingleLineCommentTrivia => (int)SyntaxKind.SingleLineCommentTrivia;
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (1)
207t.IsKind(SyntaxKind.SingleLineCommentTrivia) ||
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\MethodXml\MethodXmlBuilder.cs (1)
42if (trivia.Kind() == SyntaxKind.SingleLineCommentTrivia)