Table of Contents

Class CSharpMethod

Namespace
NanoByte.CodeGeneration
Assembly
NanoByte.CodeGeneration.dll

A method on a CSharpInterface or CSharpClass.

public class CSharpMethod
Inheritance
object
CSharpMethod

Constructors

CSharpMethod(CSharpIdentifier, string)

A method on a CSharpInterface or CSharpClass.

public CSharpMethod(CSharpIdentifier returnType, string name)

Parameters

returnType CSharpIdentifier

The type returned by the method.

name string

The name of the method.

Properties

BodyExpression

An expression body for the method as a raw C# expression (e.g. CreateAsync(entity)).

public string? BodyExpression { get; set; }

Property Value

string

ExplicitInterface

The interface to explicitly implement this method for; null for a regular member.

public CSharpIdentifier? ExplicitInterface { get; set; }

Property Value

CSharpIdentifier

Name

The name of the method.

public string Name { get; }

Property Value

string

Parameters

The parameters the method takes.

public List<CSharpParameter> Parameters { get; }

Property Value

List<CSharpParameter>

ReturnType

The type returned by the method.

public CSharpIdentifier ReturnType { get; }

Property Value

CSharpIdentifier

Summary

A summary used for an XML documentation comment.

public string? Summary { get; set; }

Property Value

string

Methods

ToString()

Returns the signature of the method.

public override string ToString()

Returns

string