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

A constructor for a CSharpClass. More...

Public Member Functions

 CSharpConstructor (CSharpIdentifier type)
 Creates a new constructor. More...
 
override string ToString ()
 Returns the name of the class that the constructor instantiates. More...
 

Package Functions

IEnumerable< string > GetNamespaces ()
 Returns a list of all namespaces referenced/used in this constructor. More...
 
ObjectCreationExpressionSyntax ToInvocationSyntax ()
 Returns a Roslyn syntax for invoking the constructor (new). More...
 
ConstructorDeclarationSyntax ToDeclarationSyntax (string typeName)
 Returns a Roslyn syntax for declaring the constructor. More...
 

Properties

CSharpIdentifier Type [get]
 The fully qualified name of the class that the constructor instantiates. More...
 
List< CSharpParameterParameters = new List<CSharpParameter>() [get]
 The parameters for the constructor. More...
 

Detailed Description

A constructor for a CSharpClass.

Constructor & Destructor Documentation

◆ CSharpConstructor()

NanoByte.CodeGeneration.CSharpConstructor.CSharpConstructor ( CSharpIdentifier  type)
inline

Creates a new constructor.

Parameters
typeThe fully qualified name of the class that the constructor instantiates.

Member Function Documentation

◆ GetNamespaces()

IEnumerable<string> NanoByte.CodeGeneration.CSharpConstructor.GetNamespaces ( )
inlinepackage

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

◆ ToDeclarationSyntax()

ConstructorDeclarationSyntax NanoByte.CodeGeneration.CSharpConstructor.ToDeclarationSyntax ( string  typeName)
package

Returns a Roslyn syntax for declaring the constructor.

◆ ToInvocationSyntax()

ObjectCreationExpressionSyntax NanoByte.CodeGeneration.CSharpConstructor.ToInvocationSyntax ( )
package

Returns a Roslyn syntax for invoking the constructor (new).

◆ ToString()

override string NanoByte.CodeGeneration.CSharpConstructor.ToString ( )

Returns the name of the class that the constructor instantiates.

Property Documentation

◆ Parameters

List<CSharpParameter> NanoByte.CodeGeneration.CSharpConstructor.Parameters = new List<CSharpParameter>()
get

The parameters for the constructor.

◆ Type

CSharpIdentifier NanoByte.CodeGeneration.CSharpConstructor.Type
get

The fully qualified name of the class that the constructor instantiates.


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