131 references to RawKind
Microsoft.CodeAnalysis (2)
Syntax\SyntaxTrivia.cs (1)
33Debug.Assert(this.RawKind != 0 || this.Equals(default(SyntaxTrivia)));
Syntax\SyntaxTriviaList.cs (1)
249if (this[i].RawKind == rawKind)
Microsoft.CodeAnalysis.CodeStyle (29)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (6)
61if (trivia.RawKind == WhitespaceTriviaKind) 65else if (trivia.RawKind == SingleLineCommentTriviaKind) 80else if (trivia.RawKind == MultiLineCommentTriviaKind) 100else if (trivia.RawKind == EndOfLineTriviaKind) 149if (currentTrivia.RawKind != EndOfLineTriviaKind 150&& currentTrivia.RawKind != WhitespaceTriviaKind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
876if (trivia.RawKind == syntaxKinds.RegionDirectiveTrivia) 880else if (trivia.RawKind == syntaxKinds.IfDirectiveTrivia || 881trivia.RawKind == syntaxKinds.ElifDirectiveTrivia || 882trivia.RawKind == syntaxKinds.ElseDirectiveTrivia) 886else if (trivia.RawKind == syntaxKinds.EndRegionDirectiveTrivia) 897else if (trivia.RawKind == syntaxKinds.EndIfDirectiveTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (10)
301if (trivia.RawKind == 0) 382var lineColumnAfterTrivia1 = trivia1.RawKind == 0 ? 467if (trivia1.RawKind == 0) 481if (trivia2.RawKind == 0) 548if ((this.Token1.IsMissing && trivia1.RawKind == 0) || 549(trivia2.RawKind == 0 && this.Token2.IsMissing)) 576LineColumnRule.IndentationOperations.Default => this.Context.GetBaseIndentation(trivia2.RawKind == 0 ? this.EndPosition : trivia2.SpanStart), 577LineColumnRule.IndentationOperations.Given => (trivia2.RawKind == 0) ? this.Spaces : Math.Max(0, _indentation), 834if (trivia1.RawKind == 0) 839if (trivia2.RawKind == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (7)
675=> trivia.RawKind == syntaxFacts.SyntaxKinds.EndOfLineTrivia; 678=> trivia.RawKind == syntaxFacts.SyntaxKinds.MultiLineCommentTrivia; 681=> trivia.RawKind == syntaxFacts.SyntaxKinds.MultiLineDocCommentTrivia; 684=> trivia.RawKind == syntaxFacts.SyntaxKinds.ShebangDirectiveTrivia; 687=> trivia.RawKind == syntaxFacts.SyntaxKinds.SingleLineCommentTrivia; 690=> trivia.RawKind == syntaxFacts.SyntaxKinds.SingleLineDocCommentTrivia; 693=> trivia.RawKind == syntaxFacts.SyntaxKinds.WhitespaceTrivia;
Microsoft.CodeAnalysis.CodeStyle.Fixes (15)
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (6)
111if (startTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 118if (startTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 122if (firstMiddleLine != secondMiddleLine && firstMiddleTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 129if (startTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 133if (firstMiddleLine != secondMiddleLine && firstMiddleTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 137if (secondMiddleTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia)
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (5)
120if (triviaLine.RawKind == syntaxFacts.SyntaxKinds.SingleLineCommentTrivia) 132else if (triviaLine.RawKind == syntaxFacts.SyntaxKinds.WhitespaceTrivia) 141else if (triviaLine.RawKind == syntaxFacts.SyntaxKinds.EndOfLineTrivia) 185if (leadingTrivia[i].RawKind == syntaxFacts.SyntaxKinds.EndOfLineTrivia) 189else if (leadingTrivia[i].RawKind != syntaxFacts.SyntaxKinds.WhitespaceTrivia)
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (2)
75if (trivia.RawKind != syntaxKinds.EndOfLineTrivia) 142return trivia.RawKind == syntaxKinds.EndOfLineTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (1)
180if (nextToken != default && !commaToken.TrailingTrivia.Any(t => t.RawKind == syntaxKinds.EndOfLineTrivia))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (1)
143if (lastWhitespace.RawKind != 0)
Microsoft.CodeAnalysis.CSharp (3)
CSharpExtensions.cs (3)
38return trivia.RawKind == (int)kind; 196/// Returns <see cref="SyntaxKind"/> for <see cref="SyntaxTrivia"/> from <see cref="SyntaxTrivia.RawKind"/> property. 200var rawKind = trivia.RawKind;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
38=> trivia.RawKind == (int)SyntaxKind.WhitespaceTrivia; 41=> trivia.RawKind == (int)SyntaxKind.EndOfLineTrivia;
Microsoft.CodeAnalysis.CSharp.Features (1)
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
256=> trivia.RawKind == (int)SyntaxKind.EndOfLineTrivia;
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
38=> trivia.RawKind == (int)SyntaxKind.WhitespaceTrivia; 41=> trivia.RawKind == (int)SyntaxKind.EndOfLineTrivia;
Microsoft.CodeAnalysis.Features (30)
ExtractMethod\AbstractSyntaxTriviaService.Result.cs (1)
91if (list[i].RawKind == _endOfLineKind)
ExtractMethod\MethodExtractor.TriviaResult.cs (8)
55if (list.Any(t => t.RawKind != _endOfLineKind && t.RawKind != _whitespaceKind)) 77if (trivia.RawKind == _endOfLineKind) 82if (currentLine.All(t => t.RawKind == _endOfLineKind || t.RawKind == _whitespaceKind)) 119if (trivia.RawKind == _endOfLineKind) 147if (trivia.RawKind == _endOfLineKind) 155while (!top.IsElastic() && top.RawKind == _whitespaceKind)
ExtractMethod\MethodExtractor.VariableSymbol.cs (1)
304=> list.Any(t => !_nonNoisySet.Contains(t.RawKind));
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (6)
61if (trivia.RawKind == WhitespaceTriviaKind) 65else if (trivia.RawKind == SingleLineCommentTriviaKind) 80else if (trivia.RawKind == MultiLineCommentTriviaKind) 100else if (trivia.RawKind == EndOfLineTriviaKind) 149if (currentTrivia.RawKind != EndOfLineTriviaKind 150&& currentTrivia.RawKind != WhitespaceTriviaKind)
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (6)
111if (startTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 118if (startTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 122if (firstMiddleLine != secondMiddleLine && firstMiddleTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 129if (startTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 133if (firstMiddleLine != secondMiddleLine && firstMiddleTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia) 137if (secondMiddleTrivia.RawKind == _syntaxKinds.ConflictMarkerTrivia)
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (5)
120if (triviaLine.RawKind == syntaxFacts.SyntaxKinds.SingleLineCommentTrivia) 132else if (triviaLine.RawKind == syntaxFacts.SyntaxKinds.WhitespaceTrivia) 141else if (triviaLine.RawKind == syntaxFacts.SyntaxKinds.EndOfLineTrivia) 185if (leadingTrivia[i].RawKind == syntaxFacts.SyntaxKinds.EndOfLineTrivia) 189else if (leadingTrivia[i].RawKind != syntaxFacts.SyntaxKinds.WhitespaceTrivia)
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (2)
75if (trivia.RawKind != syntaxKinds.EndOfLineTrivia) 142return trivia.RawKind == syntaxKinds.EndOfLineTrivia;
Structure\Syntax\BlockSpanCollector.cs (1)
87if (_triviaProviderMap.TryGetValue(trivia.RawKind, out var providers))
Microsoft.CodeAnalysis.VisualBasic (3)
VisualBasicExtensions.vb (3)
30Return trivia.RawKind = kind 187''' Returns <see cref="SyntaxKind"/> for <see cref="SyntaxTrivia"/> from <see cref="SyntaxTrivia.RawKind"/> property. 191Dim rawKind = trivia.RawKind
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (7)
src\Workspaces\VisualBasic\Portable\Formatting\DefaultOperationProvider.vb (4)
67If lastTrivia.RawKind = SyntaxKind.ColonTrivia Then 69ElseIf lastTrivia.RawKind = SyntaxKind.LineContinuationTrivia AndAlso previousToken.Parent.GetAncestorsOrThis(Of SyntaxNode)().Any(Function(node As SyntaxNode) IsSingleLineIfOrElseClauseSyntax(node)) Then 157Return trivia.RawKind = SyntaxKind.ColonTrivia OrElse trivia.RawKind = SyntaxKind.LineContinuationTrivia
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (3)
36Return trivia.RawKind = SyntaxKind.WhitespaceTrivia 40Return trivia.RawKind = SyntaxKind.EndOfLineTrivia 110Dim firstLine = (trivia1.RawKind = SyntaxKind.None) AndAlso (Token1.Kind = SyntaxKind.None)
Microsoft.CodeAnalysis.VisualBasic.Features (4)
DocumentationComments\VisualBasicDocumentationCommentSnippetService.vb (1)
252Return trivia.RawKind = SyntaxKind.EndOfLineTrivia
TaskList\VisualBasicTaskListService.vb (3)
101Return trivia.RawKind = SyntaxKind.CommentTrivia OrElse trivia.RawKind = SyntaxKind.DocumentationCommentTrivia 105Return SyntaxFacts.IsPreprocessorDirective(CType(trivia.RawKind, SyntaxKind)) AndAlso
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
Formatting\DefaultOperationProvider.vb (4)
67If lastTrivia.RawKind = SyntaxKind.ColonTrivia Then 69ElseIf lastTrivia.RawKind = SyntaxKind.LineContinuationTrivia AndAlso previousToken.Parent.GetAncestorsOrThis(Of SyntaxNode)().Any(Function(node As SyntaxNode) IsSingleLineIfOrElseClauseSyntax(node)) Then 157Return trivia.RawKind = SyntaxKind.ColonTrivia OrElse trivia.RawKind = SyntaxKind.LineContinuationTrivia
Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (3)
36Return trivia.RawKind = SyntaxKind.WhitespaceTrivia 40Return trivia.RawKind = SyntaxKind.EndOfLineTrivia 110Dim firstLine = (trivia1.RawKind = SyntaxKind.None) AndAlso (Token1.Kind = SyntaxKind.None)
Microsoft.CodeAnalysis.Workspaces (26)
FindSymbols\Shared\AbstractSyntaxIndex.cs (1)
172if (trivia.RawKind == ifDirectiveKind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
876if (trivia.RawKind == syntaxKinds.RegionDirectiveTrivia) 880else if (trivia.RawKind == syntaxKinds.IfDirectiveTrivia || 881trivia.RawKind == syntaxKinds.ElifDirectiveTrivia || 882trivia.RawKind == syntaxKinds.ElseDirectiveTrivia) 886else if (trivia.RawKind == syntaxKinds.EndRegionDirectiveTrivia) 897else if (trivia.RawKind == syntaxKinds.EndIfDirectiveTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (10)
301if (trivia.RawKind == 0) 382var lineColumnAfterTrivia1 = trivia1.RawKind == 0 ? 467if (trivia1.RawKind == 0) 481if (trivia2.RawKind == 0) 548if ((this.Token1.IsMissing && trivia1.RawKind == 0) || 549(trivia2.RawKind == 0 && this.Token2.IsMissing)) 576LineColumnRule.IndentationOperations.Default => this.Context.GetBaseIndentation(trivia2.RawKind == 0 ? this.EndPosition : trivia2.SpanStart), 577LineColumnRule.IndentationOperations.Given => (trivia2.RawKind == 0) ? this.Spaces : Math.Max(0, _indentation), 834if (trivia1.RawKind == 0) 839if (trivia2.RawKind == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (7)
675=> trivia.RawKind == syntaxFacts.SyntaxKinds.EndOfLineTrivia; 678=> trivia.RawKind == syntaxFacts.SyntaxKinds.MultiLineCommentTrivia; 681=> trivia.RawKind == syntaxFacts.SyntaxKinds.MultiLineDocCommentTrivia; 684=> trivia.RawKind == syntaxFacts.SyntaxKinds.ShebangDirectiveTrivia; 687=> trivia.RawKind == syntaxFacts.SyntaxKinds.SingleLineCommentTrivia; 690=> trivia.RawKind == syntaxFacts.SyntaxKinds.SingleLineDocCommentTrivia; 693=> trivia.RawKind == syntaxFacts.SyntaxKinds.WhitespaceTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (1)
180if (nextToken != default && !commaToken.TrailingTrivia.Any(t => t.RawKind == syntaxKinds.EndOfLineTrivia))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (1)
143if (lastWhitespace.RawKind != 0)