276 references to AsyncKeyword
Microsoft.CodeAnalysis.CSharp (31)
Binder\Binder_Lambda.cs (1)
106if (modifier.IsKind(SyntaxKind.AsyncKeyword))
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
553if (lambdaSyntax.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword) 571if (lambdaSyntax.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword)
Parser\LanguageParser.cs (17)
1054case SyntaxKind.AsyncKeyword: 1063case SyntaxKind.AsyncKeyword: 2586this.CurrentToken.ContextualKind is not (SyntaxKind.PartialKeyword or SyntaxKind.AsyncKeyword or SyntaxKind.RequiredKeyword or SyntaxKind.FileKeyword) && 2879if (contextualKind != SyntaxKind.AsyncKeyword || 3174IsInAsync = modifiers.Any((int)SyntaxKind.AsyncKeyword); 7603&& (tk is not (SyntaxKind.AsyncKeyword or SyntaxKind.ScopedKeyword) || ShouldContextualKeywordBeTreatedAsModifier(parsingStatementNotDeclaration: true)); 9653if (k == SyntaxKind.AsyncKeyword) 9732case SyntaxKind.AsyncKeyword: 9797case SyntaxKind.AsyncKeyword: 10858this.PeekToken(tokenIndex).ContextualKind == SyntaxKind.AsyncKeyword) 11692else if (this.CurrentToken.ContextualKind == SyntaxKind.AsyncKeyword && 11735if (this.CurrentToken.ContextualKind == SyntaxKind.AsyncKeyword && 12278if (modifiers.Any((int)SyntaxKind.AsyncKeyword)) 12336if (this.CurrentToken.ContextualKind == SyntaxKind.AsyncKeyword && 12339modifiers.Add(this.EatContextualToken(SyntaxKind.AsyncKeyword)); 12351Debug.Assert(this.CurrentToken.ContextualKind == SyntaxKind.AsyncKeyword); 12397if (modifiers.Any((int)SyntaxKind.AsyncKeyword))
Symbols\Source\ModifierUtils.cs (3)
319return SyntaxFacts.GetText(SyntaxKind.AsyncKeyword); 339case SyntaxKind.AsyncKeyword: 411var 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)
1181case SyntaxKind.AsyncKeyword: 1289return SyntaxKind.AsyncKeyword; 1729case SyntaxKind.AsyncKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
CSharpAccessibilityFacts.cs (1)
135SyntaxKind.AsyncKeyword => DeclarationModifiers.Async,
CSharpIdeCodeStyleOptions.cs (1)
29SyntaxKind.AsyncKeyword);
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
88if (wasAwaited != anonymousFunction.Modifiers.Any(SyntaxKind.AsyncKeyword))
CSharpSyntaxKinds.cs (1)
123public int AsyncKeyword => (int)SyntaxKind.AsyncKeyword;
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (3)
49case SyntaxKind.AsyncKeyword: 60if (token.HasMatchingText(SyntaxKind.AsyncKeyword)) 62result.Add(SyntaxKind.AsyncKeyword);
UseExpressionBodyForLocalFunctionHelper.cs (1)
56if (statement.Modifiers.Any(SyntaxKind.AsyncKeyword))
UseExpressionBodyForMethodsHelper.cs (1)
56if (declaration.Modifiers.Any(SyntaxKind.AsyncKeyword))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (13)
CSharpConvertToAsyncMethodCodeFixProvider.cs (1)
91if (!methodDeclaration.Modifiers.Any(m => m.IsKind(SyntaxKind.AsyncKeyword)))
CSharpDeclareAsNullableCodeFixProvider.cs (1)
290if (modifiers.Any(SyntaxKind.AsyncKeyword) || onYield)
CSharpFixReturnTypeCodeFixProvider.cs (2)
150MethodDeclarationSyntax method => (method.ReturnType, method.Modifiers.Any(SyntaxKind.AsyncKeyword)), 153LocalFunctionStatementSyntax localFunction => (localFunction.ReturnType, localFunction.Modifiers.Any(SyntaxKind.AsyncKeyword)),
CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
29private static readonly SyntaxToken s_asyncToken = SyntaxFactory.Token(SyntaxKind.AsyncKeyword);
CSharpSyntaxContext.cs (1)
276isTaskLikeTypeContext: precedingModifiers.Contains(SyntaxKind.AsyncKeyword),
CSharpUseLocalFunctionCodeFixProvider.cs (1)
218if (anonymousFunction.AsyncKeyword.IsKind(SyntaxKind.AsyncKeyword))
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (3)
24SyntaxKind.AsyncKeyword, 298if (token.HasMatchingText(SyntaxKind.AsyncKeyword)) 2877if (token.Text == SyntaxFacts.GetText(SyntaxKind.AsyncKeyword))
MethodGenerator.cs (1)
325tokens.Add(SyntaxFactory.Token(SyntaxKind.AsyncKeyword));
RemoveAsyncModifierHelpers.cs (1)
35var asyncTokenIndex = modifiers.IndexOf(SyntaxKind.AsyncKeyword);
SyntaxKindSet.cs (1)
33SyntaxKind.AsyncKeyword,
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
EditAndContinue\SyntaxComparerTests.cs (8)
58new[] { SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword) }, 59new[] { SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword) }); 74ImmutableArray.Create(SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword)), 75ImmutableArray.Create(SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword))); 110new[] { SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword) }, 111new[] { SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword) }); 120ImmutableArray.Create(SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword)), 121ImmutableArray.Create(SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword)));
Microsoft.CodeAnalysis.CSharp.Features (40)
CodeRefactorings\AddAwait\CSharpAddAwaitCodeRefactoringProvider.cs (1)
44return ((MethodDeclarationSyntax)current).Modifiers.Any(SyntaxKind.AsyncKeyword);
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
181if (identifier.Identifier.IsKindOrHasMatchingText(SyntaxKind.AsyncKeyword))
Completion\CompletionProviders\DeclarationName\DeclarationNameCompletionProvider.cs (1)
69if (context.TargetToken.IsKindOrHasMatchingText(SyntaxKind.AsyncKeyword) ||
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
592case SyntaxKind.AsyncKeyword:
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (2)
75if (SyntaxFacts.GetContextualKeywordKind(targetToken.ValueText) == SyntaxKind.AsyncKeyword) 124if (tokenBeforeType.Kind() == SyntaxKind.AsyncKeyword)
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
119if (token.IsKindOrHasMatchingText(SyntaxKind.AsyncKeyword))
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
323yield return SyntaxFacts.GetText(SyntaxKind.AsyncKeyword);
Completion\KeywordRecommenders\AsyncKeywordRecommender.cs (2)
16: base(SyntaxKind.AsyncKeyword, isValidInPreprocessorContext: false) 29context.PrecedingModifiers.Contains(SyntaxKind.AsyncKeyword))
Completion\KeywordRecommenders\DelegateKeywordRecommender.cs (1)
51context.TargetToken.IsKindOrHasMatchingText(SyntaxKind.AsyncKeyword) &&
Completion\KeywordRecommenders\PartialKeywordRecommender.cs (1)
20SyntaxKind.AsyncKeyword,
Completion\KeywordRecommenders\StaticKeywordRecommender.cs (4)
27SyntaxKind.AsyncKeyword, 42SyntaxKind.AsyncKeyword, 71SyntaxKind.AsyncKeyword, 87context.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: TokenList(otherMethod.Modifiers.Where(m => m.Kind() is SyntaxKind.AsyncKeyword or SyntaxKind.UnsafeKeyword)),
CSharpConvertToAsyncMethodCodeFixProvider.cs (1)
91if (!methodDeclaration.Modifiers.Any(m => m.IsKind(SyntaxKind.AsyncKeyword)))
CSharpDeclareAsNullableCodeFixProvider.cs (1)
290if (modifiers.Any(SyntaxKind.AsyncKeyword) || onYield)
CSharpFixReturnTypeCodeFixProvider.cs (2)
150MethodDeclarationSyntax method => (method.ReturnType, method.Modifiers.Any(SyntaxKind.AsyncKeyword)), 153LocalFunctionStatementSyntax localFunction => (localFunction.ReturnType, localFunction.Modifiers.Any(SyntaxKind.AsyncKeyword)),
CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
29private static readonly SyntaxToken s_asyncToken = SyntaxFactory.Token(SyntaxKind.AsyncKeyword);
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
88if (wasAwaited != anonymousFunction.Modifiers.Any(SyntaxKind.AsyncKeyword))
CSharpUseLocalFunctionCodeFixProvider.cs (1)
218if (anonymousFunction.AsyncKeyword.IsKind(SyntaxKind.AsyncKeyword))
EditAndContinue\SyntaxComparer.cs (2)
934if ((leftAsync.Kind() == SyntaxKind.AsyncKeyword) != (rightAsync.Kind() == SyntaxKind.AsyncKeyword))
EditAndContinue\SyntaxUtilities.cs (3)
267return anonymousFunction.AsyncKeyword.IsKind(SyntaxKind.AsyncKeyword); 278MethodDeclarationSyntax method => method.Modifiers.Any(SyntaxKind.AsyncKeyword), 279LocalFunctionStatementSyntax localFunction => localFunction.Modifiers.Any(SyntaxKind.AsyncKeyword),
ExtractMethod\CSharpSelectionResult.StatementResult.cs (4)
41MethodDeclarationSyntax method => method.Modifiers.Any(SyntaxKind.AsyncKeyword), 42ParenthesizedLambdaExpressionSyntax lambda => lambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword, 43SimpleLambdaExpressionSyntax lambda => lambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword, 44AnonymousMethodExpressionSyntax anonymous => anonymous.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword,
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
53SyntaxKind.AsyncKeyword or
Highlighting\KeywordHighlighters\AsyncAwaitHighlighter.cs (1)
105if (mod.Kind() is SyntaxKind.AsyncKeyword or SyntaxKind.AwaitKeyword)
RemoveAsyncModifierHelpers.cs (1)
35var asyncTokenIndex = modifiers.IndexOf(SyntaxKind.AsyncKeyword);
UseExpressionBodyForLocalFunctionHelper.cs (1)
56if (statement.Modifiers.Any(SyntaxKind.AsyncKeyword))
UseExpressionBodyForMethodsHelper.cs (1)
56if (declaration.Modifiers.Any(SyntaxKind.AsyncKeyword))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (156)
Parsing\AnonymousFunctionParsingTests.cs (19)
85N(SyntaxKind.AsyncKeyword); 86N(SyntaxKind.AsyncKeyword); 284N(SyntaxKind.AsyncKeyword); 385N(SyntaxKind.AsyncKeyword); 743N(SyntaxKind.AsyncKeyword); 2565N(SyntaxKind.AsyncKeyword); 2712N(SyntaxKind.AsyncKeyword); 2860N(SyntaxKind.AsyncKeyword); 2862N(SyntaxKind.AsyncKeyword); 3122N(SyntaxKind.AsyncKeyword); 3386N(SyntaxKind.AsyncKeyword); 3538N(SyntaxKind.AsyncKeyword); 3691N(SyntaxKind.AsyncKeyword); 3693N(SyntaxKind.AsyncKeyword); 3980N(SyntaxKind.AsyncKeyword); 4262N(SyntaxKind.AsyncKeyword); 4423N(SyntaxKind.AsyncKeyword); 4585N(SyntaxKind.AsyncKeyword); 4587N(SyntaxKind.AsyncKeyword);
Parsing\AsyncParsingTests.cs (47)
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); 1717N(SyntaxKind.AsyncKeyword); 1771N(SyntaxKind.AsyncKeyword); 1834N(SyntaxKind.AsyncKeyword); 1888N(SyntaxKind.AsyncKeyword); 1945N(SyntaxKind.AsyncKeyword); 1997N(SyntaxKind.AsyncKeyword); 2051N(SyntaxKind.AsyncKeyword); 2096N(SyntaxKind.AsyncKeyword); 2126N(SyntaxKind.AsyncKeyword); 2165N(SyntaxKind.AsyncKeyword); 2211N(SyntaxKind.AsyncKeyword); 2260N(SyntaxKind.AsyncKeyword); 2312N(SyntaxKind.AsyncKeyword); 2357N(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 (20)
48N(SyntaxKind.AsyncKeyword); 177N(SyntaxKind.AsyncKeyword); 259N(SyntaxKind.AsyncKeyword); 350N(SyntaxKind.AsyncKeyword); 437N(SyntaxKind.AsyncKeyword); 481N(SyntaxKind.AsyncKeyword); 525N(SyntaxKind.AsyncKeyword); 559N(SyntaxKind.AsyncKeyword); 587N(SyntaxKind.AsyncKeyword); 621N(SyntaxKind.AsyncKeyword); 655N(SyntaxKind.AsyncKeyword); 696N(SyntaxKind.AsyncKeyword); 733N(SyntaxKind.AsyncKeyword); 764N(SyntaxKind.AsyncKeyword); 795N(SyntaxKind.AsyncKeyword); 826N(SyntaxKind.AsyncKeyword); 890N(SyntaxKind.AsyncKeyword); 935N(SyntaxKind.AsyncKeyword); 1049N(SyntaxKind.AsyncKeyword); 1108N(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)
899yield return getData("[A] async x => x", tests => tests.LambdaExpression_01(SyntaxKind.AsyncKeyword)); 901yield return getData("[A] async static x => x", tests => tests.LambdaExpression_01(SyntaxKind.AsyncKeyword, SyntaxKind.StaticKeyword)); 902yield return getData("[A] static async x => x", tests => tests.LambdaExpression_01(SyntaxKind.StaticKeyword, SyntaxKind.AsyncKeyword)); 905yield return getData("[A]async () => { }", tests => tests.LambdaExpression_02(SyntaxKind.AsyncKeyword)); 907yield return getData("[A]async static () => { }", tests => tests.LambdaExpression_02(SyntaxKind.AsyncKeyword, SyntaxKind.StaticKeyword)); 908yield return getData("[A]static async () => { }", tests => tests.LambdaExpression_02(SyntaxKind.StaticKeyword, SyntaxKind.AsyncKeyword)); 911yield return getData("[A] async (x) => { }", tests => tests.LambdaExpression_03(SyntaxKind.AsyncKeyword)); 913yield return getData("[A] async static (x) => { }", tests => tests.LambdaExpression_03(SyntaxKind.AsyncKeyword, SyntaxKind.StaticKeyword)); 914yield return getData("[A] static async (x) => { }", tests => tests.LambdaExpression_03(SyntaxKind.StaticKeyword, SyntaxKind.AsyncKeyword)); 917yield return getData("[A] async (object x) => { }", tests => tests.LambdaExpression_04(SyntaxKind.AsyncKeyword)); 919yield return getData("[A] async static (object x) => { }", tests => tests.LambdaExpression_04(SyntaxKind.AsyncKeyword, SyntaxKind.StaticKeyword)); 920yield return getData("[A] static async (object x) => { }", tests => tests.LambdaExpression_04(SyntaxKind.StaticKeyword, SyntaxKind.AsyncKeyword));
Parsing\LambdaParameterParsingTests.cs (1)
5015N(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); 1684N(SyntaxKind.AsyncKeyword); 4908N(SyntaxKind.AsyncKeyword); 4909N(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)
791N(SyntaxKind.AsyncKeyword); 890N(SyntaxKind.AsyncKeyword); 973N(SyntaxKind.AsyncKeyword);
Parsing\StatementAttributeParsingTests.cs (3)
1507N(SyntaxKind.AsyncKeyword); 4276N(SyntaxKind.AsyncKeyword); 7349N(SyntaxKind.AsyncKeyword);
Parsing\StatementParsingTests.cs (2)
2703N(SyntaxKind.AsyncKeyword); 3332TestContextualKeywordAsLocalVariableType(SyntaxKind.AsyncKeyword);
Syntax\SyntaxNodeTests.cs (7)
3822var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3831var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3840var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3849var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3858var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3867var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3930var newAsync = SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space);
Microsoft.CodeAnalysis.CSharp.Workspaces (16)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
1712list.Add(SyntaxFactory.Token(SyntaxKind.AsyncKeyword));
CSharpAccessibilityFacts.cs (1)
135SyntaxKind.AsyncKeyword => DeclarationModifiers.Async,
CSharpIdeCodeStyleOptions.cs (1)
29SyntaxKind.AsyncKeyword);
CSharpSyntaxContext.cs (1)
276isTaskLikeTypeContext: precedingModifiers.Contains(SyntaxKind.AsyncKeyword),
CSharpSyntaxKinds.cs (1)
123public int AsyncKeyword => (int)SyntaxKind.AsyncKeyword;
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (3)
49case SyntaxKind.AsyncKeyword: 60if (token.HasMatchingText(SyntaxKind.AsyncKeyword)) 62result.Add(SyntaxKind.AsyncKeyword);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (3)
24SyntaxKind.AsyncKeyword, 298if (token.HasMatchingText(SyntaxKind.AsyncKeyword)) 2877if (token.Text == SyntaxFacts.GetText(SyntaxKind.AsyncKeyword))
MethodGenerator.cs (1)
325tokens.Add(SyntaxFactory.Token(SyntaxKind.AsyncKeyword));
Simplification\Reducers\CSharpEscapingReducer.cs (3)
61if (simpleLambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword) 69if (parenLamdba.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword) 78if (enclosingMethodBlock != null && ((MethodDeclarationSyntax)enclosingMethodBlock).Modifiers.Any(n => n.Kind() == SyntaxKind.AsyncKeyword))
SyntaxKindSet.cs (1)
33SyntaxKind.AsyncKeyword,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeGeneration\CodeGenerationTests.cs (1)
750yield return CS.SyntaxFactory.Token(CS.SyntaxKind.AsyncKeyword);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\ModifierFlagsExtensions.cs (2)
35{ ModifierFlags.Async, SyntaxKind.AsyncKeyword }, 92case SyntaxKind.AsyncKeyword: