Class CSharpType
- Namespace
- NanoByte.CodeGeneration
- Assembly
- NanoByte.CodeGeneration.dll
Describes a C# type for which code can be generated.
public abstract class CSharpType : ICSharpType
- Inheritance
-
CSharpType
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
CSharpType(CSharpIdentifier)
Describes a C# type for which code can be generated.
protected CSharpType(CSharpIdentifier identifier)
Parameters
identifier
CSharpIdentifierThe fully qualified name of the type.
Properties
Attributes
Attributes to apply to the type.
public List<CSharpAttribute> Attributes { get; }
Property Value
Identifier
The fully qualified name of the type.
public CSharpIdentifier Identifier { get; }
Property Value
Summary
A summary used for an XML documentation comment.
public string? Summary { get; set; }
Property Value
Methods
GetMemberDeclaration()
Returns a Roslyn syntax for the type.
protected abstract MemberDeclarationSyntax GetMemberDeclaration()
Returns
GetNamespaces()
Returns a list of all namespaces referenced/used in this type.
protected virtual ISet<string> GetNamespaces()
Returns
ToString()
Returns the name of the type.
public override string ToString()
Returns
ToSyntax()
Returns a Roslyn syntax for a file containing the type.
public CompilationUnitSyntax ToSyntax()