404 references to Kind
Microsoft.CodeAnalysis.CSharp (22)
Compilation\CSharpCompilation.cs (2)
4731Func<SyntaxTrivia, bool> isComment = trivia => trivia.Kind() == SyntaxKind.SingleLineCommentTrivia || trivia.Kind() == SyntaxKind.MultiLineCommentTrivia;
Compiler\DocumentationCommentCompiler.cs (1)
274if (trivia.Kind() is SyntaxKind.SingleLineDocumentationCommentTrivia or SyntaxKind.MultiLineDocumentationCommentTrivia)
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
100if (!_isValidLocation && SyntaxFacts.IsDocumentationCommentTrivia(trivia.Kind()))
DocumentationComments\SourceDocumentationCommentUtils.cs (1)
66switch (trivia.Kind())
Syntax\CSharpSyntaxNode.cs (1)
385if (!SyntaxFacts.IsDocumentationCommentTrivia(trivia.Kind()))
Syntax\CSharpSyntaxRewriter.cs (1)
301if (alternate != null && visited.Kind() != SyntaxKind.None)
Syntax\CSharpSyntaxTree.cs (2)
737isComment: trivia => trivia.Kind() == SyntaxKind.SingleLineCommentTrivia || trivia.Kind() == SyntaxKind.MultiLineCommentTrivia,
Syntax\SyntaxFactory.cs (1)
2417if (trivia.ContainsDiagnostics && trivia.Kind() == SyntaxKind.MultiLineCommentTrivia)
Syntax\SyntaxNodeRemover.cs (3)
128return trivia.Kind() == SyntaxKind.EndOfLineTrivia 129|| trivia.Kind() == SyntaxKind.SingleLineCommentTrivia 140if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
Syntax\SyntaxNormalizer.cs (9)
1164switch (trivia.Kind()) 1171return !SyntaxFacts.IsPreprocessorDirective(trivia.Kind()); 1183var kind = trivia.Kind(); 1195var kind = trivia.Kind(); 1209switch (trivia.Kind()) 1229if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 1234if (trivia.Kind() == SyntaxKind.PreprocessingMessageTrivia || trivia.Kind() == SyntaxKind.DisabledTextTrivia) 1299if (SyntaxFacts.IsPreprocessorDirective(trivia.Kind()))
Microsoft.CodeAnalysis.CSharp.CodeStyle (58)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
67var lastPragma = root.GetFirstToken().LeadingTrivia.LastOrDefault(t => t.Kind() is SyntaxKind.PragmaWarningDirectiveTrivia);
src\Analyzers\CSharp\Analyzers\FileHeaders\CSharpFileHeaderHelper.cs (1)
48throw ExceptionUtilities.UnexpectedValue(commentTrivia.Kind());
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
105if (nextToken.LeadingTrivia.Any(static t => t.Kind() is
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
86if (nextToken.LeadingTrivia.Any(static t => t.Kind() is
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
82if (colonToken.TrailingTrivia.Last().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\BlockSyntaxExtensions.cs (2)
65if (leadingDirectives.Any(t => t.Kind() == SyntaxKind.EndIfDirectiveTrivia)) 91if (nextTrivia.Kind() == SyntaxKind.DisabledTextTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
603var hasLeadingDirective = node.GetLeadingTrivia().Any(t => SyntaxFacts.IsPreprocessorDirective(t.Kind()));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
493if (trivia.Kind() == SyntaxKind.DisabledTextTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (12)
22=> kind = trivia.Kind(); 25=> trivia.Kind() is SyntaxKind.MultiLineCommentTrivia or SyntaxKind.SingleLineCommentTrivia; 37=> trivia.Kind() == SyntaxKind.SingleLineCommentTrivia; 40=> trivia.Kind() == SyntaxKind.MultiLineCommentTrivia; 43=> trivia.Kind() == SyntaxKind.ShebangDirectiveTrivia; 47if (trivia.Kind() != SyntaxKind.MultiLineCommentTrivia) 58=> trivia.Kind() == SyntaxKind.SingleLineDocumentationCommentTrivia; 61=> trivia.Kind() == SyntaxKind.MultiLineDocumentationCommentTrivia; 66if (trivia.Kind() == SyntaxKind.SingleLineCommentTrivia) 75else if (trivia.Kind() == SyntaxKind.MultiLineCommentTrivia) 148=> trivia.Kind() == SyntaxKind.EndOfLineTrivia; 151=> trivia.Kind() == SyntaxKind.WhitespaceTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaListExtensions.cs (3)
21.Where(t => t.Kind() == SyntaxKind.EndOfLineTrivia) 43=> triviaList.SkipWhile(t => t.Kind() == SyntaxKind.WhitespaceTrivia); 52if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (9)
87if (SyntaxFacts.IsPreprocessorDirective(trivia2.Kind())) 100if (trivia2.Kind() is SyntaxKind.RegionDirectiveTrivia or SyntaxKind.EndRegionDirectiveTrivia) 149if (!trivia1.IsKind(trivia2.Kind()) || trivia2.IsMultiLineComment() || trivia2.IsMultiLineDocComment() || existingWhitespaceBetween.Lines > 1) 199var isStartOrEndOfFile = (this.Token1.RawKind == 0 || this.Token2.RawKind == 0) && (trivia1.Kind() == 0 || trivia2.Kind() == 0); 200var isAtEndOfFileToken = (Token2.IsKind(SyntaxKind.EndOfFileToken) && trivia2.Kind() == 0); 210if (trivia.Kind() == SyntaxKind.MultiLineCommentTrivia) 324if (trivia.Kind() == SyntaxKind.SkippedTokensTrivia) 353if (trivia.Kind() == SyntaxKind.SkippedTokensTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.DocumentationCommentExteriorCommentRewriter.cs (1)
35if (trivia.Kind() == SyntaxKind.DocumentationCommentExteriorTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (7)
101if (trivia.Kind() == SyntaxKind.WhitespaceTrivia) 105else if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 113else if (trivia.Kind() == SyntaxKind.SkippedTokensTrivia) 117else if (trivia.Kind() is SyntaxKind.DisabledTextTrivia or 122else if (trivia.Kind() == SyntaxKind.ConflictMarkerTrivia) 128Contract.ThrowIfFalse(SyntaxFacts.IsPreprocessorDirective(trivia.Kind())); 155Debug.Assert(trivia.Kind() == SyntaxKind.WhitespaceTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (8)
127if (trivia.Kind() != SyntaxKind.WhitespaceTrivia) 156if (trivia.Kind() != SyntaxKind.EndOfLineTrivia) 215if (trivia.Kind() is not SyntaxKind.SkippedTokensTrivia and 226if (trivia.Kind() is not SyntaxKind.RegionDirectiveTrivia and 248if (!SyntaxFacts.IsPreprocessorDirective(trivia.Kind())) 271trivia.Kind() == SyntaxKind.WhitespaceTrivia || 272trivia.Kind() == SyntaxKind.EndOfLineTrivia) 334if (xmlTrivia.Kind() == SyntaxKind.DocumentationCommentExteriorTrivia)
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)
482return trivia.Kind() is SyntaxKind.WhitespaceTrivia
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (4)
1109if (trivia.Kind() == SyntaxKind.DisabledTextTrivia) 1226=> trivia.Kind() == SyntaxKind.DocumentationCommentExteriorTrivia; 1370=> SyntaxFacts.IsPreprocessorDirective(trivia.Kind()); 1437throw ExceptionUtilities.UnexpectedValue(trivia.Kind());
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 (6)
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
52if (firstTrivia.Kind() != SyntaxKind.SkippedTokensTrivia)
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
106return previousToken.TrailingTrivia.All(t => t.Kind() == SyntaxKind.WhitespaceTrivia)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
860while (index - 1 >= 0 && trivia[index - 1].Kind() == SyntaxKind.WhitespaceTrivia)
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
95if (t1.Kind() == SyntaxKind.MultiLineCommentTrivia) 103else if (t1.Kind() == SyntaxKind.SkippedTokensTrivia)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
BlockCommentEditing\BlockCommentEditingCommandHandler.cs (1)
285var isBlockComment = trivia.Kind() is SyntaxKind.MultiLineCommentTrivia or SyntaxKind.MultiLineDocumentationCommentTrivia;
Microsoft.CodeAnalysis.CSharp.Features (30)
AddFileBanner\CSharpAddFileBannerCodeRefactoringProvider.cs (1)
27switch (trivia.Kind())
BraceMatching\BlockCommentBraceMatcher.cs (2)
47if (trivia.Kind() is SyntaxKind.MultiLineCommentTrivia && 52else if (trivia.Kind() is SyntaxKind.MultiLineDocumentationCommentTrivia)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (2)
94=> trivia.Kind() is SyntaxKind.EndOfLineTrivia or SyntaxKind.SingleLineDocumentationCommentTrivia; 224if (trivia.Kind() == SyntaxKind.PragmaWarningDirectiveTrivia)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
195switch (list[i].Kind())
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
165while (commentIndex < leadingTrivia.Count && leadingTrivia[commentIndex].Kind() is SyntaxKind.EndOfLineTrivia)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
226namespaceDeclaration.GetLeadingTrivia().TakeWhile(t => t.Kind() is SyntaxKind.WhitespaceTrivia or SyntaxKind.EndOfLineTrivia));
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (2)
351&& firstTextToken.LeadingTrivia.ElementAt(0).Kind() == SyntaxKind.DocumentationCommentExteriorTrivia 360=> token.TrailingTrivia.Any(t => t.Kind() == SyntaxKind.SkippedTokensTrivia);
DocumentationComments\DocCommentConverter.cs (1)
54if (trivia.Kind() == SyntaxKind.SingleLineDocumentationCommentTrivia)
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
214if (trivia.Kind() is not SyntaxKind.WhitespaceTrivia and
ExtractMethod\Extensions.cs (1)
179switch (trivia.Kind())
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
428var precedingEndOfLine = nextStatementLeading.LastOrDefault(t => t.Kind() == SyntaxKind.EndOfLineTrivia);
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (1)
219return trivia.Kind() is SyntaxKind.MultiLineCommentTrivia or SyntaxKind.SingleLineCommentTrivia;
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
129else if (trivia.Kind() is not SyntaxKind.WhitespaceTrivia and not SyntaxKind.EndOfLineTrivia)
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (1)
239if (trivia.Kind() is SyntaxKind.MultiLineDocumentationCommentTrivia or
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
67var lastPragma = root.GetFirstToken().LeadingTrivia.LastOrDefault(t => t.Kind() is SyntaxKind.PragmaWarningDirectiveTrivia);
src\Analyzers\CSharp\Analyzers\FileHeaders\CSharpFileHeaderHelper.cs (1)
48throw ExceptionUtilities.UnexpectedValue(commentTrivia.Kind());
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
105if (nextToken.LeadingTrivia.Any(static t => t.Kind() is
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
86if (nextToken.LeadingTrivia.Any(static t => t.Kind() is
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
82if (colonToken.TrailingTrivia.Last().Kind() != SyntaxKind.EndOfLineTrivia)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
236.Where(t => t.Kind() != SyntaxKind.EndOfLineTrivia)
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
52if (firstTrivia.Kind() != SyntaxKind.SkippedTokensTrivia)
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
106return previousToken.TrailingTrivia.All(t => t.Kind() == SyntaxKind.WhitespaceTrivia)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
860while (index - 1 >= 0 && trivia[index - 1].Kind() == SyntaxKind.WhitespaceTrivia)
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();
Structure\Providers\DisabledTextTriviaStructureProvider.cs (1)
92switch (currentTrivia.Kind())
TaskList\CSharpTaskListService.cs (2)
85return trivia.Kind() != SyntaxKind.RegionDirectiveTrivia && 86SyntaxFacts.IsPreprocessorDirective(trivia.Kind()) && trivia.ToString().IndexOf(SingleLineCommentPrefix, StringComparison.Ordinal) > 0;
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 (217)
LexicalAndXml\LexicalTests.cs (115)
116Assert.Equal(SyntaxKind.SingleLineCommentTrivia, trivia[0].Kind()); 135Assert.Equal(SyntaxKind.SingleLineCommentTrivia, trivia[0].Kind()); 154Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, trivia[0].Kind()); 172Assert.Equal(SyntaxKind.SingleLineCommentTrivia, trivia.Kind()); 194Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 216Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 238Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, trivia[0].Kind()); 256Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 278Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 302Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 326Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 348Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 370Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 392Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 412Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 440Assert.Equal(SyntaxKind.MultiLineCommentTrivia, trivia[0].Kind()); 486Assert.Equal(SyntaxKind.EndOfLineTrivia, token.TrailingTrivia[0].Kind()); 520Assert.Equal(SyntaxKind.EndOfLineTrivia, token.TrailingTrivia[0].Kind()); 546Assert.Equal(SyntaxKind.IfDirectiveTrivia, trivia[0].Kind()); 547Assert.Equal(SyntaxKind.DisabledTextTrivia, trivia[1].Kind()); 548Assert.Equal(SyntaxKind.EndIfDirectiveTrivia, trivia[2].Kind()); 577Assert.Equal(SyntaxKind.IfDirectiveTrivia, token.GetLeadingTrivia()[0].Kind()); 583Assert.Equal(SyntaxKind.EndIfDirectiveTrivia, token.GetLeadingTrivia()[0].Kind()); 604Assert.Equal(SyntaxKind.SingleLineCommentTrivia, trivia[0].Kind()); 3619Assert.Equal(SyntaxKind.WhitespaceTrivia, leading[0].Kind()); 3625Assert.Equal(SyntaxKind.WhitespaceTrivia, trailing[0].Kind()); 3637Assert.Equal(SyntaxKind.WhitespaceTrivia, leading[0].Kind()); 3643Assert.Equal(SyntaxKind.WhitespaceTrivia, trailing[0].Kind()); 3658Assert.Equal(SyntaxKind.WhitespaceTrivia, leading[0].Kind()); 3664Assert.Equal(SyntaxKind.WhitespaceTrivia, trailing[0].Kind()); 3840Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3851Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 3868Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3877Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 3899Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3922Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3940Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3950Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.ConflictMarkerTrivia); 3957Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 3970Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 3979Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 3984Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 3994Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4003Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4007Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4015Assert.True(trivia1.Kind() == SyntaxKind.ConflictMarkerTrivia); 4024Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4029Assert.True(trivia3.Kind() == SyntaxKind.DisabledTextTrivia); 4034Assert.True(trivia4.Kind() == SyntaxKind.ConflictMarkerTrivia); 4048Assert.True(trivia1.Kind() == SyntaxKind.ConflictMarkerTrivia); 4057Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4062Assert.True(trivia3.Kind() == SyntaxKind.ConflictMarkerTrivia); 4079Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 4089Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.ConflictMarkerTrivia); 4096Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4104Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4108Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4113Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4123Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4127Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4131Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4139Assert.True(trivia1.Kind() == SyntaxKind.ConflictMarkerTrivia); 4143Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4148Assert.True(trivia3.Kind() == SyntaxKind.DisabledTextTrivia); 4153Assert.True(trivia4.Kind() == SyntaxKind.ConflictMarkerTrivia); 4174Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4180Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4183Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4192Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4214Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4220Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4223Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4232Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4245Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 4255Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.ConflictMarkerTrivia); 4262Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4277Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4285Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4288Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4300Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4308Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4311Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4322Assert.True(trivia1.Kind() == SyntaxKind.ConflictMarkerTrivia); 4330Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4333Assert.True(trivia3.Kind() == SyntaxKind.DisabledTextTrivia); 4336Assert.True(trivia4.Kind() == SyntaxKind.ConflictMarkerTrivia); 4351Assert.True(trivia1.Kind() == SyntaxKind.ConflictMarkerTrivia); 4359Assert.True(trivia2.Kind() == SyntaxKind.EndOfLineTrivia); 4362Assert.True(trivia3.Kind() == SyntaxKind.ConflictMarkerTrivia); 4383Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4389Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4392Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4398Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4401Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4422Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4428Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4431Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4438Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4444Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4447Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4454Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4478Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4484Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4487Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4494Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4500Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4503Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4512Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4536Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4542Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4545Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4554Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia); 4560Assert.True(trivia.Kind() == SyntaxKind.EndOfLineTrivia); 4563Assert.True(trivia.Kind() == SyntaxKind.DisabledTextTrivia); 4570Assert.True(trivia.Kind() == SyntaxKind.ConflictMarkerTrivia);
LexicalAndXml\PreprocessorTests.cs (10)
2106Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind()); 2128Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind()); 2216Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind()); 2237Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind()); 2258Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind()); 2279Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind()); 2300Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind()); 2321Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind()); 2342Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind()); 2363Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, regionText.Kind());
LexicalAndXml\SyntaxTokenParserTests.cs (2)
86Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, docCommentTrivia.Kind()); 422Assert.Equal(kind, leadingTrivia[i].Kind());
LexicalAndXml\XmlDocCommentTests.cs (60)
83Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 102Assert.Equal(SyntaxKind.SingleLineCommentTrivia, leading[0].Kind()); 119Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, leading[0].Kind()); 120Assert.Equal(SyntaxKind.SingleLineCommentTrivia, leading[1].Kind()); 134Assert.Equal(SyntaxKind.MultiLineCommentTrivia, leading[0].Kind()); 152Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 173Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 198Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 220Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 243Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 266Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 293Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 321Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 345Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 370Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 396Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 423Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 450Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 478Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 507Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 537Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 566Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 596Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 627Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 650Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 672Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 694Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 716Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 738Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 758Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 792Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 825Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 856Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 884Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 909Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 935Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 960Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 987Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1018Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1046Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1071Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1096Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1123Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1156Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1187Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1213Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1240Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1268Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1313Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1337Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1362Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1386Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1411Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1435Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1460Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1484Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1564Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1592Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind()); 1620Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, node.Kind()); 1646Assert.Equal(SyntaxKind.MultiLineDocumentationCommentTrivia, node.Kind());
Parsing\ScriptParsingTests.cs (5)
9652Assert.Equal(SyntaxKind.ShebangDirectiveTrivia, leading[0].Kind()); 9653Assert.Equal(SyntaxKind.WhitespaceTrivia, leading[1].Kind()); 9713Assert.Equal(SyntaxKind.SingleLineCommentTrivia, eof.GetLeadingTrivia().Single().Kind()); 9726Assert.Equal(SyntaxKind.ShebangDirectiveTrivia, trivia.Kind()); 9741Assert.Equal(SyntaxKind.PreprocessingMessageTrivia, skippedText.Kind());
Parsing\StatementParsingTests.cs (1)
1963Assert.Equal(SyntaxKind.SkippedTokensTrivia, fs.ForEachKeyword.TrailingTrivia[0].Kind());
Syntax\StructuredTriviaTests.cs (3)
82Assert.Equal(SyntaxKind.WhitespaceTrivia, trResult.Kind()); 167var trivia = tree.GetCompilationUnitRoot().DescendantTrivia().Single(t => t.Kind() == SyntaxKind.SingleLineDocumentationCommentTrivia); 183var trivia = tree.GetCompilationUnitRoot().DescendantTrivia().Single(t => t.Kind() == SyntaxKind.MultiLineDocumentationCommentTrivia);
Syntax\SyntaxNodeTests.cs (18)
608Assert.Equal(SyntaxKind.SingleLineCommentTrivia, list[0].Kind()); 609Assert.Equal(SyntaxKind.EndOfLineTrivia, list[1].Kind()); 610Assert.Equal(SyntaxKind.WhitespaceTrivia, list[2].Kind()); 611Assert.Equal(SyntaxKind.WhitespaceTrivia, list[3].Kind()); 625Assert.Equal(SyntaxKind.EndOfLineTrivia, list[0].Kind()); 626Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, list[1].Kind()); 627Assert.Equal(SyntaxKind.DocumentationCommentExteriorTrivia, list[2].Kind()); 628Assert.Equal(SyntaxKind.WhitespaceTrivia, list[3].Kind()); 629Assert.Equal(SyntaxKind.DocumentationCommentExteriorTrivia, list[4].Kind()); 630Assert.Equal(SyntaxKind.WhitespaceTrivia, list[5].Kind()); 631Assert.Equal(SyntaxKind.WhitespaceTrivia, list[6].Kind()); 768Assert.Equal(SyntaxKind.None, trivia.Kind()); 1332Assert.Equal(SyntaxKind.DefineDirectiveTrivia, trivia.Kind()); 1343Assert.Equal(SyntaxKind.DefineDirectiveTrivia, trivia.Kind()); 1347Assert.NotEqual(SyntaxKind.None, parentTrivia.Kind()); 2359var deepTrivia = expr.GetDirectives().SelectMany(d => d.DescendantTrivia().Where(tr => tr.Kind() == SyntaxKind.WhitespaceTrivia)).ToList(); 2395Assert.Equal(SyntaxKind.MultiLineCommentTrivia, comment1.Kind()); 2417Assert.Equal(SyntaxKind.MultiLineCommentTrivia, comment1.Kind());
Syntax\SyntaxRewriterTests.cs (3)
200trivia.Kind() == SyntaxKind.WhitespaceTrivia ? default(SyntaxTrivia) : trivia); 470Assert.Equal(SyntaxKind.MultiLineCommentTrivia, comment1.Kind()); 497Assert.Equal(SyntaxKind.MultiLineCommentTrivia, comment1.Kind());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
492if (trivia.Kind() == SyntaxKind.MultiLineCommentTrivia)
Microsoft.CodeAnalysis.CSharp.Workspaces (60)
Classification\Worker.cs (3)
207switch (trivia.Kind()) 280triviaList[index - 1].Kind() == SyntaxKind.EndOfLineTrivia && 281triviaList[index - 2].Kind() == SyntaxKind.ConflictMarkerTrivia)
Classification\Worker_DocumentationComments.cs (1)
70switch (t.Kind())
Classification\Worker_Preprocesser.cs (2)
85if (trivia.Kind() == SyntaxKind.WhitespaceTrivia) 101if (allowComments && trivia.Kind() == SyntaxKind.SingleLineCommentTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
65if (leadingDirectives.Any(t => t.Kind() == SyntaxKind.EndIfDirectiveTrivia)) 91if (nextTrivia.Kind() == SyntaxKind.DisabledTextTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
603var hasLeadingDirective = node.GetLeadingTrivia().Any(t => SyntaxFacts.IsPreprocessorDirective(t.Kind()));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
493if (trivia.Kind() == SyntaxKind.DisabledTextTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (12)
22=> kind = trivia.Kind(); 25=> trivia.Kind() is SyntaxKind.MultiLineCommentTrivia or SyntaxKind.SingleLineCommentTrivia; 37=> trivia.Kind() == SyntaxKind.SingleLineCommentTrivia; 40=> trivia.Kind() == SyntaxKind.MultiLineCommentTrivia; 43=> trivia.Kind() == SyntaxKind.ShebangDirectiveTrivia; 47if (trivia.Kind() != SyntaxKind.MultiLineCommentTrivia) 58=> trivia.Kind() == SyntaxKind.SingleLineDocumentationCommentTrivia; 61=> trivia.Kind() == SyntaxKind.MultiLineDocumentationCommentTrivia; 66if (trivia.Kind() == SyntaxKind.SingleLineCommentTrivia) 75else if (trivia.Kind() == SyntaxKind.MultiLineCommentTrivia) 148=> trivia.Kind() == SyntaxKind.EndOfLineTrivia; 151=> trivia.Kind() == SyntaxKind.WhitespaceTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaListExtensions.cs (3)
21.Where(t => t.Kind() == SyntaxKind.EndOfLineTrivia) 43=> triviaList.SkipWhile(t => t.Kind() == SyntaxKind.WhitespaceTrivia); 52if (trivia.Kind() == SyntaxKind.EndOfLineTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (9)
87if (SyntaxFacts.IsPreprocessorDirective(trivia2.Kind())) 100if (trivia2.Kind() is SyntaxKind.RegionDirectiveTrivia or SyntaxKind.EndRegionDirectiveTrivia) 149if (!trivia1.IsKind(trivia2.Kind()) || trivia2.IsMultiLineComment() || trivia2.IsMultiLineDocComment() || existingWhitespaceBetween.Lines > 1) 199var isStartOrEndOfFile = (this.Token1.RawKind == 0 || this.Token2.RawKind == 0) && (trivia1.Kind() == 0 || trivia2.Kind() == 0); 200var isAtEndOfFileToken = (Token2.IsKind(SyntaxKind.EndOfFileToken) && trivia2.Kind() == 0); 210if (trivia.Kind() == SyntaxKind.MultiLineCommentTrivia) 324if (trivia.Kind() == SyntaxKind.SkippedTokensTrivia) 353if (trivia.Kind() == SyntaxKind.SkippedTokensTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.DocumentationCommentExteriorCommentRewriter.cs (1)
35if (trivia.Kind() == SyntaxKind.DocumentationCommentExteriorTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (7)
101if (trivia.Kind() == SyntaxKind.WhitespaceTrivia) 105else if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 113else if (trivia.Kind() == SyntaxKind.SkippedTokensTrivia) 117else if (trivia.Kind() is SyntaxKind.DisabledTextTrivia or 122else if (trivia.Kind() == SyntaxKind.ConflictMarkerTrivia) 128Contract.ThrowIfFalse(SyntaxFacts.IsPreprocessorDirective(trivia.Kind())); 155Debug.Assert(trivia.Kind() == SyntaxKind.WhitespaceTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (8)
127if (trivia.Kind() != SyntaxKind.WhitespaceTrivia) 156if (trivia.Kind() != SyntaxKind.EndOfLineTrivia) 215if (trivia.Kind() is not SyntaxKind.SkippedTokensTrivia and 226if (trivia.Kind() is not SyntaxKind.RegionDirectiveTrivia and 248if (!SyntaxFacts.IsPreprocessorDirective(trivia.Kind())) 271trivia.Kind() == SyntaxKind.WhitespaceTrivia || 272trivia.Kind() == SyntaxKind.EndOfLineTrivia) 334if (xmlTrivia.Kind() == SyntaxKind.DocumentationCommentExteriorTrivia)
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)
482return trivia.Kind() is SyntaxKind.WhitespaceTrivia
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (4)
1109if (trivia.Kind() == SyntaxKind.DisabledTextTrivia) 1226=> trivia.Kind() == SyntaxKind.DocumentationCommentExteriorTrivia; 1370=> SyntaxFacts.IsPreprocessorDirective(trivia.Kind()); 1437throw ExceptionUtilities.UnexpectedValue(trivia.Kind());
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\CSharpCodeGenerationHelpers.cs (2)
95if (t1.Kind() == SyntaxKind.MultiLineCommentTrivia) 103else if (t1.Kind() == SyntaxKind.SkippedTokensTrivia)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
EmbeddedLanguages\VirtualChars\CSharpVirtualCharServiceTests.cs (1)
124var skippedTrivia = namespaceDeclaration.OpenBraceToken.TrailingTrivia.Single(t => t.Kind() is SyntaxKind.SkippedTokensTrivia);
Microsoft.CodeAnalysis.UnitTests (2)
CommonSyntaxTests.cs (2)
117Assert.Equal(CSharp.SyntaxKind.MultiLineCommentTrivia, CSharp.CSharpExtensions.Kind(csharpTrivia)); 202Assert.Equal(CSharp.SyntaxKind.None, CSharp.CSharpExtensions.Kind(trivia));
Microsoft.VisualStudio.LanguageServices.CSharp (5)
CodeModel\CSharpCodeModelService.cs (4)
1231else if (trivia.Kind() is not SyntaxKind.WhitespaceTrivia and 1309leadingTriviaList[firstIndex].Kind() == SyntaxKind.EndOfLineTrivia) 2858if (trivia.Kind() == SyntaxKind.EndOfLineTrivia) 2869else if (trivia.Kind() != SyntaxKind.WhitespaceTrivia)
CodeModel\MethodXml\MethodXmlBuilder.cs (1)
42if (trivia.Kind() == SyntaxKind.SingleLineCommentTrivia)