111 references to ExtensionKeyword
Microsoft.CodeAnalysis.CSharp (14)
Parser\DocumentationCommentParser.cs (2)
949case SyntaxKind.IdentifierToken when CurrentToken.ContextualKind == SyntaxKind.ExtensionKeyword: 987Debug.Assert(CurrentToken.ContextualKind == SyntaxKind.ExtensionKeyword);
Parser\LanguageParser.cs (5)
1711Debug.Assert(CurrentToken.ContextualKind is SyntaxKind.RecordKeyword or SyntaxKind.ExtensionKeyword); 1722this.CurrentToken.ContextualKind is SyntaxKind.RecordKeyword or SyntaxKind.ExtensionKeyword); 1732bool isExtension = keyword.Kind == SyntaxKind.ExtensionKeyword; 1979case SyntaxKind.ExtensionKeyword: 3244return this.CurrentToken.ContextualKind == SyntaxKind.ExtensionKeyword && IsFeatureEnabled(MessageID.IDS_FeatureExtensions);
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
353AddKeyword(SyntaxKind.ExtensionKeyword);
Symbols\Source\ParameterHelpers.cs (1)
677addERR_BadParameterModifiers(diagnostics, modifier, SyntaxKind.ExtensionKeyword);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
509|| reportIfContextual(SyntaxKind.ExtensionKeyword, MessageID.IDS_FeatureExtensions, ErrorCode.ERR_ExtensionTypeNameDisallowed))
Syntax\SyntaxKindFacts.cs (4)
1236for (int i = (int)SyntaxKind.YieldKeyword; i <= (int)SyntaxKind.ExtensionKeyword; i++) 1298case SyntaxKind.ExtensionKeyword: 1427return SyntaxKind.ExtensionKeyword; 1875case SyntaxKind.ExtensionKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
36public static readonly SyntaxToken ExtensionKeyword = Token(SyntaxKind.ExtensionKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
342or SyntaxKind.ExtensionKeyword
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\KeywordRecommenders\ExtensionKeywordRecommender.cs (1)
11internal sealed class ExtensionKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.ExtensionKeyword)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (92)
Generated\Syntax.Test.xml.Generated.cs (8)
524=> InternalSyntaxFactory.ExtensionBlockDeclaration(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.SyntaxToken>(), InternalSyntaxFactory.Token(SyntaxKind.ExtensionKeyword), null, null, new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.TypeParameterConstraintClauseSyntax>(), null, new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.MemberDeclarationSyntax>(), null, null); 632=> InternalSyntaxFactory.ExtensionMemberCref(InternalSyntaxFactory.Token(SyntaxKind.ExtensionKeyword), null, GenerateCrefParameterList(), InternalSyntaxFactory.Token(SyntaxKind.DotToken), GenerateNameMemberCref()); 2910Assert.Equal(SyntaxKind.ExtensionKeyword, node.Keyword.Kind); 3388Assert.Equal(SyntaxKind.ExtensionKeyword, node.ExtensionKeyword.Kind); 10874=> SyntaxFactory.ExtensionBlockDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.ExtensionKeyword), default(TypeParameterListSyntax), default(ParameterListSyntax), new SyntaxList<TypeParameterConstraintClauseSyntax>(), default(SyntaxToken), new SyntaxList<MemberDeclarationSyntax>(), default(SyntaxToken), default(SyntaxToken)); 10982=> SyntaxFactory.ExtensionMemberCref(SyntaxFactory.Token(SyntaxKind.ExtensionKeyword), default(TypeArgumentListSyntax), GenerateCrefParameterList(), SyntaxFactory.Token(SyntaxKind.DotToken), GenerateNameMemberCref()); 13260Assert.Equal(SyntaxKind.ExtensionKeyword, node.Keyword.Kind()); 13738Assert.Equal(SyntaxKind.ExtensionKeyword, node.ExtensionKeyword.Kind());
IncrementalParsing\IncrementalParsingTests.cs (8)
1053SyntaxKind.ExtensionKeyword); 1066N(SyntaxKind.ExtensionKeyword); 1112SyntaxKind.ExtensionKeyword, 1127N(SyntaxKind.ExtensionKeyword); 1172SyntaxKind.ExtensionKeyword); 1188N(SyntaxKind.ExtensionKeyword); 1231SyntaxKind.ExtensionKeyword, 1247N(SyntaxKind.ExtensionKeyword);
Parsing\CrefParsingTests.cs (7)
3813N(SyntaxKind.ExtensionKeyword); 3862N(SyntaxKind.ExtensionKeyword); 3911N(SyntaxKind.ExtensionKeyword); 3953N(SyntaxKind.ExtensionKeyword); 3992N(SyntaxKind.ExtensionKeyword); 4001N(SyntaxKind.ExtensionKeyword); 4028N(SyntaxKind.ExtensionKeyword);
Parsing\ExtensionsParsingTests.cs (69)
145N(SyntaxKind.ExtensionKeyword); 211N(SyntaxKind.ExtensionKeyword); 301N(SyntaxKind.ExtensionKeyword); 391N(SyntaxKind.ExtensionKeyword); 437N(SyntaxKind.ExtensionKeyword); 496N(SyntaxKind.ExtensionKeyword); 555N(SyntaxKind.ExtensionKeyword); 609N(SyntaxKind.ExtensionKeyword); 672N(SyntaxKind.ExtensionKeyword); 773N(SyntaxKind.ExtensionKeyword); 860N(SyntaxKind.ExtensionKeyword); 903N(SyntaxKind.ExtensionKeyword); 953N(SyntaxKind.ExtensionKeyword); 1013N(SyntaxKind.ExtensionKeyword); 1067N(SyntaxKind.ExtensionKeyword); 1122N(SyntaxKind.ExtensionKeyword); 1184N(SyntaxKind.ExtensionKeyword); 1246N(SyntaxKind.ExtensionKeyword); 1304N(SyntaxKind.ExtensionKeyword); 1372N(SyntaxKind.ExtensionKeyword); 1418N(SyntaxKind.ExtensionKeyword); 1477N(SyntaxKind.ExtensionKeyword); 1532N(SyntaxKind.ExtensionKeyword); 1587N(SyntaxKind.ExtensionKeyword); 1603N(SyntaxKind.ExtensionKeyword); 1661N(SyntaxKind.ExtensionKeyword); 1717N(SyntaxKind.ExtensionKeyword); 2109N(SyntaxKind.ExtensionKeyword); 2162N(SyntaxKind.ExtensionKeyword); 2245N(SyntaxKind.ExtensionKeyword); 2336N(SyntaxKind.ExtensionKeyword); 2420N(SyntaxKind.ExtensionKeyword); 2508N(SyntaxKind.ExtensionKeyword); 2602N(SyntaxKind.ExtensionKeyword); 2665N(SyntaxKind.ExtensionKeyword); 2736N(SyntaxKind.ExtensionKeyword); 2804N(SyntaxKind.ExtensionKeyword); 2876N(SyntaxKind.ExtensionKeyword); 2939N(SyntaxKind.ExtensionKeyword); 3034N(SyntaxKind.ExtensionKeyword); 3129N(SyntaxKind.ExtensionKeyword); 3275N(SyntaxKind.ExtensionKeyword); 3330N(SyntaxKind.ExtensionKeyword); 3374N(SyntaxKind.ExtensionKeyword); 3419N(SyntaxKind.ExtensionKeyword); 3469N(SyntaxKind.ExtensionKeyword); 3520N(SyntaxKind.ExtensionKeyword); 3576N(SyntaxKind.ExtensionKeyword); 3632N(SyntaxKind.ExtensionKeyword); 3700N(SyntaxKind.ExtensionKeyword); 3750N(SyntaxKind.ExtensionKeyword); 3827N(SyntaxKind.ExtensionKeyword); 3879N(SyntaxKind.ExtensionKeyword); 3954N(SyntaxKind.ExtensionKeyword); 4032N(SyntaxKind.ExtensionKeyword); 4103N(SyntaxKind.ExtensionKeyword); 4192N(SyntaxKind.ExtensionKeyword); 4258N(SyntaxKind.ExtensionKeyword); 4322N(SyntaxKind.ExtensionKeyword); 4368N(SyntaxKind.ExtensionKeyword); 4452N(SyntaxKind.ExtensionKeyword); 4579N(SyntaxKind.ExtensionKeyword); 4781N(SyntaxKind.ExtensionKeyword); 4833N(SyntaxKind.ExtensionKeyword); 4892N(SyntaxKind.ExtensionKeyword); 4919Assert.Equal("extension", SyntaxFacts.GetText(SyntaxKind.ExtensionKeyword)); 4920Assert.Contains(SyntaxKind.ExtensionKeyword, SyntaxFacts.GetContextualKeywordKinds()); 4921Assert.True(SyntaxFacts.IsContextualKeyword(SyntaxKind.ExtensionKeyword)); 4922Assert.Equal(SyntaxKind.ExtensionKeyword, SyntaxFacts.GetContextualKeywordKind("extension"));
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
36public static readonly SyntaxToken ExtensionKeyword = Token(SyntaxKind.ExtensionKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
342or SyntaxKind.ExtensionKeyword