30 references to RestoreKeyword
Microsoft.CodeAnalysis.CSharp (9)
Parser\DirectiveParser.cs (2)
547
SyntaxKind.
RestoreKeyword
=> EatToken(),
576
if (this.CurrentToken.Kind == SyntaxKind.DisableKeyword || this.CurrentToken.Kind == SyntaxKind.
RestoreKeyword
)
Syntax\CSharpPragmaWarningStateMap.cs (1)
103
SyntaxKind.
RestoreKeyword
=> PragmaWarningState.Default,
Syntax\NullableContextStateMap.cs (1)
158
SyntaxKind.
RestoreKeyword
=> NullableContextState.State.ExplicitlyRestored,
Syntax\SyntaxKindFacts.cs (5)
101
case SyntaxKind.
RestoreKeyword
:
133
case SyntaxKind.
RestoreKeyword
:
149
for (int i = (int)SyntaxKind.ElifKeyword; i <= (int)SyntaxKind.
RestoreKeyword
; i++)
1149
return SyntaxKind.
RestoreKeyword
;
1689
case SyntaxKind.
RestoreKeyword
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
165
else if (directive.SettingToken.IsKind(SyntaxKind.
RestoreKeyword
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
76
public static readonly SyntaxToken RestoreKeyword = Token(SyntaxKind.
RestoreKeyword
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
329
var endDirective = pragmaWarningDirectiveTrivia.GetNextDirective(trivia => IsFormatDirective(trivia, SyntaxKind.
RestoreKeyword
));
Microsoft.CodeAnalysis.CSharp.Features (9)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (2)
227
enableDirective = pragmaWarning.DisableOrRestoreKeyword.Kind() == SyntaxKind.
RestoreKeyword
;
241
var toggledKeywordKind = currentKeyword.Kind() == SyntaxKind.DisableKeyword ? SyntaxKind.
RestoreKeyword
: SyntaxKind.DisableKeyword;
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (3)
51
if (token.Kind() is not (SyntaxKind.EnableKeyword or SyntaxKind.
RestoreKeyword
or SyntaxKind.DisableKeyword or SyntaxKind.NullableKeyword or SyntaxKind.HashToken) ||
144
if (originalNode.SettingToken.IsKind(SyntaxKind.
RestoreKeyword
))
176
else if (leadingDirective.SettingToken.IsKind(SyntaxKind.
RestoreKeyword
) && leadingDirective.TargetToken.IsKind(SyntaxKind.None))
Completion\KeywordRecommenders\AnnotationsKeywordRecommender.cs (1)
26
(previousToken1.Kind() == SyntaxKind.EnableKeyword || previousToken1.Kind() == SyntaxKind.DisableKeyword || previousToken1.Kind() == SyntaxKind.
RestoreKeyword
) &&
Completion\KeywordRecommenders\RestoreKeywordRecommender.cs (1)
13
: base(SyntaxKind.
RestoreKeyword
, isValidInPreprocessorContext: true)
Completion\KeywordRecommenders\WarningsKeywordRecommender.cs (1)
26
(previousToken1.Kind() == SyntaxKind.EnableKeyword || previousToken1.Kind() == SyntaxKind.DisableKeyword || previousToken1.Kind() == SyntaxKind.
RestoreKeyword
) &&
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
165
else if (directive.SettingToken.IsKind(SyntaxKind.
RestoreKeyword
))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
LexicalAndXml\PreprocessorTests.cs (7)
277
setting.Kind() == SyntaxKind.
RestoreKeyword
);
3926
DisableOrRestoreKind = SyntaxKind.
RestoreKeyword
,
3942
DisableOrRestoreKind = SyntaxKind.
RestoreKeyword
,
3958
DisableOrRestoreKind = SyntaxKind.
RestoreKeyword
,
3974
DisableOrRestoreKind = SyntaxKind.
RestoreKeyword
,
3991
DisableOrRestoreKind = SyntaxKind.
RestoreKeyword
,
4085
DisableOrRestoreKind = SyntaxKind.
RestoreKeyword
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
76
public static readonly SyntaxToken RestoreKeyword = Token(SyntaxKind.
RestoreKeyword
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
329
var endDirective = pragmaWarningDirectiveTrivia.GetNextDirective(trivia => IsFormatDirective(trivia, SyntaxKind.
RestoreKeyword
));