public TableInfo(byte[] _tableid, string _tablename, string _tabledesc, DBValue.Type _keytype) { this.tableid = _tableid; this.tablename = _tablename; this.tabledesc = _tabledesc; this.keytype = _keytype; }
public static TableInfo UnPack(System.IO.Stream stream) { byte[] head = null; string name = null; string desc = null; DBValue.Type keytype = DBValue.Type.BigNumber; TableInfo table = new TableInfo(head, name, desc, keytype); byte[] buf = new byte[255]; stream.Read(buf, 0, 1); table.tableid = new byte[buf[0]]; stream.Read(table.tableid, 0, table.tableid.Length); stream.Read(buf, 0, 1); var strlen = buf[0]; stream.Read(buf, 0, strlen); table.tablename = System.Text.Encoding.UTF8.GetString(buf, 0, strlen); stream.Read(buf, 0, 1); strlen = buf[0]; stream.Read(buf, 0, strlen); table.tabledesc = System.Text.Encoding.UTF8.GetString(buf, 0, strlen); stream.Read(buf, 0, 1); table.keytype = (DBValue.Type)buf[0]; return(table); }
public static WriteOp_CreateTable UnPack(System.IO.Stream stream) { byte[] head = null; string name = null; string desc = null; DBValue.Type keytype = DBValue.Type.BigNumber; WriteOp_CreateTable table = new WriteOp_CreateTable(head, name, desc, keytype); return(table); }
public WriteOp_CreateTable(byte[] _tableid, string _tablename, string _tabledesc, DBValue.Type _keytype) { this.tableid = _tableid; this.tablename = _tablename; this.tabledesc = _tabledesc; this.keytype = _keytype; }