125 references to EnumMemberDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (31)
Compilation\CSharpSemanticModel.cs (1)
2995public abstract IFieldSymbol GetDeclaredSymbol(EnumMemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
Compilation\InitializerSemanticModel.cs (2)
97rootSyntax = ((EnumMemberDeclarationSyntax)rootSyntax).EqualsValue; 134equalsValue = ((EnumMemberDeclarationSyntax)node).EqualsValue;
Compilation\MemberSemanticModel.cs (1)
615public override IFieldSymbol GetDeclaredSymbol(EnumMemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
275public override IFieldSymbol GetDeclaredSymbol(EnumMemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (6)
924var enumDecl = (EnumMemberDeclarationSyntax)memberDecl; 1165var enumDecl = (EnumMemberDeclarationSyntax)node.Parent; 1492public override IFieldSymbol GetDeclaredSymbol(EnumMemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1665return ((EnumMemberDeclarationSyntax)declaration).Identifier.ValueText;
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
65node is EnumMemberDeclarationSyntax ||
CSharpExtensions.cs (1)
1400public static IFieldSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, EnumMemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Parser\LanguageParser.cs (4)
5511var members = default(SeparatedSyntaxList<EnumMemberDeclarationSyntax>); 5558LanguageParser @this, ref SyntaxToken openBrace, SeparatedSyntaxListBuilder<EnumMemberDeclarationSyntax> list, SyntaxKind expectedKind, SyntaxKind closeKind) 5567private EnumMemberDeclarationSyntax ParseEnumMemberDeclaration() 5571return (EnumMemberDeclarationSyntax)this.EatNode();
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (2)
152var t = (EnumMemberDeclarationSyntax)node;
Symbols\Source\SourceEnumConstantSymbol.cs (9)
24EnumMemberDeclarationSyntax syntax, 32EnumMemberDeclarationSyntax syntax, 49protected SourceEnumConstantSymbol(SourceMemberContainerTypeSymbol containingEnum, EnumMemberDeclarationSyntax syntax, BindingDiagnosticBag diagnostics) 81public new EnumMemberDeclarationSyntax SyntaxNode 85return (EnumMemberDeclarationSyntax)base.SyntaxNode; 148EnumMemberDeclarationSyntax syntax, 165EnumMemberDeclarationSyntax syntax, 174var syntax = this.SyntaxNode; 188EnumMemberDeclarationSyntax syntax,
Syntax\EnumMemberDeclarationSyntax.cs (1)
9public EnumMemberDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken identifier, EqualsValueClauseSyntax equalsValue)
Syntax\SyntaxFactory.cs (2)
2696public static EnumMemberDeclarationSyntax EnumMemberDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken identifier, EqualsValueClauseSyntax? equalsValue) 2929public static EnumDeclarationSyntax EnumDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken identifier, BaseListSyntax? baseList, SeparatedSyntaxList<EnumMemberDeclarationSyntax> members)
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
778foreach (var member in @enum.Members)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
98var lastMember = enumDecl.Members.LastOrDefault();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
737EnumMemberDeclarationSyntax or 984case EnumMemberDeclarationSyntax @enum:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
347return Cast<TDeclarationNode>(enumDeclaration.AddMembers(members.Cast<EnumMemberDeclarationSyntax>().ToArray()));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (7)
29var member = GenerateEnumMemberDeclaration(enumMember, destination, info, cancellationToken); 50.WithMembers(SeparatedList<EnumMemberDeclarationSyntax>(members)); 53public static EnumMemberDeclarationSyntax GenerateEnumMemberDeclaration( 59var reusableSyntax = GetReuseableSyntaxNodeForSymbol<EnumMemberDeclarationSyntax>(enumMember, info); 66var member = EnumMemberDeclaration(enumMember.Name.ToIdentifierToken()) 115var lastMember = destination.Members.LastOrDefault(m => m.EqualsValue != null);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Structure\MetadataAsSource\EnumMemberDeclarationStructureTests.cs (1)
15public class EnumMemberDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<EnumMemberDeclarationSyntax>
Microsoft.CodeAnalysis.CSharp.Features (12)
CodeLens\CSharpCodeLensMemberFinder.cs (1)
93public override void VisitEnumMemberDeclaration(EnumMemberDeclarationSyntax node)
EditAndContinue\SyntaxComparer.cs (1)
1474return ((EnumMemberDeclarationSyntax)node).Identifier;
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (2)
124var enumMemberDeclaration = await GetFirstDeclarationAsync<EnumMemberDeclarationSyntax>(symbol).ConfigureAwait(false);
NavigationBar\CSharpNavigationBarItemService.cs (1)
248if (declaringNode is EnumMemberDeclarationSyntax enumMember)
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (3)
140foreach (var decl in t.Members) 152var t = (EnumMemberDeclarationSyntax)node;
Structure\CSharpBlockStructureProvider.cs (1)
32builder.Add<EnumMemberDeclarationSyntax, EnumMemberDeclarationStructureProvider>();
Structure\CSharpStructureHelpers.cs (1)
275EnumMemberDeclarationSyntax enumMemberDeclaration => enumMemberDeclaration.Identifier,
Structure\Providers\EnumMemberDeclarationStructureProvider.cs (2)
12internal class EnumMemberDeclarationStructureProvider : AbstractSyntaxNodeStructureProvider<EnumMemberDeclarationSyntax> 16EnumMemberDeclarationSyntax enumMemberDeclaration,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\NullableReferenceTypesTests.cs (2)
73769var node = tree.GetRoot().DescendantNodes().OfType<EnumMemberDeclarationSyntax>().ElementAt(1);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\SemanticModelAPITests.cs (2)
1454var enumMemberDecl = (EnumMemberDeclarationSyntax)typeDecl.Members[0];
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3647var fSymbol = model.GetDeclaredSymbol((EnumMemberDeclarationSyntax)enumMemberDecl);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Generated\Syntax.Test.xml.Generated.cs (6)
10731=> SyntaxFactory.EnumDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.EnumKeyword), SyntaxFactory.Identifier("Identifier"), default(BaseListSyntax), default(SyntaxToken), new SeparatedSyntaxList<EnumMemberDeclarationSyntax>(), default(SyntaxToken), default(SyntaxToken)); 10736private static EnumMemberDeclarationSyntax GenerateEnumMemberDeclaration() 13100var node = GenerateEnumMemberDeclaration(); 13106var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithIdentifier(node.Identifier).WithEqualsValue(node.EqualsValue); 18493var oldNode = GenerateEnumMemberDeclaration(); 18509var oldNode = GenerateEnumMemberDeclaration();
Microsoft.CodeAnalysis.CSharp.Workspaces (23)
Classification\ClassificationHelpers.cs (1)
229else if (token.Parent is EnumMemberDeclarationSyntax enumMemberDeclaration && enumMemberDeclaration.Identifier == token)
CodeGeneration\CSharpSyntaxGenerator.cs (8)
905private EnumMemberDeclarationSyntax AsEnumMember(SyntaxNode node) 911return (EnumMemberDeclarationSyntax)this.EnumMember(id.Identifier.ToString(), null); 918return (EnumMemberDeclarationSyntax)this.EnumMember(vd.Identifier.ToString(), vd.Initializer?.Value); 924return (EnumMemberDeclarationSyntax)node; 927private SeparatedSyntaxList<EnumMemberDeclarationSyntax> AsEnumMembers(IEnumerable<SyntaxNode>? members) 1367EnumDeclarationSyntax @enum => @enum.WithMembers(@enum.Members.AddRange(newMembers.OfType<EnumMemberDeclarationSyntax>())), 1908EnumMemberDeclarationSyntax enumMemberDeclaration => enumMemberDeclaration.Identifier.ValueText, 1938EnumMemberDeclarationSyntax enumMemberDeclaration => ReplaceWithTrivia(declaration, enumMemberDeclaration.Identifier, id),
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
309var enumMember = (EnumMemberDeclarationSyntax)node;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
778foreach (var member in @enum.Members)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
98var lastMember = enumDecl.Members.LastOrDefault();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
737EnumMemberDeclarationSyntax or 984case EnumMemberDeclarationSyntax @enum:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
347return Cast<TDeclarationNode>(enumDeclaration.AddMembers(members.Cast<EnumMemberDeclarationSyntax>().ToArray()));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (7)
29var member = GenerateEnumMemberDeclaration(enumMember, destination, info, cancellationToken); 50.WithMembers(SeparatedList<EnumMemberDeclarationSyntax>(members)); 53public static EnumMemberDeclarationSyntax GenerateEnumMemberDeclaration( 59var reusableSyntax = GetReuseableSyntaxNodeForSymbol<EnumMemberDeclarationSyntax>(enumMember, info); 66var member = EnumMemberDeclaration(enumMember.Name.ToIdentifierToken()) 115var lastMember = destination.Members.LastOrDefault(m => m.EqualsValue != null);
Microsoft.ML.InternalCodeAnalyzer (1)
NameAnalyzer.cs (1)
98=> CheckPascal(((EnumMemberDeclarationSyntax)context.Node).Identifier, context);
Microsoft.VisualStudio.LanguageServices.CSharp (34)
CodeModel\CSharpCodeModelService.CodeModelEventCollector.cs (4)
262else if (oldMember is EnumMemberDeclarationSyntax enumMember) 264return CompareEnumMemberDeclarations(enumMember, (EnumMemberDeclarationSyntax)newMember, newNodeParent, eventQueue); 271EnumMemberDeclarationSyntax oldEnumMember, 272EnumMemberDeclarationSyntax newEnumMember,
CodeModel\CSharpCodeModelService.cs (21)
327else if (parent is EnumMemberDeclarationSyntax enumMember) 417foreach (var member in enumDecl.Members) 839return ((EnumMemberDeclarationSyntax)node).Identifier.ToString(); 910return ((EnumMemberDeclarationSyntax)node).WithIdentifier(newIdentifier); 1108if (node is EnumMemberDeclarationSyntax) 2092if (variableNode is EnumMemberDeclarationSyntax) 2125EnumMemberDeclarationSyntax); 2127if (variableNode is EnumMemberDeclarationSyntax) 2550if (variableNode is EnumMemberDeclarationSyntax) 2568if (variableNode is EnumMemberDeclarationSyntax) 2768private static Document Delete(Document document, EnumMemberDeclarationSyntax node) 2781var lastMember = newEnumDeclaration.Members.Last(); 2886SyntaxKind.EnumMemberDeclaration => Delete(document, (EnumMemberDeclarationSyntax)node), 2908var enumMemberDeclaration = (EnumMemberDeclarationSyntax)node; 2927var enumMemberDeclaration = (EnumMemberDeclarationSyntax)node; 3239var lastMember = enumDeclaration.Members[index - 1]; 3243var newMembers = enumDeclaration.Members.Insert(index, (EnumMemberDeclarationSyntax)member); 3251var newMembers = enumDeclaration.Members.Insert(index, (EnumMemberDeclarationSyntax)member); 3439else if (container is EnumMemberDeclarationSyntax member)
CodeModel\CSharpCodeModelService.NodeLocator.cs (4)
73return GetStartPoint(text, (EnumMemberDeclarationSyntax)node, part); 124return GetEndPoint(text, (EnumMemberDeclarationSyntax)node, part); 719private static VirtualTreePoint GetStartPoint(SourceText text, EnumMemberDeclarationSyntax node, EnvDTE.vsCMPart part) 1217private static VirtualTreePoint GetEndPoint(SourceText text, EnumMemberDeclarationSyntax node, EnvDTE.vsCMPart part)
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (2)
193var enumMemberDeclaration = (EnumMemberDeclarationSyntax)node;
CodeModel\CSharpCodeModelService_Prototype.cs (2)
61case EnumMemberDeclarationSyntax enumMember: 274private string GetVariablePrototype(EnumMemberDeclarationSyntax node, IFieldSymbol symbol, PrototypeFlags flags)
CodeModel\SyntaxNodeExtensions.cs (1)
46else if (node is EnumMemberDeclarationSyntax enumMember)