Table of Contents

Class CSharpClass

Namespace
NanoByte.CodeGeneration
Assembly
NanoByte.CodeGeneration.dll

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

public class CSharpClass : CSharpInterface, ICSharpType
Inheritance
CSharpClass
Implements
Inherited Members
Extension Methods

Constructors

CSharpClass(CSharpIdentifier)

Creates a new C# class.

public CSharpClass(CSharpIdentifier identifier)

Parameters

identifier CSharpIdentifier

The fully qualified name of the class.

Properties

BaseClass

The base class of this class; null if none.

public CSharpConstructor? BaseClass { get; set; }

Property Value

CSharpConstructor

Methods

GetBaseTypes()

Returns a list of Roslyn syntax for references to base types of this type.

protected override IEnumerable<BaseTypeSyntax> GetBaseTypes()

Returns

IEnumerable<BaseTypeSyntax>

GetConstruction()

Returns a constructor for instantiating this class.

public CSharpConstructor GetConstruction()

Returns

CSharpConstructor

GetMemberDeclarations()

Returns a list of Roslyn syntax for members of this type.

protected override IEnumerable<MemberDeclarationSyntax> GetMemberDeclarations()

Returns

IEnumerable<MemberDeclarationSyntax>

GetNamespaces()

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

protected override ISet<string> GetNamespaces()

Returns

ISet<string>

GetTypeDeclaration()

Returns a Roslyn syntax for the type.

protected override TypeDeclarationSyntax GetTypeDeclaration()

Returns

TypeDeclarationSyntax