ElectroServer 5 Client: C#
Electrotank.Electroserver5.Api.EsObject Class Reference
Inheritance diagram for Electrotank.Electroserver5.Api.EsObject:
Electrotank.Electroserver5.Api.EsObjectRO

Public Member Functions

 EsObject ()
 Creates a new instance of EsObject. More...
 
System.Collections.IEnumerator GetEnumerator ()
 Creates a new instance of EsObject and fills it with the entries in the Object. More...
 
void addAll (EsObjectRO esObject)
 Adds the contents of the argument. More...
 
int getSize ()
 
DataType getDataType (string name)
 Gets the datatype of one of the values stored in the EsObject. More...
 
void setInteger (string name, int value)
 Sets the named entry of the EsObject to the integer value. More...
 
void setString (string name, string value)
 Sets the named entry of the EsObject to the string value. More...
 
void setDouble (string name, double value)
 Sets the named entry of the EsObject to the double value. More...
 
void setFloat (string name, float value)
 Sets the named entry of the EsObject to the float value. More...
 
void setBoolean (string name, bool value)
 Sets the named entry of the EsObject to the boolean value. More...
 
void setByte (string name, byte value)
 Sets the named entry of the EsObject to the byte value. More...
 
void setChar (string name, char value)
 Sets the named entry of the EsObject to the char value. More...
 
void setLong (string name, long value)
 Sets the named entry of the EsObject to the long value. More...
 
void setShort (string name, short value)
 Sets the named entry of the EsObject to the short value. More...
 
void setEsObject (string name, EsObject value)
 Sets the named entry of the EsObject to the EsObject value. More...
 
void setNumber (string name, Number value)
 Sets the named entry of the EsObject to the Number value. More...
 
void setNumber (string name, double value)
 Sets the named entry of the EsObject to the double value, cast as a Number. More...
 
void setNumber (string name, float value)
 Sets the named entry of the EsObject to the float value, cast as a Number. More...
 
void setNumber (string name, long value)
 Sets the named entry of the EsObject to the long value, cast as a Number. More...
 
void setNumber (string name, int value)
 Sets the named entry of the EsObject to the int value, cast as a Number. More...
 
void setIntegerArray (string name, int[] value)
 Sets the named entry of the EsObject to the int array value. More...
 
void setStringArray (string name, string[] value)
 Sets the named entry of the EsObject to the string array value. More...
 
void setDoubleArray (string name, double[] value)
 Sets the named entry of the EsObject to the double array value. More...
 
void setFloatArray (string name, float[] value)
 Sets the named entry of the EsObject to the float array value. More...
 
void setBooleanArray (string name, bool[] value)
 Sets the named entry of the EsObject to the boolean array value. More...
 
void setByteArray (string name, byte[] value)
 Sets the named entry of the EsObject to the byte array value. More...
 
void setCharArray (string name, char[] value)
 Sets the named entry of the EsObject to the char array value. More...
 
void setLongArray (string name, long[] value)
 Sets the named entry of the EsObject to the long array value. More...
 
void setShortArray (string name, short[] value)
 Sets the named entry of the EsObject to the short array value. More...
 
void setEsObjectArray (string name, EsObject[] value)
 Sets the named entry of the EsObject to the EsObject array value. More...
 
void setNumberArray (string name, Number[] value)
 Sets the named entry of the EsObject to the Number array value. More...
 
int getInteger (string name)
 
int getInteger (string name, int defaultValue)
 
string getString (string name)
 
string getString (string name, string defaultValue)
 
double getDouble (string name)
 
double getDouble (string name, double defaultValue)
 
float getFloat (string name)
 
float getFloat (string name, float defaultValue)
 
bool getBoolean (string name)
 
bool getBoolean (string name, bool defaultValue)
 
byte getByte (string name)
 
byte getByte (string name, byte defaultValue)
 
char getChar (string name)
 
char getChar (string name, char defaultValue)
 
long getLong (string name)
 
long getLong (string name, long defaultValue)
 
short getShort (string name)
 
short getShort (string name, short defaultValue)
 
EsObject getEsObject (string name)
 
EsObject getEsObject (string name, EsObject defaultValue)
 
Number getNumber (string name)
 
Number getNumber (string name, Number defaultValue)
 
int[] getIntegerArray (string name)
 
int[] getIntegerArray (string name, int[] defaultValue)
 
string[] getStringArray (string name)
 
string[] getStringArray (string name, string[] defaultValue)
 
double[] getDoubleArray (string name)
 
double[] getDoubleArray (string name, double[] defaultValue)
 
float[] getFloatArray (string name)
 
float[] getFloatArray (string name, float[] defaultValue)
 
bool[] getBooleanArray (string name)
 
bool[] getBooleanArray (string name, bool[] defaultValue)
 
byte[] getByteArray (string name)
 
byte[] getByteArray (string name, byte[] defaultValue)
 
char[] getCharArray (string name)
 
char[] getCharArray (string name, char[] defaultValue)
 
long[] getLongArray (string name)
 
long[] getLongArray (string name, long[] defaultValue)
 
short[] getShortArray (string name)
 
short[] getShortArray (string name, short[] defaultValue)
 
EsObject[] getEsObjectArray (string name)
 
EsObject[] getEsObjectArray (string name, EsObject[] defaultValue)
 
Number[] getNumberArray (string name)
 
Number[] getNumberArray (string name, Number[] defaultValue)
 
void removeVariable (string name)
 Removes the named variable from the EsObject. More...
 
void removeAll ()
 Removes all variables from the EsObject, leaving it empty. More...
 
Object getRawVariable (string name)
 
bool variableExists (string name)
 
override string ToString ()
 
string tostring (string tabs)
 
EsObject shallowClone ()
 Creates a shallow clone EsObject. More...
 
EsObject deepClone ()
 Creates a deep clone EsObject. More...
 

Static Public Attributes

static readonly EsObjectRO emptyObject = new EsObject()
 

Constructor & Destructor Documentation

Electrotank.Electroserver5.Api.EsObject.EsObject ( )

Creates a new instance of EsObject.

Member Function Documentation

void Electrotank.Electroserver5.Api.EsObject.addAll ( EsObjectRO  esObject)

Adds the contents of the argument.

Useful for combining two EsObjects.

Parameters
esObjectthe read-only EsObject to be added.
See Also
EsObjectRO EsObjectRO
EsObject Electrotank.Electroserver5.Api.EsObject.deepClone ( )

Creates a deep clone EsObject.

Shallow cloning is faster than deep cloning but does not treat non-primitive data types correctly.

Returns
deep clone of the argument
bool Electrotank.Electroserver5.Api.EsObject.getBoolean ( string  name)
bool Electrotank.Electroserver5.Api.EsObject.getBoolean ( string  name,
bool  defaultValue 
)
bool [] Electrotank.Electroserver5.Api.EsObject.getBooleanArray ( string  name)
bool [] Electrotank.Electroserver5.Api.EsObject.getBooleanArray ( string  name,
bool[]  defaultValue 
)
byte Electrotank.Electroserver5.Api.EsObject.getByte ( string  name)
byte Electrotank.Electroserver5.Api.EsObject.getByte ( string  name,
byte  defaultValue 
)
byte [] Electrotank.Electroserver5.Api.EsObject.getByteArray ( string  name)
byte [] Electrotank.Electroserver5.Api.EsObject.getByteArray ( string  name,
byte[]  defaultValue 
)
char Electrotank.Electroserver5.Api.EsObject.getChar ( string  name)
char Electrotank.Electroserver5.Api.EsObject.getChar ( string  name,
char  defaultValue 
)
char [] Electrotank.Electroserver5.Api.EsObject.getCharArray ( string  name)
char [] Electrotank.Electroserver5.Api.EsObject.getCharArray ( string  name,
char[]  defaultValue 
)
DataType Electrotank.Electroserver5.Api.EsObject.getDataType ( string  name)

Gets the datatype of one of the values stored in the EsObject.

Parameters
namename of the value stored
Returns
datatype
double Electrotank.Electroserver5.Api.EsObject.getDouble ( string  name)
double Electrotank.Electroserver5.Api.EsObject.getDouble ( string  name,
double  defaultValue 
)
double [] Electrotank.Electroserver5.Api.EsObject.getDoubleArray ( string  name)
double [] Electrotank.Electroserver5.Api.EsObject.getDoubleArray ( string  name,
double[]  defaultValue 
)
System.Collections.IEnumerator Electrotank.Electroserver5.Api.EsObject.GetEnumerator ( )

Creates a new instance of EsObject and fills it with the entries in the Object.

This is suitable for use with an ActionScript object.

Parameters
entriesthe names and values to add to the EsObject
EsObject Electrotank.Electroserver5.Api.EsObject.getEsObject ( string  name)
EsObject Electrotank.Electroserver5.Api.EsObject.getEsObject ( string  name,
EsObject  defaultValue 
)
EsObject [] Electrotank.Electroserver5.Api.EsObject.getEsObjectArray ( string  name)
EsObject [] Electrotank.Electroserver5.Api.EsObject.getEsObjectArray ( string  name,
EsObject[]  defaultValue 
)
float Electrotank.Electroserver5.Api.EsObject.getFloat ( string  name)
float Electrotank.Electroserver5.Api.EsObject.getFloat ( string  name,
float  defaultValue 
)
float [] Electrotank.Electroserver5.Api.EsObject.getFloatArray ( string  name)
float [] Electrotank.Electroserver5.Api.EsObject.getFloatArray ( string  name,
float[]  defaultValue 
)
int Electrotank.Electroserver5.Api.EsObject.getInteger ( string  name)
int Electrotank.Electroserver5.Api.EsObject.getInteger ( string  name,
int  defaultValue 
)
int [] Electrotank.Electroserver5.Api.EsObject.getIntegerArray ( string  name)
int [] Electrotank.Electroserver5.Api.EsObject.getIntegerArray ( string  name,
int[]  defaultValue 
)
long Electrotank.Electroserver5.Api.EsObject.getLong ( string  name)
long Electrotank.Electroserver5.Api.EsObject.getLong ( string  name,
long  defaultValue 
)
long [] Electrotank.Electroserver5.Api.EsObject.getLongArray ( string  name)
long [] Electrotank.Electroserver5.Api.EsObject.getLongArray ( string  name,
long[]  defaultValue 
)
Number Electrotank.Electroserver5.Api.EsObject.getNumber ( string  name)
Number Electrotank.Electroserver5.Api.EsObject.getNumber ( string  name,
Number  defaultValue 
)
Number [] Electrotank.Electroserver5.Api.EsObject.getNumberArray ( string  name)
Number [] Electrotank.Electroserver5.Api.EsObject.getNumberArray ( string  name,
Number[]  defaultValue 
)
Object Electrotank.Electroserver5.Api.EsObject.getRawVariable ( string  name)
short Electrotank.Electroserver5.Api.EsObject.getShort ( string  name)
short Electrotank.Electroserver5.Api.EsObject.getShort ( string  name,
short  defaultValue 
)
short [] Electrotank.Electroserver5.Api.EsObject.getShortArray ( string  name)
short [] Electrotank.Electroserver5.Api.EsObject.getShortArray ( string  name,
short[]  defaultValue 
)
int Electrotank.Electroserver5.Api.EsObject.getSize ( )
string Electrotank.Electroserver5.Api.EsObject.getString ( string  name)
string Electrotank.Electroserver5.Api.EsObject.getString ( string  name,
string  defaultValue 
)
string [] Electrotank.Electroserver5.Api.EsObject.getStringArray ( string  name)
string [] Electrotank.Electroserver5.Api.EsObject.getStringArray ( string  name,
string[]  defaultValue 
)
void Electrotank.Electroserver5.Api.EsObject.removeAll ( )

Removes all variables from the EsObject, leaving it empty.

void Electrotank.Electroserver5.Api.EsObject.removeVariable ( string  name)

Removes the named variable from the EsObject.

Parameters
namename of variable to be removed
void Electrotank.Electroserver5.Api.EsObject.setBoolean ( string  name,
bool  value 
)

Sets the named entry of the EsObject to the boolean value.

Parameters
namename of the entry
valueboolean value of the entry
void Electrotank.Electroserver5.Api.EsObject.setBooleanArray ( string  name,
bool[]  value 
)

Sets the named entry of the EsObject to the boolean array value.

Parameters
namename of the entry
valueboolean array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setByte ( string  name,
byte  value 
)

Sets the named entry of the EsObject to the byte value.

Parameters
namename of the entry
valuebyte value of the entry
void Electrotank.Electroserver5.Api.EsObject.setByteArray ( string  name,
byte[]  value 
)

Sets the named entry of the EsObject to the byte array value.

Parameters
namename of the entry
valuebyte array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setChar ( string  name,
char  value 
)

Sets the named entry of the EsObject to the char value.

Parameters
namename of the entry
valuechar value of the entry
void Electrotank.Electroserver5.Api.EsObject.setCharArray ( string  name,
char[]  value 
)

Sets the named entry of the EsObject to the char array value.

Parameters
namename of the entry
valuechar array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setDouble ( string  name,
double  value 
)

Sets the named entry of the EsObject to the double value.

Parameters
namename of the entry
valuedouble value of the entry
void Electrotank.Electroserver5.Api.EsObject.setDoubleArray ( string  name,
double[]  value 
)

Sets the named entry of the EsObject to the double array value.

Parameters
namename of the entry
valuedouble array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setEsObject ( string  name,
EsObject  value 
)

Sets the named entry of the EsObject to the EsObject value.

This allows for nesting of an EsObject inside another EsObject.

Parameters
namename of the entry
valueshort value of the entry
void Electrotank.Electroserver5.Api.EsObject.setEsObjectArray ( string  name,
EsObject[]  value 
)

Sets the named entry of the EsObject to the EsObject array value.

Parameters
namename of the entry
valueEsObject array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setFloat ( string  name,
float  value 
)

Sets the named entry of the EsObject to the float value.

Parameters
namename of the entry
valuefloat value of the entry
void Electrotank.Electroserver5.Api.EsObject.setFloatArray ( string  name,
float[]  value 
)

Sets the named entry of the EsObject to the float array value.

Parameters
namename of the entry
valuefloat array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setInteger ( string  name,
int  value 
)

Sets the named entry of the EsObject to the integer value.

Parameters
namename of the entry
valueinteger value of the entry
void Electrotank.Electroserver5.Api.EsObject.setIntegerArray ( string  name,
int[]  value 
)

Sets the named entry of the EsObject to the int array value.

Parameters
namename of the entry
valueint array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setLong ( string  name,
long  value 
)

Sets the named entry of the EsObject to the long value.

Parameters
namename of the entry
valuelong value of the entry
void Electrotank.Electroserver5.Api.EsObject.setLongArray ( string  name,
long[]  value 
)

Sets the named entry of the EsObject to the long array value.

Parameters
namename of the entry
valuelong array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setNumber ( string  name,
Number  value 
)

Sets the named entry of the EsObject to the Number value.

Parameters
namename of the entry
valueof the entry
void Electrotank.Electroserver5.Api.EsObject.setNumber ( string  name,
double  value 
)

Sets the named entry of the EsObject to the double value, cast as a Number.

Parameters
namename of the entry
valuedouble value of the entry
void Electrotank.Electroserver5.Api.EsObject.setNumber ( string  name,
float  value 
)

Sets the named entry of the EsObject to the float value, cast as a Number.

Parameters
namename of the entry
valuefloat value of the entry
void Electrotank.Electroserver5.Api.EsObject.setNumber ( string  name,
long  value 
)

Sets the named entry of the EsObject to the long value, cast as a Number.

Parameters
namename of the entry
valuelong value of the entry
void Electrotank.Electroserver5.Api.EsObject.setNumber ( string  name,
int  value 
)

Sets the named entry of the EsObject to the int value, cast as a Number.

Parameters
namename of the entry
valueint value of the entry
void Electrotank.Electroserver5.Api.EsObject.setNumberArray ( string  name,
Number[]  value 
)

Sets the named entry of the EsObject to the Number array value.

Parameters
namename of the entry
valueNumber array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setShort ( string  name,
short  value 
)

Sets the named entry of the EsObject to the short value.

Parameters
namename of the entry
valueshort value of the entry
void Electrotank.Electroserver5.Api.EsObject.setShortArray ( string  name,
short[]  value 
)

Sets the named entry of the EsObject to the short array value.

Parameters
namename of the entry
valueshort array value of the entry
void Electrotank.Electroserver5.Api.EsObject.setString ( string  name,
string  value 
)

Sets the named entry of the EsObject to the string value.

Parameters
namename of the entry
valuestring value of the entry
void Electrotank.Electroserver5.Api.EsObject.setStringArray ( string  name,
string[]  value 
)

Sets the named entry of the EsObject to the string array value.

Parameters
namename of the entry
valuestring array value of the entry
EsObject Electrotank.Electroserver5.Api.EsObject.shallowClone ( )

Creates a shallow clone EsObject.

Shallow cloning is faster than deep cloning but does not treat non-primitive data types correctly.

Returns
shallow clone of the argument
override string Electrotank.Electroserver5.Api.EsObject.ToString ( )
string Electrotank.Electroserver5.Api.EsObject.tostring ( string  tabs)
bool Electrotank.Electroserver5.Api.EsObject.variableExists ( string  name)

Member Data Documentation

readonly EsObjectRO Electrotank.Electroserver5.Api.EsObject.emptyObject = new EsObject()
static