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
stringThe namespace containing the type.
name
stringThe name of the type.
nullable
boolIndicates whether the type can have the value
null
.
Properties
Bool
public static CSharpIdentifier Bool { get; }
Property Value
Double
public static CSharpIdentifier Double { get; }
Property Value
Float
public static CSharpIdentifier Float { get; }
Property Value
Int
public static CSharpIdentifier Int { get; }
Property Value
Long
public static CSharpIdentifier Long { get; }
Property Value
Name
The name of the type.
public string Name { get; }
Property Value
Namespace
The namespace containing the type.
public string? Namespace { get; }
Property Value
Nullable
Indicates whether the type can have the value null
.
public bool Nullable { get; }
Property Value
Object
public static CSharpIdentifier Object { get; }
Property Value
String
public static CSharpIdentifier String { get; }
Property Value
TypeArguments
Generic type arguments for the type.
public List<CSharpIdentifier> TypeArguments { get; }
Property Value
Uri
public static CSharpIdentifier Uri { get; }
Property Value
Methods
DictionaryOf(CSharpIdentifier, CSharpIdentifier)
public static CSharpIdentifier DictionaryOf(CSharpIdentifier keyType, CSharpIdentifier valueType)
Parameters
keyType
CSharpIdentifiervalueType
CSharpIdentifier
Returns
ListOf(CSharpIdentifier)
public static CSharpIdentifier ListOf(CSharpIdentifier type)
Parameters
type
CSharpIdentifier
Returns
ToInterface()
Returns a copy of the identifier with an I
prepended to the Name.
public CSharpIdentifier ToInterface()
Returns
ToNullable()
Returns a copy of the identifier with Nullable set to true
.
public CSharpIdentifier ToNullable()
Returns
ToString()
Returns the name of the type with potential type arguments.
public override string ToString()