38 references to DisableKeyword
Microsoft.CodeAnalysis.CSharp (17)
_generated\0\Syntax.xml.Main.Generated.cs (2)
6563
case SyntaxKind.
DisableKeyword
:
6668
case SyntaxKind.
DisableKeyword
:
_generated\1\Syntax.xml.Internal.Generated.cs (4)
33832
case SyntaxKind.
DisableKeyword
:
33945
case SyntaxKind.
DisableKeyword
:
39259
case SyntaxKind.
DisableKeyword
:
39372
case SyntaxKind.
DisableKeyword
:
Parser\DirectiveParser.cs (5)
549
SyntaxKind.
DisableKeyword
=> EatToken(),
551
_ => EatToken(SyntaxKind.
DisableKeyword
, ErrorCode.ERR_NullableDirectiveQualifierExpected, reportError: isActive)
579
if (this.CurrentToken.Kind == SyntaxKind.
DisableKeyword
|| this.CurrentToken.Kind == SyntaxKind.RestoreKeyword)
635
style = this.EatToken(SyntaxKind.
DisableKeyword
, ErrorCode.WRN_IllegalPPWarning, reportError: isActive);
681
var style = this.EatToken(SyntaxKind.
DisableKeyword
, reportError: false);
Syntax\CSharpPragmaWarningStateMap.cs (1)
102
SyntaxKind.
DisableKeyword
=> PragmaWarningState.Disabled,
Syntax\NullableContextStateMap.cs (1)
157
SyntaxKind.
DisableKeyword
=> NullableContextState.State.Disabled,
Syntax\SyntaxKindFacts.cs (4)
100
case SyntaxKind.
DisableKeyword
:
132
case SyntaxKind.
DisableKeyword
:
1218
return SyntaxKind.
DisableKeyword
;
1770
case SyntaxKind.
DisableKeyword
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
145
else if (directive.SettingToken.IsKind(SyntaxKind.
DisableKeyword
))
159
else if (directive.SettingToken.IsKind(SyntaxKind.
DisableKeyword
))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
33
public static readonly SyntaxToken DisableKeyword = Token(SyntaxKind.
DisableKeyword
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
206
isDisable = pragmaWarning.DisableOrRestoreKeyword.IsKind(SyntaxKind.
DisableKeyword
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
314
if (!IsFormatDirective(pragmaWarningDirectiveTrivia, SyntaxKind.
DisableKeyword
))
Microsoft.CodeAnalysis.CSharp.Features (10)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (2)
241
var toggledKeywordKind = currentKeyword.Kind() == SyntaxKind.
DisableKeyword
? SyntaxKind.RestoreKeyword : SyntaxKind.
DisableKeyword
;
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (2)
51
if (token.Kind() is not (SyntaxKind.EnableKeyword or SyntaxKind.RestoreKeyword or SyntaxKind.
DisableKeyword
or SyntaxKind.NullableKeyword or SyntaxKind.HashToken) ||
138
if (originalNode.SettingToken.IsKind(SyntaxKind.
DisableKeyword
))
Completion\KeywordRecommenders\AnnotationsKeywordRecommender.cs (1)
22
(previousToken1.Kind() == SyntaxKind.EnableKeyword || previousToken1.Kind() == SyntaxKind.
DisableKeyword
|| previousToken1.Kind() == SyntaxKind.RestoreKeyword) &&
Completion\KeywordRecommenders\DisableKeywordRecommender.cs (1)
10
internal sealed class DisableKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.
DisableKeyword
, isValidInPreprocessorContext: true)
Completion\KeywordRecommenders\WarningsKeywordRecommender.cs (1)
21
(previousToken1.Kind() == SyntaxKind.EnableKeyword || previousToken1.Kind() == SyntaxKind.
DisableKeyword
|| previousToken1.Kind() == SyntaxKind.RestoreKeyword) &&
MetadataAsSource\CSharpMetadataAsSourceService.cs (1)
140
var keyword = enable ? SyntaxKind.EnableKeyword : SyntaxKind.
DisableKeyword
;
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
145
else if (directive.SettingToken.IsKind(SyntaxKind.
DisableKeyword
))
159
else if (directive.SettingToken.IsKind(SyntaxKind.
DisableKeyword
))
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
33
public static readonly SyntaxToken DisableKeyword = Token(SyntaxKind.
DisableKeyword
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
206
isDisable = pragmaWarning.DisableOrRestoreKeyword.IsKind(SyntaxKind.
DisableKeyword
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
314
if (!IsFormatDirective(pragmaWarningDirectiveTrivia, SyntaxKind.
DisableKeyword
))
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
33
public static readonly SyntaxToken DisableKeyword = Token(SyntaxKind.
DisableKeyword
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
206
isDisable = pragmaWarning.DisableOrRestoreKeyword.IsKind(SyntaxKind.
DisableKeyword
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
314
if (!IsFormatDirective(pragmaWarningDirectiveTrivia, SyntaxKind.
DisableKeyword
))