45 references to IsDirective
Microsoft.CodeAnalysis (5)
Syntax\SyntaxNavigator.cs (4)
35/* 010 */ t => t.IsDirective, 36/* 011 */ t => t.IsDirective || t.IsDocumentationCommentTrivia, 39/* 110 */ t => t.IsSkippedTokensTrivia || t.IsDirective, 40/* 111 */ t => t.IsSkippedTokensTrivia || t.IsDirective || t.IsDocumentationCommentTrivia,
Syntax\SyntaxNodeOrToken.cs (1)
880if (trivia.IsDirective)
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (2)
110if (trivia.IsDirective) 115if ((fileHeaderStart < fileHeaderEnd) || !trivia.IsDirective)
src\Analyzers\Core\Analyzers\FileHeaders\FileHeader.cs (1)
85/// start of the first line after any directive trivia (<see cref="SyntaxTrivia.IsDirective"/>) to account for
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
714var lastDirective = leadingTrivia.LastOrDefault(t => t.IsDirective);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
174var leadingTrivia = node.GetLeadingTrivia().Where(trivia => !trivia.IsDirective);
Microsoft.CodeAnalysis.CSharp (7)
Syntax\CSharpSyntaxNode.cs (2)
251if (tr.IsDirective) 291if (tr.IsDirective)
Syntax\DirectiveTriviaSyntax.cs (2)
75if (tr.IsDirective) 106if (tr.IsDirective)
Syntax\SyntaxNodeRemover.cs (3)
130|| trivia.IsDirective; 145if (trivia.IsDirective && trivia.GetStructure() is DirectiveTriviaSyntax directive) 435.Where(tr => tr.IsDirective)
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
92if (!trivia.IsDirective)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
140if (semicolonToken.TrailingTrivia.Any(t => t.IsDirective))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
195expression = firstStatement.GetLeadingTrivia().Any(t => t.IsDirective || t.IsSingleOrMultiLineComment())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
861if (expression.GetLeadingTrivia().Any(t => t.IsDirective))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
167if (openBraceLeadingTrivia.Any(t => t.IsSingleOrMultiLineComment() || t.IsDirective))
Microsoft.CodeAnalysis.CSharp.Features (3)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
300var newLocalDeclaration = variableDeclarator.GetLeadingTrivia().Any(t => t.IsDirective)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
92if (!trivia.IsDirective)
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
167if (openBraceLeadingTrivia.Any(t => t.IsSingleOrMultiLineComment() || t.IsDirective))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Parsing\ScriptParsingTests.cs (1)
9725Assert.True(trivia.IsDirective);
Syntax\SyntaxNodeTests.cs (1)
1842Assert.False(trivia.IsDirective);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
195expression = firstStatement.GetLeadingTrivia().Any(t => t.IsDirective || t.IsSingleOrMultiLineComment())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
861if (expression.GetLeadingTrivia().Any(t => t.IsDirective))
Microsoft.CodeAnalysis.Features (6)
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (1)
155if (trivia.IsDirective && trivia.FullSpan.IntersectsWith(_textSpan))
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (2)
110if (trivia.IsDirective) 115if ((fileHeaderStart < fileHeaderEnd) || !trivia.IsDirective)
src\Analyzers\Core\Analyzers\FileHeaders\FileHeader.cs (1)
85/// start of the first line after any directive trivia (<see cref="SyntaxTrivia.IsDirective"/>) to account for
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
714var lastDirective = leadingTrivia.LastOrDefault(t => t.IsDirective);
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
312var hasDirective = nodeToRemove.GetLeadingTrivia().Any(t => t.IsDirective);
Microsoft.CodeAnalysis.VisualBasic (6)
Syntax\SyntaxNodePartials.vb (2)
35If tr.IsDirective Then 59If tr.IsDirective Then
Syntax\SyntaxNodeRemover.vb (2)
92Return trivia.Kind = SyntaxKind.EndOfLineTrivia OrElse trivia.Kind = SyntaxKind.CommentTrivia OrElse trivia.IsDirective 307.Where(Function(tr) tr.IsDirective) _
Syntax\VisualBasicSyntaxNode.vb (2)
346If tr.IsDirective Then 372If tr.IsDirective Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
TestSyntaxNodes.vb (1)
2206Assert.False(trivia.IsDirective)
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
174var leadingTrivia = node.GetLeadingTrivia().Where(trivia => !trivia.IsDirective);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
2853if (trivia.IsDirective)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.vb (1)
1284If trivia.IsDirective Then