// void WriteValue(object val, StreamWriter writer) // // Helper function that takes a value val and writes it into the output stream. It will convert the value to a string serialization. private void WriteValue(object val, StreamWriter writer) { if (val is SqlMap <string, string> ) { writer.Write(DriverFunctions.WriteQuotedStringMap(val as SqlMap <string, string>, this._map_item_delim, this._map_kv_delim)); } else if (val is SqlArray <int> ) { writer.Write(DriverFunctions.WriteQuotedIntArray(val as SqlArray <int>, this._array_item_delim)); } else if (val is string) { writer.Write(DriverFunctions.AddQuotes(val as string)); } else { writer.Write(val); } }