208 references to DelegateKeyword
Microsoft.CodeAnalysis.CSharp (29)
Parser\LanguageParser.cs (22)
342case SyntaxKind.DelegateKeyword: 979var isAliasToFunctionPointer = alias != null && this.CurrentToken.Kind == SyntaxKind.DelegateKeyword; 1393nextToken.Kind is SyntaxKind.EnumKeyword or SyntaxKind.DelegateKeyword || 1703case SyntaxKind.DelegateKeyword: 2001!(kind == SyntaxKind.DelegateKeyword && this.PeekToken(1).Kind is SyntaxKind.OpenBraceToken or SyntaxKind.OpenParenToken)) 2251SyntaxKind.DelegateKeyword => 2309case SyntaxKind.DelegateKeyword: 2359case SyntaxKind.DelegateKeyword when !IsFunctionPointerStart(): 2518case SyntaxKind.DelegateKeyword: 4583case SyntaxKind.DelegateKeyword when IsFunctionPointerStart(): // Function pointer type 5499Debug.Assert(this.CurrentToken.Kind == SyntaxKind.DelegateKeyword); 5501var delegateToken = this.EatToken(SyntaxKind.DelegateKeyword); 7114_ = EatToken(SyntaxKind.DelegateKeyword); 7665var @delegate = EatToken(SyntaxKind.DelegateKeyword); 7823=> CurrentToken.Kind == SyntaxKind.DelegateKeyword && PeekToken(1).Kind == SyntaxKind.AsteriskToken; 10554case SyntaxKind.DelegateKeyword: 10828case SyntaxKind.DelegateKeyword: 11395case SyntaxKind.DelegateKeyword: 11521return this.PeekToken(tokenIndex).Kind == SyntaxKind.DelegateKeyword && 13065var @delegate = this.EatToken(SyntaxKind.DelegateKeyword); 13141case SyntaxKind.DelegateKeyword: 13301case SyntaxKind.DelegateKeyword:
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
576AddKeyword(SyntaxKind.DelegateKeyword);
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
731AddKeyword(SyntaxKind.DelegateKeyword);
Syntax\AnonymousMethodExpressionSyntax.cs (1)
44Token(SyntaxKind.DelegateKeyword),
Syntax\SyntaxFactory.cs (1)
2771? AnonymousMethodExpression(default(SyntaxTokenList), SyntaxFactory.Token(SyntaxKind.DelegateKeyword), parameterList, block, null)
Syntax\SyntaxKindFacts.cs (2)
1001return SyntaxKind.DelegateKeyword; 1649case SyntaxKind.DelegateKeyword:
Syntax\SyntaxNormalizer.cs (1)
741if (next.IsKind(SyntaxKind.AsteriskToken) && token.IsKind(SyntaxKind.DelegateKeyword))
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
154case SyntaxKind.DelegateKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
318case SyntaxKind.DelegateKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
367if (currentKind == SyntaxKind.AsteriskToken && previousKind == SyntaxKind.DelegateKeyword)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
512case SyntaxKind.DelegateKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
67public int DelegateKeyword => (int)SyntaxKind.DelegateKeyword;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
60return enumOrDelegateKeyword.Kind() is SyntaxKind.EnumKeyword or SyntaxKind.DelegateKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1161if (token.IsKind(SyntaxKind.DelegateKeyword) &&
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (1)
2231SyntaxKind.DelegateKeyword);
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\KeywordRecommenders\DelegateKeywordRecommender.cs (1)
25: base(SyntaxKind.DelegateKeyword)
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
45else if (token.IsKind(SyntaxKind.DelegateKeyword) && token.Parent.IsKind(SyntaxKind.AnonymousMethodExpression))
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (1)
66displayParts.Add(Keyword(SyntaxKind.DelegateKeyword));
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
60return enumOrDelegateKeyword.Kind() is SyntaxKind.EnumKeyword or SyntaxKind.DelegateKeyword;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (161)
Generated\Syntax.Test.xml.Generated.cs (12)
41=> InternalSyntaxFactory.FunctionPointerType(InternalSyntaxFactory.Token(SyntaxKind.DelegateKeyword), InternalSyntaxFactory.Token(SyntaxKind.AsteriskToken), null, GenerateFunctionPointerParameterList()); 173=> InternalSyntaxFactory.AnonymousMethodExpression(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.SyntaxToken>(), InternalSyntaxFactory.Token(SyntaxKind.DelegateKeyword), null, GenerateBlock(), null); 515=> InternalSyntaxFactory.DelegateDeclaration(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.SyntaxToken>(), InternalSyntaxFactory.Token(SyntaxKind.DelegateKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Identifier("Identifier"), null, GenerateParameterList(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.TypeParameterConstraintClauseSyntax>(), InternalSyntaxFactory.Token(SyntaxKind.SemicolonToken)); 850Assert.Equal(SyntaxKind.DelegateKeyword, node.DelegateKeyword.Kind); 1365Assert.Equal(SyntaxKind.DelegateKeyword, node.DelegateKeyword.Kind); 2857Assert.Equal(SyntaxKind.DelegateKeyword, node.DelegateKeyword.Kind); 10218=> SyntaxFactory.FunctionPointerType(SyntaxFactory.Token(SyntaxKind.DelegateKeyword), SyntaxFactory.Token(SyntaxKind.AsteriskToken), default(FunctionPointerCallingConventionSyntax), GenerateFunctionPointerParameterList()); 10350=> SyntaxFactory.AnonymousMethodExpression(new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.DelegateKeyword), default(ParameterListSyntax), GenerateBlock(), default(ExpressionSyntax)); 10692=> SyntaxFactory.DelegateDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.DelegateKeyword), GenerateIdentifierName(), SyntaxFactory.Identifier("Identifier"), default(TypeParameterListSyntax), GenerateParameterList(), new SyntaxList<TypeParameterConstraintClauseSyntax>(), SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 11027Assert.Equal(SyntaxKind.DelegateKeyword, node.DelegateKeyword.Kind()); 11542Assert.Equal(SyntaxKind.DelegateKeyword, node.DelegateKeyword.Kind()); 13034Assert.Equal(SyntaxKind.DelegateKeyword, node.DelegateKeyword.Kind());
Parsing\AnonymousFunctionParsingTests.cs (15)
87N(SyntaxKind.DelegateKeyword); 187N(SyntaxKind.DelegateKeyword); 285N(SyntaxKind.DelegateKeyword); 386N(SyntaxKind.DelegateKeyword); 487N(SyntaxKind.DelegateKeyword); 1126N(SyntaxKind.DelegateKeyword); 1454N(SyntaxKind.DelegateKeyword); 1772N(SyntaxKind.DelegateKeyword); 1839N(SyntaxKind.DelegateKeyword); 1933N(SyntaxKind.DelegateKeyword); 2062N(SyntaxKind.DelegateKeyword); 2140N(SyntaxKind.DelegateKeyword); 2166N(SyntaxKind.DelegateKeyword); 2226N(SyntaxKind.DelegateKeyword); 2252N(SyntaxKind.DelegateKeyword);
Parsing\AsyncParsingTests.cs (3)
1210N(SyntaxKind.DelegateKeyword); 1371N(SyntaxKind.DelegateKeyword); 1391N(SyntaxKind.DelegateKeyword);
Parsing\AwaitParsingTests.cs (1)
1713N(SyntaxKind.DelegateKeyword);
Parsing\CollectionExpressionParsingTests.cs (1)
3149N(SyntaxKind.DelegateKeyword);
Parsing\DeclarationParsingTests.cs (2)
8378N(SyntaxKind.DelegateKeyword); 8417N(SyntaxKind.DelegateKeyword);
Parsing\DeclarationScopeParsingTests.cs (6)
9547N(SyntaxKind.DelegateKeyword); 9599N(SyntaxKind.DelegateKeyword); 11299N(SyntaxKind.DelegateKeyword); 11364N(SyntaxKind.DelegateKeyword); 11415N(SyntaxKind.DelegateKeyword); 11484N(SyntaxKind.DelegateKeyword);
Parsing\FileModifierParsingTests.cs (4)
599N(SyntaxKind.DelegateKeyword); 756N(SyntaxKind.DelegateKeyword); 1692N(SyntaxKind.DelegateKeyword); 1952N(SyntaxKind.DelegateKeyword);
Parsing\FunctionPointerTests.cs (80)
27N(SyntaxKind.DelegateKeyword); 83N(SyntaxKind.DelegateKeyword); 155N(SyntaxKind.DelegateKeyword); 205N(SyntaxKind.DelegateKeyword); 248N(SyntaxKind.DelegateKeyword); 300N(SyntaxKind.DelegateKeyword); 351N(SyntaxKind.DelegateKeyword); 394N(SyntaxKind.DelegateKeyword); 442N(SyntaxKind.DelegateKeyword); 540N(SyntaxKind.DelegateKeyword); 605N(SyntaxKind.DelegateKeyword); 656N(SyntaxKind.DelegateKeyword); 665N(SyntaxKind.DelegateKeyword); 715N(SyntaxKind.DelegateKeyword); 764N(SyntaxKind.DelegateKeyword); 809N(SyntaxKind.DelegateKeyword); 886N(SyntaxKind.DelegateKeyword); 930N(SyntaxKind.DelegateKeyword); 972N(SyntaxKind.DelegateKeyword); 1017N(SyntaxKind.DelegateKeyword); 1067N(SyntaxKind.DelegateKeyword); 1121N(SyntaxKind.DelegateKeyword); 1172N(SyntaxKind.DelegateKeyword); 1226N(SyntaxKind.DelegateKeyword); 1277N(SyntaxKind.DelegateKeyword); 1352N(SyntaxKind.DelegateKeyword); 1396N(SyntaxKind.DelegateKeyword); 1444N(SyntaxKind.DelegateKeyword); 1502N(SyntaxKind.DelegateKeyword); 1566N(SyntaxKind.DelegateKeyword); 1622N(SyntaxKind.DelegateKeyword); 1669N(SyntaxKind.DelegateKeyword); 1723N(SyntaxKind.DelegateKeyword); 1754N(SyntaxKind.DelegateKeyword); 1784N(SyntaxKind.DelegateKeyword); 1838N(SyntaxKind.DelegateKeyword); 1896N(SyntaxKind.DelegateKeyword); 1950N(SyntaxKind.DelegateKeyword); 1980N(SyntaxKind.DelegateKeyword); 2035N(SyntaxKind.DelegateKeyword); 2066N(SyntaxKind.DelegateKeyword); 2111N(SyntaxKind.DelegateKeyword); 2167N(SyntaxKind.DelegateKeyword); 2221N(SyntaxKind.DelegateKeyword); 2224N(SyntaxKind.DelegateKeyword); 2260N(SyntaxKind.DelegateKeyword); 2310N(SyntaxKind.DelegateKeyword); 2380N(SyntaxKind.DelegateKeyword); 2406N(SyntaxKind.DelegateKeyword); 2439N(SyntaxKind.DelegateKeyword); 2483N(SyntaxKind.DelegateKeyword); 2517N(SyntaxKind.DelegateKeyword); 2571N(SyntaxKind.DelegateKeyword); 2605N(SyntaxKind.DelegateKeyword); 2686N(SyntaxKind.DelegateKeyword); 2719N(SyntaxKind.DelegateKeyword); 2790N(SyntaxKind.DelegateKeyword); 2847N(SyntaxKind.DelegateKeyword); 2900N(SyntaxKind.DelegateKeyword); 2952N(SyntaxKind.DelegateKeyword); 2995N(SyntaxKind.DelegateKeyword); 3045N(SyntaxKind.DelegateKeyword); 3081N(SyntaxKind.DelegateKeyword); 3141N(SyntaxKind.DelegateKeyword); 3185N(SyntaxKind.DelegateKeyword); 3236N(SyntaxKind.DelegateKeyword); 3278N(SyntaxKind.DelegateKeyword); 3317N(SyntaxKind.DelegateKeyword); 3383N(SyntaxKind.DelegateKeyword); 3456N(SyntaxKind.DelegateKeyword); 3536N(SyntaxKind.DelegateKeyword); 3608N(SyntaxKind.DelegateKeyword); 3666N(SyntaxKind.DelegateKeyword); 3710N(SyntaxKind.DelegateKeyword); 3767N(SyntaxKind.DelegateKeyword); 3827N(SyntaxKind.DelegateKeyword); 3908N(SyntaxKind.DelegateKeyword); 3996N(SyntaxKind.DelegateKeyword); 4088N(SyntaxKind.DelegateKeyword); 4146N(SyntaxKind.DelegateKeyword);
Parsing\LambdaParameterParsingTests.cs (9)
2288N(SyntaxKind.DelegateKeyword); 2692N(SyntaxKind.DelegateKeyword); 2807N(SyntaxKind.DelegateKeyword); 2900N(SyntaxKind.DelegateKeyword); 2972N(SyntaxKind.DelegateKeyword); 3050N(SyntaxKind.DelegateKeyword); 3142N(SyntaxKind.DelegateKeyword); 3263N(SyntaxKind.DelegateKeyword); 3391N(SyntaxKind.DelegateKeyword);
Parsing\LambdaReturnTypeParsingTests.cs (8)
300N(SyntaxKind.DelegateKeyword); 330N(SyntaxKind.DelegateKeyword); 561N(SyntaxKind.DelegateKeyword); 600N(SyntaxKind.DelegateKeyword); 623N(SyntaxKind.DelegateKeyword); 1541N(SyntaxKind.DelegateKeyword); 1588N(SyntaxKind.DelegateKeyword); 5755N(SyntaxKind.DelegateKeyword);
Parsing\LocalFunctionParsingTests.cs (1)
2779N(SyntaxKind.DelegateKeyword);
Parsing\MemberDeclarationParsingTests.cs (4)
1985N(SyntaxKind.DelegateKeyword); 2184N(SyntaxKind.DelegateKeyword); 9309N(SyntaxKind.DelegateKeyword); 12185N(SyntaxKind.DelegateKeyword);
Parsing\PatternParsingTests.cs (1)
10318N(SyntaxKind.DelegateKeyword);
Parsing\ScriptParsingTests.cs (4)
1427N(SyntaxKind.DelegateKeyword); 1464N(SyntaxKind.DelegateKeyword); 1500N(SyntaxKind.DelegateKeyword); 2452N(SyntaxKind.DelegateKeyword);
Parsing\StatementAttributeParsingTests.cs (3)
3306N(SyntaxKind.DelegateKeyword); 3389N(SyntaxKind.DelegateKeyword); 3469N(SyntaxKind.DelegateKeyword);
Parsing\TopLevelStatementsParsingTests.cs (3)
1017N(SyntaxKind.DelegateKeyword); 2480N(SyntaxKind.DelegateKeyword); 2690N(SyntaxKind.DelegateKeyword);
Parsing\UsingDirectiveParsingTests.cs (4)
123N(SyntaxKind.DelegateKeyword); 417N(SyntaxKind.DelegateKeyword); 735N(SyntaxKind.DelegateKeyword); 795N(SyntaxKind.DelegateKeyword);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
154case SyntaxKind.DelegateKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
318case SyntaxKind.DelegateKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
367if (currentKind == SyntaxKind.AsteriskToken && previousKind == SyntaxKind.DelegateKeyword)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
512case SyntaxKind.DelegateKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
67public int DelegateKeyword => (int)SyntaxKind.DelegateKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1161if (token.IsKind(SyntaxKind.DelegateKeyword) &&