Table of Contents

Class CSharpAttribute

Namespace
NanoByte.CodeGeneration
Assembly
NanoByte.CodeGeneration.dll

An attribute on a CSharpType, CSharpProperty or CSharpEnumValue.

public class CSharpAttribute
Inheritance
object
CSharpAttribute

Constructors

CSharpAttribute(CSharpIdentifier)

An attribute on a CSharpType, CSharpProperty or CSharpEnumValue.

public CSharpAttribute(CSharpIdentifier identifier)

Parameters

identifier CSharpIdentifier

The type of the attribute.

Properties

Arguments

Arguments for the attribute.

public List<object> Arguments { get; }

Property Value

List<object>

Remarks

Can be a literal (string, bool, int, long, float or double) or a CSharpIdentifier (emitted as typeof(...)).

Identifier

The type of the attribute.

public CSharpIdentifier Identifier { get; }

Property Value

CSharpIdentifier

NamedArguments

Named arguments for the attribute.

public List<(string name, object value)> NamedArguments { get; }

Property Value

List<(string name, object value)>

Remarks

Values can be anything Arguments accepts.