public class GSArray
{
private List<GSWrappedObject> Data;
public GSArray()
{
Data = new List<GSWrappedObject>();
}
/// <summary>
/// Returns this object in GS binary format.
/// </summary>
/// <returns></returns>
public byte[] ToGSBinary()
{
List<byte> bytes = new List<byte>();
short length = (short)Data.Count;
bytes.AddRange(length.ToGSBinary());
for (int i = 0; i < length; i++)
bytes.AddRange(Data[i].ToGSBinary());
return bytes.ToArray();
}
bool Contains(object obj);
void RemoveElementAt(int index);
#region Adders
void Add(GSWrappedObject value);
void AddNull();
void AddBool(bool value);
void AddBoolArray(IEnumerable<bool> value);
void AddByte(byte value);
void AddByteArray(IEnumerable<byte> value);
void AddShort(short value);
void AddShortArray(IEnumerable<short> value);
void AddInt(int value);
void AddIntArray(IEnumerable<int> value);
void AddLong(long value);
void AddLongArray(IEnumerable<long> value);
void AddFloat(float value);
void AddFloatArray(IEnumerable<float> value);
void AddDouble(double value);
void AddDoubleArray(IEnumerable<double> value);
void AddString(string value);
void AddStringArray(IEnumerable<string> value);
void AddGSArray(IGSArray value);
void AddGSObject(IGSObject value);
#endregion
#region Getters
GSWrappedObject GetElementAt(int index);
bool IsNull(int index);
bool GetBool(int index);
bool[] GetBoolArray(int index);
byte GetByte(int index);
byte[] GetByteArray(int index);
short GetShort(int index);
short[] GetShortArray(int index);
int GetInt(int index);
int[] GetIntArray(int index);
long GetLong(int index);
long[] GetLongArray(int index);
float GetFloat(int index);
float[] GetFloatArray(int index);
double GetDouble(int index);
double[] GetDoubleArray(int index);
string GetString(int index);
string[] GetStringArray(int index);
IGSArray GetGSArray(int index);
IGSObject GetGSObject(int index);
#endregion
}