Detailed Description

Represents a set of used for localization.

Inheritance diagram for Dom.VariableSet:
Dom.LanguageGroup

Public Member Functions

 VariableSet ()
 Creates a new empty variable set. More...
 
void Clear ()
 Empties this variable set. More...
 
void Add (string code, string value)
 Adds a variable to this set. More...
 
void Remove (string code)
 Removes a variable by name. More...
 
bool Contains (string code)
 Checks if this variable set contains the named variable. More...
 
string GetValue (string code)
 Gets the value of the named variable from this set. More...
 
void SetValue (string code, string value)
 Sets a value of the named variable into this set. Creates it if it doesn't exist. More...
 
JSArray ToJson ()
 Converts this set to a JSON array. More...
 

Public Attributes

Dictionary< string, string > Map
 The lookup of variable name to its content. More...
 

Properties

int Count [get]
 The number of entries in the set. More...
 
string this[string code] [get, set]
 Gets or sets (or creates if not found) the value of a named variable in this set. More...
 

Constructor & Destructor Documentation

Dom.VariableSet.VariableSet ( )
inline

Creates a new empty variable set.

Member Function Documentation

void Dom.VariableSet.Add ( string  code,
string  value 
)
inline

Adds a variable to this set.

Parameters
codeThe name of the variable.
valueThe value of this variable.
void Dom.VariableSet.Clear ( )
inline

Empties this variable set.

bool Dom.VariableSet.Contains ( string  code)
inline

Checks if this variable set contains the named variable.

Parameters
codeThe name of the variable to look for.
Returns
True if this variable was found in this set; false otherwise.
string Dom.VariableSet.GetValue ( string  code)
inline

Gets the value of the named variable from this set.

Parameters
codeThe name of the variable to get the value of.
Returns
The value of the variable; null if it wasn't found.
void Dom.VariableSet.Remove ( string  code)
inline

Removes a variable by name.

Parameters
codeThe name of the variable to remove.
void Dom.VariableSet.SetValue ( string  code,
string  value 
)
inline

Sets a value of the named variable into this set. Creates it if it doesn't exist.

Parameters
codeThe name of the variable to set or create.
valueThe value of the variable to set.
JSArray Dom.VariableSet.ToJson ( )
inline

Converts this set to a JSON array.

Member Data Documentation

Dictionary<string,string> Dom.VariableSet.Map

The lookup of variable name to its content.

Property Documentation

int Dom.VariableSet.Count
get

The number of entries in the set.

string Dom.VariableSet.this[string code]
getset

Gets or sets (or creates if not found) the value of a named variable in this set.

Parameters
codeThe name of the variable to get/set/create.