Class CSharpMethod
- Namespace
- NanoByte.CodeGeneration
- Assembly
- NanoByte.CodeGeneration.dll
A method on a CSharpInterface or CSharpClass.
public class CSharpMethod
- Inheritance
-
objectCSharpMethod
Constructors
CSharpMethod(CSharpIdentifier, string)
A method on a CSharpInterface or CSharpClass.
public CSharpMethod(CSharpIdentifier returnType, string name)
Parameters
returnTypeCSharpIdentifierThe type returned by the method.
namestringThe 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
ExplicitInterface
The interface to explicitly implement this method for; null for a regular member.
public CSharpIdentifier? ExplicitInterface { get; set; }
Property Value
Name
The name of the method.
public string Name { get; }
Property Value
Parameters
The parameters the method takes.
public List<CSharpParameter> Parameters { get; }
Property Value
ReturnType
The type returned by the method.
public CSharpIdentifier ReturnType { get; }
Property Value
Summary
A summary used for an XML documentation comment.
public string? Summary { get; set; }
Property Value
Methods
ToString()
Returns the signature of the method.
public override string ToString()