2 overrides of EnumMember
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
897
public override SyntaxNode
EnumMember
(string name, SyntaxNode? expression)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
1377
Public Overrides Function
EnumMember
(name As String, Optional expression As SyntaxNode = Nothing) As SyntaxNode
39 references to EnumMember
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (20)
CodeGeneration\SyntaxGeneratorTests.cs (20)
1684
Generator.EnumDeclaration("e", members: [Generator.
EnumMember
("a"), Generator.
EnumMember
("b"), Generator.
EnumMember
("c")]),
1688
Generator.EnumDeclaration("e", members: [Generator.IdentifierName("a"), Generator.
EnumMember
("b"), Generator.IdentifierName("c")]),
1692
Generator.EnumDeclaration("e", members: [Generator.
EnumMember
("a", Generator.LiteralExpression(0)), Generator.
EnumMember
("b"), Generator.
EnumMember
("c", Generator.LiteralExpression(5))]),
2753
AssertMemberNamesEqual("v", Generator.AddMembers(Generator.EnumDeclaration("e"), [Generator.
EnumMember
("v")]));
2760
AssertMemberNamesEqual(new[] { "v", "v2" }, Generator.AddMembers(Generator.EnumDeclaration("i", members: [Generator.
EnumMember
("v")]), [Generator.
EnumMember
("v2")]));
2842
TestRemoveAllMembers(Generator.EnumDeclaration("i", members: [Generator.
EnumMember
("v")]));
2865
AssertMemberNamesEqual("v", Generator.EnumDeclaration("e", members: [Generator.
EnumMember
("v")]));
2885
Assert.Equal(DeclarationKind.EnumMember, Generator.GetDeclarationKind(Generator.
EnumMember
("v")));
2908
Assert.Equal("v", Generator.GetName(Generator.
EnumMember
("v")));
2931
Assert.Equal("v", Generator.GetName(Generator.WithName(Generator.
EnumMember
("x"), "v")));
2954
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.
EnumMember
("v")));
2978
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
EnumMember
("v"), Accessibility.Private)));
3004
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.
EnumMember
("v")));
3027
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.
EnumMember
("v"), DeclarationModifiers.Partial)));
4078
Generator.InsertMembers(declC, 0, Generator.
EnumMember
("A")),
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (19)
CodeGeneration\SyntaxGeneratorTests.vb (19)
1604
Generator.EnumDeclaration("e", members:={Generator.
EnumMember
("a"), Generator.
EnumMember
("b"), Generator.
EnumMember
("c")}),
1612
Generator.EnumDeclaration("e", members:={Generator.IdentifierName("a"), Generator.
EnumMember
("b"), Generator.IdentifierName("c")}),
1620
Generator.EnumDeclaration("e", members:={Generator.
EnumMember
("a", Generator.LiteralExpression(0)), Generator.
EnumMember
("b"), Generator.
EnumMember
("c", Generator.LiteralExpression(5))}),
2580
Assert.Equal(DeclarationKind.EnumMember, Generator.GetDeclarationKind(Generator.
EnumMember
("v")))
2605
Assert.Equal("v", Generator.GetName(Generator.
EnumMember
("v")))
2630
Assert.Equal("v", Generator.GetName(Generator.WithName(Generator.
EnumMember
("x"), "v")))
2652
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.
EnumMember
("v")))
2680
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
EnumMember
("v"), Accessibility.Private)))
2709
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.
EnumMember
("v")))
2731
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.
EnumMember
("v"), DeclarationModifiers.Partial)))
3161
AssertMemberNamesEqual("v", Generator.EnumDeclaration("e", members:={Generator.
EnumMember
("v")}))
3171
AssertMemberNamesEqual("v", Generator.AddMembers(Generator.EnumDeclaration("e"), {Generator.
EnumMember
("v")}))
3178
AssertMemberNamesEqual({"v", "v2"}, Generator.AddMembers(Generator.EnumDeclaration("i", members:={Generator.
EnumMember
("v")}), {Generator.
EnumMember
("v2")}))
3188
TestRemoveAllMembers(Generator.EnumDeclaration("i", members:={Generator.
EnumMember
("v")}))