cohtml.Net.Value
Type for representing generic JavaScript values
Public Functions
Name | |
---|---|
Value() Create a null value | |
Value(bool value) Create a boolean value | |
Value(int value) Create an integer value | |
Value(uint value) Create an unsigned integer value | |
Value(float value) Create a float value | |
Value(double value) Create a double value | |
Value(string value) Create a string value | |
Value(Value [] value) Create an array value | |
Value(Dictionary< string, Value > value) Create an object value | |
Value(ValueObject value) Create an object value | |
override bool | Equals(object obj) Compare to another object |
override int | GetHashCode() Hash code for Value |
implicit | operator bool(Value value) cast a value to a boolean |
implicit | operator int(Value value) cast a value to an int |
implicit | operator uint(Value value) cast a value to an uint |
implicit | operator float(Value value) cast a value to a float |
implicit | operator double(Value value) cast a value to a double |
implicit | operator string(Value value) cast a value to a string |
implicit | operator Value[](Value value) cast a value to an array |
implicit | operator Dictionary< string, Value >(Value value) cast a value to a dictionary of properties |
bool | operator==(Value lhs, Value rhs) Compares two Value objects |
bool | operator!=(Value lhs, Value rhs) Compares two Value objects |
Public Attributes
Name | |
---|---|
ValueType | Type The type of the data stored in this Value instance |
Public Functions Documentation
function Value
Value()
Create a null value
function Value
Value(
bool value
)
Create a boolean value
Parameters:
- value the integer value of the Value object
function Value
Value(
int value
)
Create an integer value
Parameters:
- value the integer value of the Value object
function Value
Value(
uint value
)
Create an unsigned integer value
Parameters:
- value the unsigned integer value of the Value object
function Value
Value(
float value
)
Create a float value
Parameters:
- value the float value of the Value object
function Value
Value(
double value
)
Create a double value
Parameters:
- value the double value of the Value object
function Value
Value(
string value
)
Create a string value
Parameters:
- value the string value of the Value object
function Value
Value(
Value [] value
)
Create an array value
Parameters:
- value the array value of the Value object
function Value
Value(
Dictionary< string, Value > value
)
Create an object value
Parameters:
- value dictionary of properties of the Value object
function Value
Value(
ValueObject value
)
Create an object value
Parameters:
- value dictionary of properties of the Value object
function Equals
override bool Equals(
object obj
)
Compare to another object
Parameters:
- obj
Return: true if obj is a Value instance equal to this one
function GetHashCode
override int GetHashCode()
Hash code for Value
Return: hash code for the current instance
function operator bool
static implicit operator bool(
Value value
)
cast a value to a boolean
Parameters:
- value value to be casted
Return: the boolean stored in the value
function operator int
static implicit operator int(
Value value
)
cast a value to an int
Parameters:
- value value to be casted
Return: the int stored in the value
function operator uint
static implicit operator uint(
Value value
)
cast a value to an uint
Parameters:
- value value to be casted
Return: the unsigned int stored in the value
function operator float
static implicit operator float(
Value value
)
cast a value to a float
Parameters:
- value value to be casted
Return: the float stored in the value
function operator double
static implicit operator double(
Value value
)
cast a value to a double
Parameters:
- value value to be casted
Return: the double stored in the value
function operator string
static implicit operator string(
Value value
)
cast a value to a string
Parameters:
- value value to be casted
Return: the string stored in the value
function operator Value[]
static implicit operator Value[](
Value value
)
cast a value to an array
Parameters:
- value value to be casted
Return: the array of Value objects stored in the value
function operator Dictionary< string, Value >
static implicit operator Dictionary< string, Value >(
Value value
)
cast a value to a dictionary of properties
Parameters:
- value value to be casted
Return: the dictionary of properties of the value
function operator==
static bool operator==(
Value lhs,
Value rhs
)
Compares two Value objects
Parameters:
- lhs object to be compared
- rhs object to be compared
Return: true if the objects are from the same type and have the same values
function operator!=
static bool operator!=(
Value lhs,
Value rhs
)
Compares two Value objects
Parameters:
- lhs object to be compared
- rhs object to be compared
Return: false if the objects are from the same type and have the same values
Public Attributes Documentation
variable Type
ValueType Type;
The type of the data stored in this Value instance