Table of Contents

Class CSharpIdentifier

Namespace
NanoByte.CodeGeneration
Assembly
NanoByte.CodeGeneration.dll

The fully qualified name of a type.

public class CSharpIdentifier
Inheritance
CSharpIdentifier
Inherited Members

Constructors

CSharpIdentifier(string?, string, bool)

Creates a new identifier.

public CSharpIdentifier(string? ns, string name, bool nullable = false)

Parameters

ns string

The namespace containing the type.

name string

The name of the type.

nullable bool

Indicates whether the type can have the value null.

Properties

Bool

public static CSharpIdentifier Bool { get; }

Property Value

CSharpIdentifier

Double

public static CSharpIdentifier Double { get; }

Property Value

CSharpIdentifier

Float

public static CSharpIdentifier Float { get; }

Property Value

CSharpIdentifier

Int

public static CSharpIdentifier Int { get; }

Property Value

CSharpIdentifier

Long

public static CSharpIdentifier Long { get; }

Property Value

CSharpIdentifier

Name

The name of the type.

public string Name { get; }

Property Value

string

Namespace

The namespace containing the type.

public string? Namespace { get; }

Property Value

string

Nullable

Indicates whether the type can have the value null.

public bool Nullable { get; }

Property Value

bool

Object

public static CSharpIdentifier Object { get; }

Property Value

CSharpIdentifier

String

public static CSharpIdentifier String { get; }

Property Value

CSharpIdentifier

TypeArguments

Generic type arguments for the type.

public List<CSharpIdentifier> TypeArguments { get; }

Property Value

List<CSharpIdentifier>

Uri

public static CSharpIdentifier Uri { get; }

Property Value

CSharpIdentifier

Methods

DictionaryOf(CSharpIdentifier, CSharpIdentifier)

public static CSharpIdentifier DictionaryOf(CSharpIdentifier keyType, CSharpIdentifier valueType)

Parameters

keyType CSharpIdentifier
valueType CSharpIdentifier

Returns

CSharpIdentifier

ListOf(CSharpIdentifier)

public static CSharpIdentifier ListOf(CSharpIdentifier type)

Parameters

type CSharpIdentifier

Returns

CSharpIdentifier

ToInterface()

Returns a copy of the identifier with an I prepended to the Name.

public CSharpIdentifier ToInterface()

Returns

CSharpIdentifier

ToNullable()

Returns a copy of the identifier with Nullable set to true.

public CSharpIdentifier ToNullable()

Returns

CSharpIdentifier

ToString()

Returns the name of the type with potential type arguments.

public override string ToString()

Returns

string