public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { iprot.ReadStructBegin(); while (true) { TField tfield = iprot.ReadFieldBegin(); if (tfield.Type != TType.Stop) { switch (tfield.ID) { case 1: if (tfield.Type == TType.String) { this.ColumnName = iprot.ReadBinary(); break; } TProtocolUtil.Skip(iprot, tfield.Type); break; case 2: if (tfield.Type == TType.Struct) { this.Cell = new TCell(); this.Cell.Read(iprot); break; } TProtocolUtil.Skip(iprot, tfield.Type); break; default: TProtocolUtil.Skip(iprot, tfield.Type); break; } iprot.ReadFieldEnd(); } else { break; } } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { iprot.ReadStructBegin(); while (true) { TField tfield = iprot.ReadFieldBegin(); if (tfield.Type != TType.Stop) { switch (tfield.ID) { case 1: if (tfield.Type == TType.String) { this.Row = iprot.ReadBinary(); break; } TProtocolUtil.Skip(iprot, tfield.Type); break; case 2: if (tfield.Type == TType.Map) { this.Columns = new Dictionary <byte[], TCell>(); TMap tmap = iprot.ReadMapBegin(); for (int index1 = 0; index1 < tmap.Count; ++index1) { byte[] index2 = iprot.ReadBinary(); TCell tcell = new TCell(); tcell.Read(iprot); this.Columns[index2] = tcell; } iprot.ReadMapEnd(); break; } TProtocolUtil.Skip(iprot, tfield.Type); break; case 3: if (tfield.Type == TType.List) { this.SortedColumns = new List <TColumn>(); TList tlist = iprot.ReadListBegin(); for (int index = 0; index < tlist.Count; ++index) { TColumn tcolumn = new TColumn(); tcolumn.Read(iprot); this.SortedColumns.Add(tcolumn); } iprot.ReadListEnd(); break; } TProtocolUtil.Skip(iprot, tfield.Type); break; default: TProtocolUtil.Skip(iprot, tfield.Type); break; } iprot.ReadFieldEnd(); } else { break; } } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }