NanoByte Code Generation
0.3.1
Wrapper around Roslyn API to simplify generating C# code
|
The fully qualified name of a type. More...
Public Member Functions | |
CSharpIdentifier (string? ns, string name, bool nullable=false) | |
Creates a new identifier. More... | |
CSharpIdentifier | ToNullable () |
Returns a copy of the identifier with Nullable set to true . More... | |
CSharpIdentifier | ToInterface () |
Returns a copy of the identifier with an I prepended to the Name. More... | |
override string | ToString () |
Returns the name of the type with potential type arguments. More... | |
Static Public Member Functions | |
static CSharpIdentifier | ListOf (CSharpIdentifier type) |
static CSharpIdentifier | DictionaryOf (CSharpIdentifier keyType, CSharpIdentifier valueType) |
Package Functions | |
IEnumerable< string > | GetNamespaces () |
Returns a list of all namespaces referenced/used in this identifier. More... | |
TypeSyntax | ToSyntax () |
Returns a Roslyn syntax for the type identifier. More... | |
Properties | |
string? | Namespace [get] |
The namespace containing the type. More... | |
string | Name [get] |
The name of the type. More... | |
bool | Nullable [get] |
Indicates whether the type can have the value null . More... | |
List< CSharpIdentifier > | TypeArguments = new List<CSharpIdentifier>() [get] |
Generic type arguments for the type. More... | |
static CSharpIdentifier | Bool [get] |
static CSharpIdentifier | Int [get] |
static CSharpIdentifier | Long [get] |
static CSharpIdentifier | Float [get] |
static CSharpIdentifier | Double [get] |
static CSharpIdentifier | String [get] |
static CSharpIdentifier | Object [get] |
static CSharpIdentifier | Uri [get] |
The fully qualified name of a type.
|
inline |
Creates a new identifier.
ns | The namespace containing the type. |
name | The name of the type. |
nullable | Indicates whether the type can have the value null . |
|
inlinepackage |
Returns a list of all namespaces referenced/used in this identifier.
|
inline |
Returns a copy of the identifier with an I
prepended to the Name.
CSharpIdentifier NanoByte.CodeGeneration.CSharpIdentifier.ToNullable | ( | ) |
Returns a copy of the identifier with Nullable set to true
.
override string NanoByte.CodeGeneration.CSharpIdentifier.ToString | ( | ) |
Returns the name of the type with potential type arguments.
|
inlinepackage |
Returns a Roslyn syntax for the type identifier.
|
get |
The name of the type.
|
get |
The namespace containing the type.
|
get |
Indicates whether the type can have the value null
.
|
get |
Generic type arguments for the type.