Class CSharpClass
- Namespace
- NanoByte.CodeGeneration
- Assembly
- NanoByte.CodeGeneration.dll
Describes a C# class for which code can be generated.
public class CSharpClass : CSharpInterface, ICSharpType
- Inheritance
-
objectCSharpClass
- Implements
- Inherited Members
- Extension Methods
Constructors
CSharpClass(CSharpIdentifier)
Describes a C# class for which code can be generated.
public CSharpClass(CSharpIdentifier identifier)
Parameters
identifierCSharpIdentifierThe fully qualified name of the class.
Properties
BaseConstructor
The base constructor invocation for this class; null if there is no base class.
public CSharpObjectCreation? BaseConstructor { get; set; }
Property Value
Methods
GetBaseTypes()
Returns a list of Roslyn syntax for references to base types of this type.
protected override IEnumerable<BaseTypeSyntax> GetBaseTypes()
Returns
GetMemberDeclarations()
Returns a list of Roslyn syntax for members of this type.
protected override IEnumerable<MemberDeclarationSyntax> GetMemberDeclarations()
Returns
GetNamespaces()
Returns a list of all namespaces referenced/used in this type.
protected override ISet<string> GetNamespaces()
Returns
GetTypeDeclaration()
Returns a Roslyn syntax for the type.
protected override TypeDeclarationSyntax GetTypeDeclaration()
Returns
ToObjectCreation()
Returns an object creation expression for instantiating this class.
public CSharpObjectCreation ToObjectCreation()