31 references to EnableKeyword
Microsoft.CodeAnalysis.CSharp (8)
Parser\DirectiveParser.cs (1)
545
SyntaxKind.
EnableKeyword
=> EatToken(),
Syntax\CSharpPragmaWarningStateMap.cs (1)
104
SyntaxKind.
EnableKeyword
=> PragmaWarningState.Enabled,
Syntax\NullableContextStateMap.cs (1)
156
SyntaxKind.
EnableKeyword
=> NullableContextState.State.Enabled,
Syntax\SyntaxKindFacts.cs (5)
105
case SyntaxKind.
EnableKeyword
:
134
case SyntaxKind.
EnableKeyword
:
243
case SyntaxKind.
EnableKeyword
:
1157
return SyntaxKind.
EnableKeyword
;
1697
case SyntaxKind.
EnableKeyword
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
143
if (directive.SettingToken.IsKind(SyntaxKind.
EnableKeyword
))
157
if (directive.SettingToken.IsKind(SyntaxKind.
EnableKeyword
))
Microsoft.CodeAnalysis.CSharp.Features (8)
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) ||
149
if (originalNode.SettingToken.IsKind(SyntaxKind.
EnableKeyword
))
Completion\KeywordRecommenders\AnnotationsKeywordRecommender.cs (1)
26
(previousToken1.Kind() == SyntaxKind.
EnableKeyword
|| previousToken1.Kind() == SyntaxKind.DisableKeyword || previousToken1.Kind() == SyntaxKind.RestoreKeyword) &&
Completion\KeywordRecommenders\EnableKeywordRecommender.cs (1)
13
: base(SyntaxKind.
EnableKeyword
, isValidInPreprocessorContext: true)
Completion\KeywordRecommenders\WarningsKeywordRecommender.cs (1)
26
(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\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
143
if (directive.SettingToken.IsKind(SyntaxKind.
EnableKeyword
))
157
if (directive.SettingToken.IsKind(SyntaxKind.
EnableKeyword
))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (13)
Generated\Syntax.Test.xml.Generated.cs (4)
743
=> InternalSyntaxFactory.NullableDirectiveTrivia(InternalSyntaxFactory.Token(SyntaxKind.HashToken), InternalSyntaxFactory.Token(SyntaxKind.NullableKeyword), InternalSyntaxFactory.Token(SyntaxKind.
EnableKeyword
), null, InternalSyntaxFactory.Token(SyntaxKind.EndOfDirectiveToken), new bool());
3870
Assert.Equal(SyntaxKind.
EnableKeyword
, node.SettingToken.Kind);
10959
=> SyntaxFactory.NullableDirectiveTrivia(SyntaxFactory.Token(SyntaxKind.HashToken), SyntaxFactory.Token(SyntaxKind.NullableKeyword), SyntaxFactory.Token(SyntaxKind.
EnableKeyword
), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.EndOfDirectiveToken), new bool());
14086
Assert.Equal(SyntaxKind.
EnableKeyword
, node.SettingToken.Kind());
LexicalAndXml\PreprocessorTests.cs (9)
276
Assert.True(setting.Kind() == SyntaxKind.
EnableKeyword
|| setting.Kind() == SyntaxKind.DisableKeyword ||
3709
DisableOrRestoreKind = SyntaxKind.
EnableKeyword
,
3741
DisableOrRestoreKind = SyntaxKind.
EnableKeyword
,
3758
DisableOrRestoreKind = SyntaxKind.
EnableKeyword
,
3822
DisableOrRestoreKind = SyntaxKind.
EnableKeyword
,
3838
DisableOrRestoreKind = SyntaxKind.
EnableKeyword
,
3854
DisableOrRestoreKind = SyntaxKind.
EnableKeyword
,
4070
DisableOrRestoreKind = SyntaxKind.
EnableKeyword
4568
Assert.Equal(SyntaxKind.
EnableKeyword
, token.Kind());