1 override of EnumDeclaration
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
878
public override SyntaxNode
EnumDeclaration
(
33 references to EnumDeclaration
Microsoft.CodeAnalysis.CSharp.Features (1)
Snippets\CSharpEnumSnippetProvider.cs (1)
48
return (EnumDeclarationSyntax)generator.
EnumDeclaration
(name);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (14)
CodeGeneration\SyntaxGeneratorTests.cs (14)
1680
Generator.
EnumDeclaration
("e"),
2753
AssertMemberNamesEqual("v", Generator.AddMembers(Generator.
EnumDeclaration
("e"), [Generator.EnumMember("v")]));
2877
Assert.Equal(DeclarationKind.Enum, Generator.GetDeclarationKind(Generator.
EnumDeclaration
("e")));
2899
Assert.Equal("i", Generator.GetName(Generator.
EnumDeclaration
("i")));
2900
Assert.Equal("e", Generator.GetName(Generator.
EnumDeclaration
("e")));
2922
Assert.Equal("i", Generator.GetName(Generator.WithName(Generator.
EnumDeclaration
("x"), "i")));
2923
Assert.Equal("e", Generator.GetName(Generator.WithName(Generator.
EnumDeclaration
("x"), "e")));
2945
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.
EnumDeclaration
("i", accessibility: Accessibility.Internal)));
2946
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.
EnumDeclaration
("e", accessibility: Accessibility.Internal)));
2969
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
EnumDeclaration
("i", accessibility: Accessibility.Internal), Accessibility.Private)));
2970
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
EnumDeclaration
("e", accessibility: Accessibility.Internal), Accessibility.Private)));
2994
Assert.Equal(DeclarationModifiers.New, Generator.GetModifiers(Generator.
EnumDeclaration
("e", modifiers: DeclarationModifiers.New)));
3017
Assert.Equal(DeclarationModifiers.New, Generator.GetModifiers(Generator.WithModifiers(Generator.
EnumDeclaration
("e"), DeclarationModifiers.New)));
3058
Generator.GetModifiers(Generator.WithModifiers(Generator.
EnumDeclaration
("e"), allModifiers)));
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (18)
CodeGeneration\SyntaxGeneratorTests.vb (18)
1599
Generator.
EnumDeclaration
("e"),
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))}),
2569
Assert.Equal(DeclarationKind.Enum, Generator.GetDeclarationKind(Generator.
EnumDeclaration
("e")))
2593
Assert.Equal("i", Generator.GetName(Generator.
EnumDeclaration
("i")))
2594
Assert.Equal("e", Generator.GetName(Generator.
EnumDeclaration
("e")))
2618
Assert.Equal("i", Generator.GetName(Generator.WithName(Generator.
EnumDeclaration
("x"), "i")))
2619
Assert.Equal("e", Generator.GetName(Generator.WithName(Generator.
EnumDeclaration
("x"), "e")))
2644
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.
EnumDeclaration
("e", accessibility:=Accessibility.Internal)))
2671
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
EnumDeclaration
("i", accessibility:=Accessibility.Internal), Accessibility.Private)))
2672
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
EnumDeclaration
("e", accessibility:=Accessibility.Internal), Accessibility.Private)))
2699
Assert.Equal(DeclarationModifiers.[New], Generator.GetModifiers(Generator.
EnumDeclaration
("e", modifiers:=DeclarationModifiers.[New])))
2721
Assert.Equal(DeclarationModifiers.[New], Generator.GetModifiers(Generator.WithModifiers(Generator.
EnumDeclaration
("e"), DeclarationModifiers.[New])))
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")}))