Class CSharpEnum
Describes a C# enum for which code can be generated.
Implements
Inherited Members
Namespace: NanoByte.CodeGeneration
Assembly: NanoByte.CodeGeneration.dll
Syntax
public class CSharpEnum : CSharpType, ICSharpType
Constructors
CSharpEnum(CSharpIdentifier)
Creates a new C# enum.
Declaration
public CSharpEnum(CSharpIdentifier identifier)
Parameters
Type | Name | Description |
---|---|---|
CSharpIdentifier | identifier | The fully qualified name of the enum. |
Properties
Values
A list of possible values for the enum.
Declaration
public List<CSharpEnumValue> Values { get; }
Property Value
Type | Description |
---|---|
List<CSharpEnumValue> |
Methods
GetMemberDeclaration()
Returns a Roslyn syntax for the type.
Declaration
protected override MemberDeclarationSyntax GetMemberDeclaration()
Returns
Type | Description |
---|---|
MemberDeclarationSyntax |
Overrides
GetNamespaces()
Returns a list of all namespaces referenced/used in this type.
Declaration
protected override ISet<string> GetNamespaces()
Returns
Type | Description |
---|---|
ISet<String> |