Anvil
|
A local variable generic structure. More...
Public Member Functions | |
override void | Delete () |
Deletes the value of this variable. More... | |
Public Member Functions inherited from Anvil.API.ObjectVariable< T > | |
override bool | Equals (object? obj) |
bool | Equals (ObjectVariable< T >? other) |
override int | GetHashCode () |
Properties | |
override? T? | Value [get, set] |
Properties inherited from Anvil.API.LocalVariable< T > | |
override bool | HasValue [get] |
Properties inherited from Anvil.API.ObjectVariable< T > | |
bool | HasNothing [get] |
Gets a value indicating whether this variable has no value. More... | |
abstract bool | HasValue [get] |
Gets a value indicating whether this variable has a value. More... | |
string | Name = null! [get] |
NwObject | Object = null! [get] |
abstract ? T | Value [get, set] |
Gets or sets the current value of this variable. Returns the default value of T if unassigned (null or 0). More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Anvil.API.ObjectVariable< T > | |
static implicit | operator T? (ObjectVariable< T > value) |
Implicit conversion of the value of this variable. More... | |
static bool | operator!= (ObjectVariable< T > left, ObjectVariable< T > right) |
static bool | operator== (ObjectVariable< T > left, ObjectVariable< T > right) |
A local variable generic structure.
This local variable type uses a JSON local variable to serialize/deserialize any C# type compatible with System.Text.Json.JsonSerializer.
It is not very fast due to interop parsing. Although it's a very flexible API, do take caution in using it.
T | The class type to serialize/deserialize. |
|
inlinevirtual |
Deletes the value of this variable.
Implements Anvil.API.ObjectVariable< T >.