Enables easy manipulation of simple hierarchical sets of values. Targets specifically the use of XML for storing
application settings.
void | | Adds an RVariant to this variant, assuming/making it a List. |
void | |
Makes this RVariant a stub, with no values associated. This is the only legal way to revert the RVariant.Kind
from non-Stub to Stub. |
object | | Creates a deep copy of this RVariant. |
bool | | Not currently implemented. |
void | CopyTo(RVariant[] array, int arrayIndex) |
bool | |
Compares this RVariant to another object. If the other object is a RVariant then performs a deep comparison of the
two. Otherwise compares the Value stored in this RVariant with the specified object. |
bool | |
Performs a deep comparison of this RVariant to another. The result is true only if the structure and every stored
value is identical. Note that Paths are not taken into account so it is possible to compare two sub-values of
different trees. |
IEnumerator<RVariant> | | Iterates over the items in this variant, assuming/making it a List. |
int | |
Returns a hash code for this RVariant. Creates a deep recursive hash for Lists but not for Dicts. May be fairly
slow - it's probably a bad idea to use RVariant as a dictionary key... |
string | | Loads an XML file into this RVariant, deleting all existing values and adding new ones as appropriate. |
bool | |
Treating this node as a Value, returns the value converted to a bool or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
byte | |
Treating this node as a Value, returns the value converted to a byte or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
sbyte | |
Treating this node as a Value, returns the value converted to an sbyte or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
short | |
Treating this node as a Value, returns the value converted to a short or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
ushort | |
Treating this node as a Value, returns the value converted to a ushort or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
int | |
Treating this node as a Value, returns the value converted to an int or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
uint | |
Treating this node as a Value, returns the value converted to a uint or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
long | |
Treating this node as a Value, returns the value converted to a long or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
ulong | |
Treating this node as a Value, returns the value converted to a ulong or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
float | |
Treating this node as a Value, returns the value converted to a float or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
double | |
Treating this node as a Value, returns the value converted to a double or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
decimal | |
Treating this node as a Value, returns the value converted to a decimal or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
DateTime | |
Treating this node as a Value, returns the value converted to a DateTime or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
char | |
Treating this node as a Value, returns the value converted to a char or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
string | |
Treating this node as a Value, returns the value converted to a string or the default value specified by
defaultValue if the conversion is not possible. Also returns the default value if this node is not of a Value
type. |
bool | | Not currently implemented. |
void | |
Saves this RVariant to an XML file. |
string | |
Returns a string representation of this RVariant. If this RVariant is of the Value Kind, returns the result of
ExactConvert.ToString(object). Otherwise returns a string showing the Path and the Kind of this value. |
XmlDocument | ToXml(string rootElementName) |
Converts the specified RVariant to an XmlDocument. The name of the root element in the XmlDocument must be
specified. |
void | ToXml(XmlElement rootElement) |
Converts the specified RVariant to XML, storing it in the specified XmlElement. The name of the destination
XmlElement will not be altered. |
bool | |
Compares RVariant to another object. If the RVariant and the object are not null, uses RVariant.Equals(object) to do the comparison. |
bool | |
Provides an implicit conversion of the RVariant to a bool. Throws an appropriate exception if the conversion is
not possible. |
byte | |
Provides an implicit conversion of the RVariant to a byte. Throws an appropriate exception if the conversion is
not possible. |
sbyte | |
Provides an implicit conversion of the RVariant to an sbyte. Throws an appropriate exception if the conversion is
not possible. |
short | |
Provides an implicit conversion of the RVariant to a short. Throws an appropriate exception if the conversion is
not possible. |
ushort | |
Provides an implicit conversion of the RVariant to a ushort. Throws an appropriate exception if the conversion is
not possible. |
int | |
Provides an implicit conversion of the RVariant to an int. Throws an appropriate exception if the conversion is
not possible. |
uint | |
Provides an implicit conversion of the RVariant to a uint. Throws an appropriate exception if the conversion is
not possible. |
long | |
Provides an implicit conversion of the RVariant to a long. Throws an appropriate exception if the conversion is
not possible. |
ulong | |
Provides an implicit conversion of the RVariant to a ulong. Throws an appropriate exception if the conversion is
not possible. |
float | |
Provides an implicit conversion of the RVariant to a float. Throws an appropriate exception if the conversion is
not possible. |
double | |
Provides an implicit conversion of the RVariant to a double. Throws an appropriate exception if the conversion is
not possible. |
decimal | |
Provides an implicit conversion of the RVariant to a decimal. Throws an appropriate exception if the conversion is
not possible. |
DateTime | |
Provides an implicit conversion of the RVariant to a DateTime. Throws an appropriate exception if the conversion
is not possible. |
char | |
Provides an implicit conversion of the RVariant to a char. Throws an appropriate exception if the conversion is
not possible. |
string | |
Provides an implicit conversion of the RVariant to a string. Throws an appropriate exception if the conversion is
not possible. |
RVariant | | Provides an implicit conversion of a bool to RVariant. |
RVariant | | Provides an implicit conversion of a byte to RVariant. |
RVariant | | Provides an implicit conversion of a sbyte to RVariant. |
RVariant | | Provides an implicit conversion of a short to RVariant. |
RVariant | | Provides an implicit conversion of a ushort to RVariant. |
RVariant | | Provides an implicit conversion of an int to RVariant. |
RVariant | | Provides an implicit conversion of a uint to RVariant. |
RVariant | | Provides an implicit conversion of a long to RVariant. |
RVariant | | Provides an implicit conversion of a ulong to RVariant. |
RVariant | | Provides an implicit conversion of a float to RVariant. |
RVariant | | Provides an implicit conversion of a double to RVariant. |
RVariant | | Provides an implicit conversion of a decimal to RVariant. |
RVariant | | Provides an implicit conversion of a DateTime to RVariant. |
RVariant | | Provides an implicit conversion of a char to RVariant. |
RVariant | | Provides an implicit conversion of a string to RVariant. |
bool | | The opposite of RVariant.operator==(RVariant, object). |
int | | Gets the number of items stored in this variant. Returns 0 for Stubs and 1 for Values. |
bool | |
Returns true if and only if this value is not a stub. This enables code like "settings["stuff"]["value"].Exists",
which will return true only if the variant /stuff/value is defined. |
string | |
Gets the path of this variant. The path is null unless this variant is a Dict, a List or is contained in a Dict or
a List. NOTE: This property is for debugging purposes only, since it is lossy and cannot reliably be split back
into parts (since arbitrary Dict keys are allowed and are not escaped before use in this property) |
string | |
Same as the RVariant.FullPath property except that it never returns a null. If the path is null returns the
string "<null-path>" instead. Note that, just like the FullPath property, this is only meant for debugging. |
bool | | Always returns false since RVariants are never read-only. |
RVariant | |
Accesses a sub-element of this node, treating this node as a dictionary. Note that this will throw an exception if
attempted on a node which is already a List or a Value. |
RVariant | |
Accesses a sub-element of this node, treating this node as a list. Note that this will throw an exception if
attempted on a node which is already a Dict or a Value. |
RVariantKind | |
Defines which kind of node this RVariant represents: a List, a Dict or a Value. Can also be Stub if the node kind
has not been determined yet. |
object | |
Gets the Value stored in this RVariant as an object. The object will be either a string or a boxed integer type.
If the value has never been assigned an empty string will be returned. Will throw an exception if executed on a
non-Value kind RVariant. |