Class CSharpIdentifier
The fully qualified name of a type.
Inheritance
CSharpIdentifier
Assembly: NanoByte.CodeGeneration.dll
Syntax
public class CSharpIdentifier : Object
Constructors
CSharpIdentifier(String, String, Boolean)
Creates a new identifier.
Declaration
public CSharpIdentifier(string ns, string name, bool nullable = false)
Parameters
Type |
Name |
Description |
String |
ns |
The namespace containing the type.
|
String |
name |
The name of the type.
|
Boolean |
nullable |
Indicates whether the type can have the value null .
|
Properties
Bool
Declaration
public static CSharpIdentifier Bool { get; }
Property Value
Double
Declaration
public static CSharpIdentifier Double { get; }
Property Value
Float
Declaration
public static CSharpIdentifier Float { get; }
Property Value
Int
Declaration
public static CSharpIdentifier Int { get; }
Property Value
Long
Declaration
public static CSharpIdentifier Long { get; }
Property Value
Name
Declaration
public string Name { get; }
Property Value
Namespace
The namespace containing the type.
Declaration
public string Namespace { get; }
Property Value
Nullable
Indicates whether the type can have the value null
.
Declaration
public bool Nullable { get; }
Property Value
Object
Declaration
public static CSharpIdentifier Object { get; }
Property Value
String
Declaration
public static CSharpIdentifier String { get; }
Property Value
TypeArguments
Generic type arguments for the type.
Declaration
public List<CSharpIdentifier> TypeArguments { get; }
Property Value
Uri
Declaration
public static CSharpIdentifier Uri { get; }
Property Value
Methods
DictionaryOf(CSharpIdentifier, CSharpIdentifier)
Declaration
public static CSharpIdentifier DictionaryOf(CSharpIdentifier keyType, CSharpIdentifier valueType)
Parameters
Returns
ListOf(CSharpIdentifier)
Declaration
public static CSharpIdentifier ListOf(CSharpIdentifier type)
Parameters
Returns
ToInterface()
Returns a copy of the identifier with an I
prepended to the Name.
Declaration
public CSharpIdentifier ToInterface()
Returns
ToNullable()
Returns a copy of the identifier with Nullable set to true
.
Declaration
public CSharpIdentifier ToNullable()
Returns
ToString()
Returns the name of the type with potential type arguments.
Declaration
public override string ToString()
Returns