98 references to ExtensionKeyword
Microsoft.CodeAnalysis.CSharp (12)
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)
612addERR_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)
35public static readonly SyntaxToken ExtensionKeyword = Token(SyntaxKind.ExtensionKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
341or SyntaxKind.ExtensionKeyword ||
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\KeywordRecommenders\ExtensionKeywordRecommender.cs (1)
11internal sealed class ExtensionKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.ExtensionKeyword)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (81)
Generated\Syntax.Test.xml.Generated.cs (4)
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); 2907Assert.Equal(SyntaxKind.ExtensionKeyword, node.Keyword.Kind); 10831=> 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)); 13214Assert.Equal(SyntaxKind.ExtensionKeyword, node.Keyword.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\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); 3042N(SyntaxKind.ExtensionKeyword); 3140N(SyntaxKind.ExtensionKeyword); 3286N(SyntaxKind.ExtensionKeyword); 3341N(SyntaxKind.ExtensionKeyword); 3385N(SyntaxKind.ExtensionKeyword); 3430N(SyntaxKind.ExtensionKeyword); 3480N(SyntaxKind.ExtensionKeyword); 3531N(SyntaxKind.ExtensionKeyword); 3587N(SyntaxKind.ExtensionKeyword); 3643N(SyntaxKind.ExtensionKeyword); 3711N(SyntaxKind.ExtensionKeyword); 3761N(SyntaxKind.ExtensionKeyword); 3838N(SyntaxKind.ExtensionKeyword); 3890N(SyntaxKind.ExtensionKeyword); 3965N(SyntaxKind.ExtensionKeyword); 4043N(SyntaxKind.ExtensionKeyword); 4114N(SyntaxKind.ExtensionKeyword); 4203N(SyntaxKind.ExtensionKeyword); 4269N(SyntaxKind.ExtensionKeyword); 4333N(SyntaxKind.ExtensionKeyword); 4379N(SyntaxKind.ExtensionKeyword); 4463N(SyntaxKind.ExtensionKeyword); 4590N(SyntaxKind.ExtensionKeyword); 4792N(SyntaxKind.ExtensionKeyword); 4844N(SyntaxKind.ExtensionKeyword); 4903N(SyntaxKind.ExtensionKeyword); 4930Assert.Equal("extension", SyntaxFacts.GetText(SyntaxKind.ExtensionKeyword)); 4931Assert.Contains(SyntaxKind.ExtensionKeyword, SyntaxFacts.GetContextualKeywordKinds()); 4932Assert.True(SyntaxFacts.IsContextualKeyword(SyntaxKind.ExtensionKeyword)); 4933Assert.Equal(SyntaxKind.ExtensionKeyword, SyntaxFacts.GetContextualKeywordKind("extension"));
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
35public static readonly SyntaxToken ExtensionKeyword = Token(SyntaxKind.ExtensionKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
341or SyntaxKind.ExtensionKeyword ||