private int set_arg_buffer(Field_Info info, Bit_Buffer buffer, JValue value) { if (info.field_type == "int") { int val = int.Parse(value.ToString()); buffer.write_int(val, info.field_bit); } else if (info.field_type == "uint") { uint val = uint.Parse(value.ToString()); buffer.write_uint(val, info.field_bit); } else if (info.field_type == "int64") { long val = long.Parse(value.ToString()); buffer.write_int64(val); } else if (info.field_type == "uint64") { ulong val = ulong.Parse(value.ToString()); buffer.write_uint64(val); } else if (info.field_type == "float") { float val = float.Parse(value.ToString()); buffer.write_decimal(val, 32); } else if (info.field_type == "bool") { bool val = bool.Parse(value.ToString()); buffer.write_bool(val); } else if (info.field_type == "string") { string val = value.ToString(); buffer.write_string(val); } return(0); }