public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Column_or_supercolumn = new global::Apache.Cassandra.Test.ColumnOrSuperColumn(); await Column_or_supercolumn.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.Struct) { Deletion = new global::Apache.Cassandra.Test.Deletion(); await Deletion.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_key = false; bool isset_columns = false; TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { Key = await iprot.ReadBinaryAsync(cancellationToken); isset_key = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.List) { { TList _list55 = await iprot.ReadListBeginAsync(cancellationToken); Columns = new List <global::Apache.Cassandra.Test.ColumnOrSuperColumn>(_list55.Count); for (int _i56 = 0; _i56 < _list55.Count; ++_i56) { global::Apache.Cassandra.Test.ColumnOrSuperColumn _elem57; _elem57 = new global::Apache.Cassandra.Test.ColumnOrSuperColumn(); await _elem57.ReadAsync(iprot, cancellationToken); Columns.Add(_elem57); } await iprot.ReadListEndAsync(cancellationToken); } isset_columns = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); if (!isset_key) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_columns) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }