Table of Contents

Class CSharpEnum

Namespace
NanoByte.CodeGeneration
Assembly
NanoByte.CodeGeneration.dll

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

public class CSharpEnum : CSharpType, ICSharpType
Inheritance
CSharpEnum
Implements
Inherited Members
Extension Methods

Constructors

CSharpEnum(CSharpIdentifier)

Creates a new C# enum.

public CSharpEnum(CSharpIdentifier identifier)

Parameters

identifier CSharpIdentifier

The fully qualified name of the enum.

Properties

Values

A list of possible values for the enum.

public List<CSharpEnumValue> Values { get; }

Property Value

List<CSharpEnumValue>

Methods

GetMemberDeclaration()

Returns a Roslyn syntax for the type.

protected override MemberDeclarationSyntax GetMemberDeclaration()

Returns

MemberDeclarationSyntax

GetNamespaces()

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

protected override ISet<string> GetNamespaces()

Returns

ISet<string>