273 references to AsyncKeyword
Microsoft.CodeAnalysis.CSharp (32)
Binder\Binder_Lambda.cs (1)
106if (modifier.IsKind(SyntaxKind.AsyncKeyword))
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
596if (lambdaSyntax.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword) 614if (lambdaSyntax.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword)
Parser\LanguageParser.cs (18)
1328case SyntaxKind.AsyncKeyword: 1337case SyntaxKind.AsyncKeyword: 2902this.CurrentToken.ContextualKind is not (SyntaxKind.PartialKeyword or SyntaxKind.AsyncKeyword or SyntaxKind.RequiredKeyword or SyntaxKind.FileKeyword) && 3195if (contextualKind != SyntaxKind.AsyncKeyword || 3489IsInAsync = modifiers.Any((int)SyntaxKind.AsyncKeyword); 7431if (this.CurrentToken.ContextualKind is SyntaxKind.AsyncKeyword or SyntaxKind.AwaitKeyword or SyntaxKind.FromKeyword) 8191&& (tk is not (SyntaxKind.AsyncKeyword or SyntaxKind.ScopedKeyword) || ShouldContextualKeywordBeTreatedAsModifier(parsingStatementNotDeclaration: true)); 10306if (k == SyntaxKind.AsyncKeyword) 10389case SyntaxKind.AsyncKeyword: 10454case SyntaxKind.AsyncKeyword: 11759this.PeekToken(tokenIndex).ContextualKind == SyntaxKind.AsyncKeyword) 12546else if (this.CurrentToken.ContextualKind == SyntaxKind.AsyncKeyword && 12589if (this.CurrentToken.ContextualKind == SyntaxKind.AsyncKeyword && 13179if (modifiers.Any((int)SyntaxKind.AsyncKeyword)) 13237if (this.CurrentToken.ContextualKind == SyntaxKind.AsyncKeyword && 13240modifiers.Add(this.EatContextualToken(SyntaxKind.AsyncKeyword)); 13252Debug.Assert(this.CurrentToken.ContextualKind == SyntaxKind.AsyncKeyword); 13305if (modifiers.Any((int)SyntaxKind.AsyncKeyword))
Symbols\Source\ModifierUtils.cs (3)
318return SyntaxFacts.GetText(SyntaxKind.AsyncKeyword); 338case SyntaxKind.AsyncKeyword: 410var isPartialAsyncMethod = isOrdinaryMethod && i == modifiers.Count - 2 && modifiers[i + 1].ContextualKind() is SyntaxKind.AsyncKeyword;
Syntax\AnonymousFunctionExpressionSyntax.cs (2)
38if (Modifiers.Any(SyntaxKind.AsyncKeyword)) 40return new SyntaxTokenList(Modifiers.Where(m => !m.IsKind(SyntaxKind.AsyncKeyword)));
Syntax\AnonymousMethodExpressionSyntax.cs (1)
25=> this.Modifiers.FirstOrDefault(SyntaxKind.AsyncKeyword);
Syntax\ParenthesizedLambdaExpressionSyntax.cs (1)
22=> this.Modifiers.FirstOrDefault(SyntaxKind.AsyncKeyword);
Syntax\SimpleLambdaExpressionSyntax.cs (1)
22=> this.Modifiers.FirstOrDefault(SyntaxKind.AsyncKeyword);
Syntax\SyntaxKindFacts.cs (3)
1214case SyntaxKind.AsyncKeyword: 1323return SyntaxKind.AsyncKeyword; 1765case SyntaxKind.AsyncKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
88if (wasAwaited != anonymousFunction.Modifiers.Any(SyntaxKind.AsyncKeyword))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
56if (statement.Modifiers.Any(SyntaxKind.AsyncKeyword))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
56if (declaration.Modifiers.Any(SyntaxKind.AsyncKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
13public static readonly SyntaxToken AsyncKeyword = Token(SyntaxKind.AsyncKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
170SyntaxKind.AsyncKeyword,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (3)
97case SyntaxKind.AsyncKeyword: 107if (token.HasMatchingText(SyntaxKind.AsyncKeyword)) 109modifierKind = SyntaxKind.AsyncKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
135SyntaxKind.AsyncKeyword => DeclarationModifiers.Async,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
137public int AsyncKeyword => (int)SyntaxKind.AsyncKeyword;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (1)
87if (!methodDeclaration.Modifiers.Any(SyntaxKind.AsyncKeyword))
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (2)
145MethodDeclarationSyntax method => (method.ReturnType, method.Modifiers.Any(SyntaxKind.AsyncKeyword)), 148LocalFunctionStatementSyntax localFunction => (localFunction.ReturnType, localFunction.Modifiers.Any(SyntaxKind.AsyncKeyword)),
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
272if (modifiers.Any(SyntaxKind.AsyncKeyword) || onYield)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
35var asyncTokenIndex = modifiers.IndexOf(SyntaxKind.AsyncKeyword);
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
210if (anonymousFunction.AsyncKeyword.IsKind(SyntaxKind.AsyncKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
278isTaskLikeTypeContext: precedingModifiers.Contains(SyntaxKind.AsyncKeyword),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
24SyntaxKind.AsyncKeyword, 298if (token.HasMatchingText(SyntaxKind.AsyncKeyword)) 2879if (token.Text == SyntaxFacts.GetText(SyntaxKind.AsyncKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (1)
30SyntaxKind.AsyncKeyword,
Microsoft.CodeAnalysis.CSharp.Features (39)
CodeRefactorings\AddAwait\CSharpAddAwaitCodeRefactoringProvider.cs (1)
39return methodDeclaration.Modifiers.Any(SyntaxKind.AsyncKeyword);
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
178if (identifier.Identifier.IsKindOrHasMatchingText(SyntaxKind.AsyncKeyword))
Completion\CompletionProviders\DeclarationName\DeclarationNameCompletionProvider.cs (1)
61if (context.TargetToken.IsKindOrHasMatchingText(SyntaxKind.AsyncKeyword) ||
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
578case SyntaxKind.AsyncKeyword:
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (2)
74if (SyntaxFacts.GetContextualKeywordKind(targetToken.ValueText) == SyntaxKind.AsyncKeyword) 127if (tokenBeforeType.Kind() == SyntaxKind.AsyncKeyword)
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
118if (token.IsKindOrHasMatchingText(SyntaxKind.AsyncKeyword))
Completion\KeywordRecommenders\AsyncKeywordRecommender.cs (2)
16: base(SyntaxKind.AsyncKeyword, isValidInPreprocessorContext: false) 29context.PrecedingModifiers.Contains(SyntaxKind.AsyncKeyword))
Completion\KeywordRecommenders\DelegateKeywordRecommender.cs (1)
59context.TargetToken.IsKindOrHasMatchingText(SyntaxKind.AsyncKeyword) &&
Completion\KeywordRecommenders\PartialKeywordRecommender.cs (1)
20SyntaxKind.AsyncKeyword,
Completion\KeywordRecommenders\StaticKeywordRecommender.cs (4)
28SyntaxKind.AsyncKeyword, 43SyntaxKind.AsyncKeyword, 72SyntaxKind.AsyncKeyword, 89context.SyntaxTree.IsLambdaDeclarationContext(position, otherModifier: SyntaxKind.AsyncKeyword, cancellationToken) ||
Completion\KeywordRecommenders\UnsafeKeywordRecommender.cs (1)
60SyntaxKind.AsyncKeyword
Completion\KeywordRecommenders\VoidKeywordRecommender.cs (1)
29SyntaxKind.AsyncKeyword
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
198modifiers: [.. otherMethod.Modifiers.Where(m => m.Kind() is SyntaxKind.AsyncKeyword or SyntaxKind.UnsafeKeyword)],
EditAndContinue\SyntaxComparer.cs (2)
943if ((leftAsync.Kind() == SyntaxKind.AsyncKeyword) != (rightAsync.Kind() == SyntaxKind.AsyncKeyword))
EditAndContinue\SyntaxUtilities.cs (3)
211return anonymousFunction.AsyncKeyword.IsKind(SyntaxKind.AsyncKeyword); 223MethodDeclarationSyntax method => method.Modifiers.Any(SyntaxKind.AsyncKeyword), 224LocalFunctionStatementSyntax localFunction => localFunction.Modifiers.Any(SyntaxKind.AsyncKeyword),
ExtractMethod\CSharpSelectionResult.StatementResult.cs (4)
35MethodDeclarationSyntax method => method.Modifiers.Any(SyntaxKind.AsyncKeyword), 36ParenthesizedLambdaExpressionSyntax lambda => lambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword, 37SimpleLambdaExpressionSyntax lambda => lambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword, 38AnonymousMethodExpressionSyntax anonymous => anonymous.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword,
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
55SyntaxKind.AsyncKeyword or
Highlighting\KeywordHighlighters\AsyncAwaitHighlighter.cs (2)
30=> tokens.Any(static t => t.Kind() is SyntaxKind.AwaitKeyword or SyntaxKind.AsyncKeyword); 98if (mod.Kind() is SyntaxKind.AsyncKeyword or SyntaxKind.AwaitKeyword)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
88if (wasAwaited != anonymousFunction.Modifiers.Any(SyntaxKind.AsyncKeyword))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
56if (statement.Modifiers.Any(SyntaxKind.AsyncKeyword))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
56if (declaration.Modifiers.Any(SyntaxKind.AsyncKeyword))
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (1)
87if (!methodDeclaration.Modifiers.Any(SyntaxKind.AsyncKeyword))
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (2)
145MethodDeclarationSyntax method => (method.ReturnType, method.Modifiers.Any(SyntaxKind.AsyncKeyword)), 148LocalFunctionStatementSyntax localFunction => (localFunction.ReturnType, localFunction.Modifiers.Any(SyntaxKind.AsyncKeyword)),
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
272if (modifiers.Any(SyntaxKind.AsyncKeyword) || onYield)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
35var asyncTokenIndex = modifiers.IndexOf(SyntaxKind.AsyncKeyword);
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
210if (anonymousFunction.AsyncKeyword.IsKind(SyntaxKind.AsyncKeyword))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (163)
Parsing\AnonymousFunctionParsingTests.cs (19)
85N(SyntaxKind.AsyncKeyword); 86N(SyntaxKind.AsyncKeyword); 284N(SyntaxKind.AsyncKeyword); 385N(SyntaxKind.AsyncKeyword); 743N(SyntaxKind.AsyncKeyword); 2553N(SyntaxKind.AsyncKeyword); 2700N(SyntaxKind.AsyncKeyword); 2848N(SyntaxKind.AsyncKeyword); 2850N(SyntaxKind.AsyncKeyword); 3110N(SyntaxKind.AsyncKeyword); 3374N(SyntaxKind.AsyncKeyword); 3526N(SyntaxKind.AsyncKeyword); 3679N(SyntaxKind.AsyncKeyword); 3681N(SyntaxKind.AsyncKeyword); 3968N(SyntaxKind.AsyncKeyword); 4250N(SyntaxKind.AsyncKeyword); 4411N(SyntaxKind.AsyncKeyword); 4573N(SyntaxKind.AsyncKeyword); 4575N(SyntaxKind.AsyncKeyword);
Parsing\AsyncParsingTests.cs (51)
55N(SyntaxKind.AsyncKeyword); 216N(SyntaxKind.AsyncKeyword); 257N(SyntaxKind.AsyncKeyword); 258N(SyntaxKind.AsyncKeyword); 303N(SyntaxKind.AsyncKeyword); 407N(SyntaxKind.AsyncKeyword); 531N(SyntaxKind.AsyncKeyword); 532N(SyntaxKind.AsyncKeyword); 565N(SyntaxKind.AsyncKeyword); 609N(SyntaxKind.AsyncKeyword); 610N(SyntaxKind.AsyncKeyword); 611N(SyntaxKind.AsyncKeyword); 644N(SyntaxKind.AsyncKeyword); 645N(SyntaxKind.AsyncKeyword); 691N(SyntaxKind.AsyncKeyword); 737N(SyntaxKind.AsyncKeyword); 792N(SyntaxKind.AsyncKeyword); 895N(SyntaxKind.AsyncKeyword); 939N(SyntaxKind.AsyncKeyword); 1031N(SyntaxKind.AsyncKeyword); 1169N(SyntaxKind.AsyncKeyword); 1209N(SyntaxKind.AsyncKeyword); 1260N(SyntaxKind.AsyncKeyword); 1283N(SyntaxKind.AsyncKeyword); 1291N(SyntaxKind.AsyncKeyword); 1342N(SyntaxKind.AsyncKeyword); 1370N(SyntaxKind.AsyncKeyword); 1390N(SyntaxKind.AsyncKeyword); 1454N(SyntaxKind.AsyncKeyword); 1497N(SyntaxKind.AsyncKeyword); 1541N(SyntaxKind.AsyncKeyword); 1594N(SyntaxKind.AsyncKeyword); 1654N(SyntaxKind.AsyncKeyword); 1711N(SyntaxKind.AsyncKeyword); 1765N(SyntaxKind.AsyncKeyword); 1823N(SyntaxKind.AsyncKeyword); 1877N(SyntaxKind.AsyncKeyword); 1934N(SyntaxKind.AsyncKeyword); 1986N(SyntaxKind.AsyncKeyword); 2040N(SyntaxKind.AsyncKeyword); 2085N(SyntaxKind.AsyncKeyword); 2115N(SyntaxKind.AsyncKeyword); 2154N(SyntaxKind.AsyncKeyword); 2200N(SyntaxKind.AsyncKeyword); 2249N(SyntaxKind.AsyncKeyword); 2301N(SyntaxKind.AsyncKeyword); 2346N(SyntaxKind.AsyncKeyword); 2673N(SyntaxKind.AsyncKeyword); 2722N(SyntaxKind.AsyncKeyword); 2764N(SyntaxKind.AsyncKeyword); 2818N(SyntaxKind.AsyncKeyword);
Parsing\AsyncStreamsParsingTests.cs (6)
55N(SyntaxKind.AsyncKeyword); 133N(SyntaxKind.AsyncKeyword); 214N(SyntaxKind.AsyncKeyword); 296N(SyntaxKind.AsyncKeyword); 395N(SyntaxKind.AsyncKeyword); 489N(SyntaxKind.AsyncKeyword);
Parsing\AwaitParsingTests.cs (22)
49N(SyntaxKind.AsyncKeyword); 178N(SyntaxKind.AsyncKeyword); 260N(SyntaxKind.AsyncKeyword); 351N(SyntaxKind.AsyncKeyword); 438N(SyntaxKind.AsyncKeyword); 482N(SyntaxKind.AsyncKeyword); 526N(SyntaxKind.AsyncKeyword); 560N(SyntaxKind.AsyncKeyword); 588N(SyntaxKind.AsyncKeyword); 622N(SyntaxKind.AsyncKeyword); 656N(SyntaxKind.AsyncKeyword); 697N(SyntaxKind.AsyncKeyword); 734N(SyntaxKind.AsyncKeyword); 765N(SyntaxKind.AsyncKeyword); 796N(SyntaxKind.AsyncKeyword); 827N(SyntaxKind.AsyncKeyword); 891N(SyntaxKind.AsyncKeyword); 936N(SyntaxKind.AsyncKeyword); 1050N(SyntaxKind.AsyncKeyword); 1109N(SyntaxKind.AsyncKeyword); 1433N(SyntaxKind.AsyncKeyword); 1603N(SyntaxKind.AsyncKeyword);
Parsing\CollectionExpressionParsingTests.cs (1)
6258N(SyntaxKind.AsyncKeyword);
Parsing\ExpressionParsingTests.cs (8)
3171N(SyntaxKind.AsyncKeyword); 3271N(SyntaxKind.AsyncKeyword); 3361N(SyntaxKind.AsyncKeyword); 3435N(SyntaxKind.AsyncKeyword); 3517N(SyntaxKind.AsyncKeyword); 3596N(SyntaxKind.AsyncKeyword); 3669N(SyntaxKind.AsyncKeyword); 3754N(SyntaxKind.AsyncKeyword);
Parsing\FileModifierParsingTests.cs (1)
1024N(SyntaxKind.AsyncKeyword);
Parsing\FunctionPointerTests.cs (2)
3363N(SyntaxKind.AsyncKeyword); 3516N(SyntaxKind.AsyncKeyword);
Parsing\LambdaAttributeParsingTests.cs (12)
884yield return getData("[A] async x => x", tests => tests.LambdaExpression_01(SyntaxKind.AsyncKeyword)); 886yield return getData("[A] async static x => x", tests => tests.LambdaExpression_01(SyntaxKind.AsyncKeyword, SyntaxKind.StaticKeyword)); 887yield return getData("[A] static async x => x", tests => tests.LambdaExpression_01(SyntaxKind.StaticKeyword, SyntaxKind.AsyncKeyword)); 890yield return getData("[A]async () => { }", tests => tests.LambdaExpression_02(SyntaxKind.AsyncKeyword)); 892yield return getData("[A]async static () => { }", tests => tests.LambdaExpression_02(SyntaxKind.AsyncKeyword, SyntaxKind.StaticKeyword)); 893yield return getData("[A]static async () => { }", tests => tests.LambdaExpression_02(SyntaxKind.StaticKeyword, SyntaxKind.AsyncKeyword)); 896yield return getData("[A] async (x) => { }", tests => tests.LambdaExpression_03(SyntaxKind.AsyncKeyword)); 898yield return getData("[A] async static (x) => { }", tests => tests.LambdaExpression_03(SyntaxKind.AsyncKeyword, SyntaxKind.StaticKeyword)); 899yield return getData("[A] static async (x) => { }", tests => tests.LambdaExpression_03(SyntaxKind.StaticKeyword, SyntaxKind.AsyncKeyword)); 902yield return getData("[A] async (object x) => { }", tests => tests.LambdaExpression_04(SyntaxKind.AsyncKeyword)); 904yield return getData("[A] async static (object x) => { }", tests => tests.LambdaExpression_04(SyntaxKind.AsyncKeyword, SyntaxKind.StaticKeyword)); 905yield return getData("[A] static async (object x) => { }", tests => tests.LambdaExpression_04(SyntaxKind.StaticKeyword, SyntaxKind.AsyncKeyword));
Parsing\LambdaParameterParsingTests.cs (1)
5098N(SyntaxKind.AsyncKeyword);
Parsing\LambdaReturnTypeParsingTests.cs (6)
29yield return getModifiers("async", SyntaxKind.AsyncKeyword); 31yield return getModifiers("async static", SyntaxKind.AsyncKeyword, SyntaxKind.StaticKeyword); 32yield return getModifiers("static async", SyntaxKind.StaticKeyword, SyntaxKind.AsyncKeyword); 1757N(SyntaxKind.AsyncKeyword); 4981N(SyntaxKind.AsyncKeyword); 4982N(SyntaxKind.AsyncKeyword);
Parsing\LocalFunctionParsingTests.cs (19)
1511N(SyntaxKind.AsyncKeyword); 1613N(SyntaxKind.AsyncKeyword); 1884N(SyntaxKind.AsyncKeyword); 1901N(SyntaxKind.AsyncKeyword); 2087N(SyntaxKind.AsyncKeyword); 2164N(SyntaxKind.AsyncKeyword); 2165N(SyntaxKind.AsyncKeyword); 2247N(SyntaxKind.AsyncKeyword); 2248N(SyntaxKind.AsyncKeyword); 2249N(SyntaxKind.AsyncKeyword); 2337N(SyntaxKind.AsyncKeyword); 2338N(SyntaxKind.AsyncKeyword); 2339N(SyntaxKind.AsyncKeyword); 2340N(SyntaxKind.AsyncKeyword); 2434N(SyntaxKind.AsyncKeyword); 2435N(SyntaxKind.AsyncKeyword); 2436N(SyntaxKind.AsyncKeyword); 2437N(SyntaxKind.AsyncKeyword); 2438N(SyntaxKind.AsyncKeyword);
Parsing\MemberDeclarationParsingTests.cs (3)
786N(SyntaxKind.AsyncKeyword); 884N(SyntaxKind.AsyncKeyword); 967N(SyntaxKind.AsyncKeyword);
Parsing\StatementAttributeParsingTests.cs (3)
1508N(SyntaxKind.AsyncKeyword); 4277N(SyntaxKind.AsyncKeyword); 7361N(SyntaxKind.AsyncKeyword);
Parsing\StatementParsingTests.cs (2)
2706N(SyntaxKind.AsyncKeyword); 3335TestContextualKeywordAsLocalVariableType(SyntaxKind.AsyncKeyword);
Syntax\SyntaxNodeTests.cs (7)
3856var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3865var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3874var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3883var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3892var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3901var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3964var newAsync = SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space);
Microsoft.CodeAnalysis.CSharp.Workspaces (15)
Simplification\Reducers\CSharpEscapingReducer.cs (3)
60if (simpleLambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword) 68if (parenLamdba.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword) 77if (enclosingMethodBlock != null && ((MethodDeclarationSyntax)enclosingMethodBlock).Modifiers.Any(SyntaxKind.AsyncKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
13public static readonly SyntaxToken AsyncKeyword = Token(SyntaxKind.AsyncKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
170SyntaxKind.AsyncKeyword,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (3)
97case SyntaxKind.AsyncKeyword: 107if (token.HasMatchingText(SyntaxKind.AsyncKeyword)) 109modifierKind = SyntaxKind.AsyncKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
135SyntaxKind.AsyncKeyword => DeclarationModifiers.Async,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
137public int AsyncKeyword => (int)SyntaxKind.AsyncKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
278isTaskLikeTypeContext: precedingModifiers.Contains(SyntaxKind.AsyncKeyword),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
24SyntaxKind.AsyncKeyword, 298if (token.HasMatchingText(SyntaxKind.AsyncKeyword)) 2879if (token.Text == SyntaxFacts.GetText(SyntaxKind.AsyncKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (1)
30SyntaxKind.AsyncKeyword,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeGeneration\CodeGenerationTests.cs (1)
736yield return CS.SyntaxFactory.Token(CS.SyntaxKind.AsyncKeyword);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\ModifierFlagsExtensions.cs (2)
34{ ModifierFlags.Async, SyntaxKind.AsyncKeyword }, 91case SyntaxKind.AsyncKeyword: