Show / Hide Table of Contents

Class CSharpEnum

Describes a C# enum for which code can be generated.

Inheritance
Object
CSharpType
CSharpEnum
Implements
ICSharpType
Inherited Members
CSharpType.ToSyntax()
CSharpType.ToString()
CSharpType.Identifier
CSharpType.Summary
CSharpType.Attributes
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
CSharpType.GetMemberDeclaration()

GetNamespaces()

Returns a list of all namespaces referenced/used in this type.

Declaration
protected override ISet<string> GetNamespaces()
Returns
Type Description
ISet<String>
Overrides
CSharpType.GetNamespaces()

Implements

ICSharpType
In This Article
Back to top Copyright Bastian Eicher