26 references to GetContextualKeywordKind
Microsoft.CodeAnalysis.CSharp (2)
Parser\LanguageParser.cs (1)
6275var contextualKind = SyntaxFacts.GetContextualKeywordKind(token.ValueText);
Symbols\Source\AttributeLocation.cs (1)
114kind = SyntaxFacts.GetContextualKeywordKind(token.ValueText);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
22return (int)(kind == SyntaxKind.None ? SyntaxFacts.GetContextualKeywordKind(trimmed) : kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
444if (SyntaxFacts.GetContextualKeywordKind(parameter.Name) is not SyntaxKind.UnderscoreToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
70SyntaxFacts.GetContextualKeywordKind(simpleNameText) != SyntaxKind.None;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (1)
26needsEscaping = needsEscaping || (isQueryContext && SyntaxFacts.IsQueryContextualKeyword(SyntaxFacts.GetContextualKeywordKind(identifier)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (2)
23if (SyntaxFacts.GetKeywordKind(syntaxToken.ValueText) == SyntaxKind.None && SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.None) 28if (SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.UnderscoreToken)
Microsoft.CodeAnalysis.CSharp.Features (7)
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
74if (SyntaxFacts.GetContextualKeywordKind(targetToken.ValueText) == SyntaxKind.AsyncKeyword)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
105if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.AllowsKeyword &&
Completion\KeywordRecommenders\UsingKeywordRecommender.cs (2)
146else if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.GlobalKeyword) 158else if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.GlobalKeyword)
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
51var contextualKind = SyntaxFacts.GetContextualKeywordKind(token.ValueText);
ReplaceDocCommentTextWithTag\CSharpReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
30=> SyntaxFacts.IsKeywordKind(SyntaxFacts.GetKeywordKind(text)) || SyntaxFacts.IsContextualKeyword(SyntaxFacts.GetContextualKeywordKind(text));
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
22return (int)(kind == SyntaxKind.None ? SyntaxFacts.GetContextualKeywordKind(trimmed) : kind);
Microsoft.CodeAnalysis.CSharp.Workspaces (10)
Classification\ClassificationHelpers.cs (1)
540|| (wasKeyword && SyntaxFacts.GetContextualKeywordKind(text) != SyntaxKind.None)
Simplification\CSharpSimplificationService.cs (2)
104if (SyntaxFacts.GetKeywordKind(syntaxToken.ValueText) == SyntaxKind.None && SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.None) 109if (SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.UnderscoreToken)
Simplification\Reducers\CSharpEscapingReducer.cs (2)
53if (SyntaxFacts.GetContextualKeywordKind(unescapedIdentifier) == SyntaxKind.AwaitKeyword) 86switch (SyntaxFacts.GetContextualKeywordKind(unescapedIdentifier))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
444if (SyntaxFacts.GetContextualKeywordKind(parameter.Name) is not SyntaxKind.UnderscoreToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
70SyntaxFacts.GetContextualKeywordKind(simpleNameText) != SyntaxKind.None;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (1)
26needsEscaping = needsEscaping || (isQueryContext && SyntaxFacts.IsQueryContextualKeyword(SyntaxFacts.GetContextualKeywordKind(identifier)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (2)
23if (SyntaxFacts.GetKeywordKind(syntaxToken.ValueText) == SyntaxKind.None && SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.None) 28if (SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.UnderscoreToken)
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
227=> SyntaxFacts.GetKeywordKind(symbol.Name) != SyntaxKind.None || SyntaxFacts.GetContextualKeywordKind(symbol.Name) != SyntaxKind.None;