69 references to RegionDirectiveTrivia
Microsoft.CodeAnalysis.CSharp (13)
Parser\Directives.cs (6)
211
return prev != null && prev.Any() && prev.Head.Kind != SyntaxKind.
RegionDirectiveTrivia
;
223
return prev != null && prev.Any() && prev.Head.Kind == SyntaxKind.
RegionDirectiveTrivia
;
300
if (stack.Head.Kind == SyntaxKind.
RegionDirectiveTrivia
)
337
case SyntaxKind.
RegionDirectiveTrivia
:
350
while (current != null && current.Any() && current.Head.Kind != SyntaxKind.
RegionDirectiveTrivia
)
418
case SyntaxKind.
RegionDirectiveTrivia
:
Syntax\DirectiveTriviaSyntax.cs (5)
31
case SyntaxKind.
RegionDirectiveTrivia
:
205
case SyntaxKind.
RegionDirectiveTrivia
:
240
case SyntaxKind.
RegionDirectiveTrivia
:
309
if (d.Kind() == SyntaxKind.
RegionDirectiveTrivia
)
342
while (d != null && d.Kind() != SyntaxKind.
RegionDirectiveTrivia
)
Syntax\SyntaxKindFacts.cs (1)
280
case SyntaxKind.
RegionDirectiveTrivia
:
Syntax\SyntaxNodeRemover.cs (1)
482
case SyntaxKind.
RegionDirectiveTrivia
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
64
=> directive?.Kind() is SyntaxKind.
RegionDirectiveTrivia
or SyntaxKind.EndRegionDirectiveTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
554
if (trivia.GetStructure() is (kind: SyntaxKind.
RegionDirectiveTrivia
or SyntaxKind.EndRegionDirectiveTrivia or SyntaxKind.IfDirectiveTrivia or SyntaxKind.EndIfDirectiveTrivia))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
100
if (trivia2.Kind() is SyntaxKind.
RegionDirectiveTrivia
or SyntaxKind.EndRegionDirectiveTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (2)
65
if (trivia.Kind() == SyntaxKind.
RegionDirectiveTrivia
||
226
if (trivia.Kind() is not SyntaxKind.
RegionDirectiveTrivia
and
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
39
public int RegionDirectiveTrivia => (int)SyntaxKind.
RegionDirectiveTrivia
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
228
if (token.IsKind(SyntaxKind.HashToken) && token.Parent!.Kind() is not (SyntaxKind.
RegionDirectiveTrivia
or SyntaxKind.EndRegionDirectiveTrivia))
Microsoft.CodeAnalysis.CSharp.Features (4)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
225
if (firstToken.IsKind(SyntaxKind.HashToken) && firstToken.Parent.IsKind(SyntaxKind.
RegionDirectiveTrivia
))
ExtractMethod\Extensions.cs (1)
181
case SyntaxKind.
RegionDirectiveTrivia
:
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
228
if (token.IsKind(SyntaxKind.HashToken) && token.Parent!.Kind() is not (SyntaxKind.
RegionDirectiveTrivia
or SyntaxKind.EndRegionDirectiveTrivia))
TaskList\CSharpTaskListService.cs (1)
85
return trivia.Kind() != SyntaxKind.
RegionDirectiveTrivia
&&
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (37)
IncrementalParsing\IncrementalParsingTests.cs (4)
360
Assert.Equal(SyntaxKind.
RegionDirectiveTrivia
, oldDirectives[1].Kind());
372
Assert.Equal(SyntaxKind.
RegionDirectiveTrivia
, newDirectives[1].Kind());
406
Assert.Equal(SyntaxKind.
RegionDirectiveTrivia
, oldDirectives[1].Kind());
415
Assert.Equal(SyntaxKind.
RegionDirectiveTrivia
, newDirectives[1].Kind());
LexicalAndXml\PreprocessorTests.cs (28)
1907
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
1924
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
1925
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
1943
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
1962
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
1979
VerifyDirectives(node, SyntaxKind.
RegionDirectiveTrivia
, SyntaxKind.BadDirectiveTrivia, SyntaxKind.EndRegionDirectiveTrivia);
1994
VerifyDirectives(node, SyntaxKind.
RegionDirectiveTrivia
, SyntaxKind.BadDirectiveTrivia, SyntaxKind.EndRegionDirectiveTrivia);
2011
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2030
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2049
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsNotActive },
2068
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsNotActive },
2084
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2100
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2122
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2148
VerifyDirectives(node, SyntaxKind.
RegionDirectiveTrivia
, SyntaxKind.EndRegionDirectiveTrivia);
2165
VerifyDirectives(node, SyntaxKind.
RegionDirectiveTrivia
, SyntaxKind.EndRegionDirectiveTrivia, SyntaxKind.
RegionDirectiveTrivia
, SyntaxKind.EndRegionDirectiveTrivia);
2180
VerifyDirectives(node, SyntaxKind.
RegionDirectiveTrivia
, SyntaxKind.EndRegionDirectiveTrivia, SyntaxKind.
RegionDirectiveTrivia
, SyntaxKind.EndRegionDirectiveTrivia);
2196
VerifyDirectives(node, SyntaxKind.
RegionDirectiveTrivia
, SyntaxKind.EndRegionDirectiveTrivia);
2210
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2231
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2252
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2273
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2294
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2315
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2336
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
2357
new DirectiveInfo { Kind = SyntaxKind.
RegionDirectiveTrivia
, Status = NodeStatus.IsActive },
Syntax\SyntaxNodeTests.cs (5)
380
testContainsHelper1("#region\r\n#endregion", SyntaxKind.
RegionDirectiveTrivia
, SyntaxKind.EndRegionDirectiveTrivia);
385
testContainsHelper1("#region enable", SyntaxKind.
RegionDirectiveTrivia
);
1718
Assert.Equal(SyntaxKind.
RegionDirectiveTrivia
, d.Kind());
1722
Assert.Equal(SyntaxKind.
RegionDirectiveTrivia
, related[0].Kind());
1743
Assert.Equal(SyntaxKind.
RegionDirectiveTrivia
, related[0].Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Classification\Worker.cs (1)
240
case SyntaxKind.
RegionDirectiveTrivia
:
Classification\Worker_Preprocesser.cs (1)
33
case SyntaxKind.
RegionDirectiveTrivia
:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
64
=> directive?.Kind() is SyntaxKind.
RegionDirectiveTrivia
or SyntaxKind.EndRegionDirectiveTrivia;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
554
if (trivia.GetStructure() is (kind: SyntaxKind.
RegionDirectiveTrivia
or SyntaxKind.EndRegionDirectiveTrivia or SyntaxKind.IfDirectiveTrivia or SyntaxKind.EndIfDirectiveTrivia))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
100
if (trivia2.Kind() is SyntaxKind.
RegionDirectiveTrivia
or SyntaxKind.EndRegionDirectiveTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (2)
65
if (trivia.Kind() == SyntaxKind.
RegionDirectiveTrivia
||
226
if (trivia.Kind() is not SyntaxKind.
RegionDirectiveTrivia
and
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
39
public int RegionDirectiveTrivia => (int)SyntaxKind.
RegionDirectiveTrivia
;