NanoByte Code Generation  0.3.1
Wrapper around Roslyn API to simplify generating C# code
NanoByte.CodeGeneration.CSharpType Class Referenceabstract

Describes a C# type for which code can be generated. More...

Inheritance diagram for NanoByte.CodeGeneration.CSharpType:
NanoByte.CodeGeneration.ICSharpType NanoByte.CodeGeneration.CSharpEnum NanoByte.CodeGeneration.CSharpInterface NanoByte.CodeGeneration.CSharpClass

Public Member Functions

CompilationUnitSyntax ToSyntax ()
 Returns a Roslyn syntax for a file containing the type.
 
override string ToString ()
 Returns the name of the type. More...
 

Protected Member Functions

 CSharpType (CSharpIdentifier identifier)
 Creates a new C# type. More...
 
virtual ISet< string > GetNamespaces ()
 Returns a list of all namespaces referenced/used in this type. More...
 
abstract MemberDeclarationSyntax GetMemberDeclaration ()
 Returns a Roslyn syntax for the type. More...
 

Properties

CSharpIdentifier Identifier [get]
 
string? Summary [get, set]
 
List< CSharpAttributeAttributes = new List<CSharpAttribute>() [get]
 
- Properties inherited from NanoByte.CodeGeneration.ICSharpType
CSharpIdentifier Identifier [get]
 The fully qualified name of the type. More...
 
string? Summary [get, set]
 A summary used for an XML documentation comment. More...
 
List< CSharpAttributeAttributes [get]
 Attributes to apply to the type. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ CSharpType()

NanoByte.CodeGeneration.CSharpType.CSharpType ( CSharpIdentifier  identifier)
inlineprotected

Creates a new C# type.

Parameters
identifierThe fully qualified name of the type.

Member Function Documentation

◆ GetMemberDeclaration()

abstract MemberDeclarationSyntax NanoByte.CodeGeneration.CSharpType.GetMemberDeclaration ( )
protectedpure virtual

Returns a Roslyn syntax for the type.

Implemented in NanoByte.CodeGeneration.CSharpInterface, and NanoByte.CodeGeneration.CSharpEnum.

◆ GetNamespaces()

virtual ISet<string> NanoByte.CodeGeneration.CSharpType.GetNamespaces ( )
inlineprotectedvirtual

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

Reimplemented in NanoByte.CodeGeneration.CSharpInterface, NanoByte.CodeGeneration.CSharpEnum, and NanoByte.CodeGeneration.CSharpClass.

◆ ToString()

override string NanoByte.CodeGeneration.CSharpType.ToString ( )

Returns the name of the type.


The documentation for this class was generated from the following file: