31 references to EnableKeyword
Microsoft.CodeAnalysis.CSharp (8)
Parser\DirectiveParser.cs (1)
545SyntaxKind.EnableKeyword => EatToken(),
Syntax\CSharpPragmaWarningStateMap.cs (1)
104SyntaxKind.EnableKeyword => PragmaWarningState.Enabled,
Syntax\NullableContextStateMap.cs (1)
156SyntaxKind.EnableKeyword => NullableContextState.State.Enabled,
Syntax\SyntaxKindFacts.cs (5)
105case SyntaxKind.EnableKeyword: 134case SyntaxKind.EnableKeyword: 243case SyntaxKind.EnableKeyword: 1157return SyntaxKind.EnableKeyword; 1697case SyntaxKind.EnableKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
143if (directive.SettingToken.IsKind(SyntaxKind.EnableKeyword)) 157if (directive.SettingToken.IsKind(SyntaxKind.EnableKeyword))
Microsoft.CodeAnalysis.CSharp.Features (8)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (2)
51if (token.Kind() is not (SyntaxKind.EnableKeyword or SyntaxKind.RestoreKeyword or SyntaxKind.DisableKeyword or SyntaxKind.NullableKeyword or SyntaxKind.HashToken) || 149if (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)
140var keyword = enable ? SyntaxKind.EnableKeyword : SyntaxKind.DisableKeyword;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
143if (directive.SettingToken.IsKind(SyntaxKind.EnableKeyword)) 157if (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()); 3870Assert.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()); 14086Assert.Equal(SyntaxKind.EnableKeyword, node.SettingToken.Kind());
LexicalAndXml\PreprocessorTests.cs (9)
276Assert.True(setting.Kind() == SyntaxKind.EnableKeyword || setting.Kind() == SyntaxKind.DisableKeyword || 3709DisableOrRestoreKind = SyntaxKind.EnableKeyword, 3741DisableOrRestoreKind = SyntaxKind.EnableKeyword, 3758DisableOrRestoreKind = SyntaxKind.EnableKeyword, 3822DisableOrRestoreKind = SyntaxKind.EnableKeyword, 3838DisableOrRestoreKind = SyntaxKind.EnableKeyword, 3854DisableOrRestoreKind = SyntaxKind.EnableKeyword, 4070DisableOrRestoreKind = SyntaxKind.EnableKeyword 4568Assert.Equal(SyntaxKind.EnableKeyword, token.Kind());