Table of Contents

Class CSharpProperty

Namespace
NanoByte.CodeGeneration
Assembly
NanoByte.CodeGeneration.dll

A property on a CSharpInterface or CSharpClass.

public class CSharpProperty
Inheritance
CSharpProperty
Inherited Members

Constructors

CSharpProperty(CSharpIdentifier, string)

Creates a new property.

public CSharpProperty(CSharpIdentifier type, string name)

Parameters

type CSharpIdentifier

The type of the property.

name string

The name of the property.

Properties

Attributes

Attributes to apply to the property.

public List<CSharpAttribute> Attributes { get; }

Property Value

List<CSharpAttribute>

GetterExpression

An expression body for the property's getter.

public CSharpConstructor? GetterExpression { get; set; }

Property Value

CSharpConstructor

HasSetter

Indicates whether the property has a setter.

public bool HasSetter { get; set; }

Property Value

bool

Initializer

The property's initializer (sets default value).

public CSharpConstructor? Initializer { get; set; }

Property Value

CSharpConstructor

Name

The name of the property.

public string Name { get; }

Property Value

string

Summary

A summary used for an XML documentation comment.

public string? Summary { get; set; }

Property Value

string

Type

The type of the property.

public CSharpIdentifier Type { get; }

Property Value

CSharpIdentifier

Methods

ToString()

Returns the name of the property.

public override string ToString()

Returns

string