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