public override int GetHashCode() { int hashcode = 157; unchecked { if (isset.serialized_rows) { hashcode = (hashcode * 397) + Serialized_rows.GetHashCode(); } if (isset.execution_finished) { hashcode = (hashcode * 397) + Execution_finished.GetHashCode(); } if (isset.merge_type) { hashcode = (hashcode * 397) + Merge_type.GetHashCode(); } if (isset.sharded) { hashcode = (hashcode * 397) + Sharded.GetHashCode(); } if (isset.row_desc) { hashcode = (hashcode * 397) + Row_desc.GetHashCode(); } if (isset.node_id) { hashcode = (hashcode * 397) + Node_id.GetHashCode(); } } return(hashcode); }
public override string ToString() { var sb = new StringBuilder("TStepResult("); bool __first = true; if (Serialized_rows != null && isset.serialized_rows) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Serialized_rows: "); sb.Append(Serialized_rows == null ? "<null>" : Serialized_rows.ToString()); } if (isset.execution_finished) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Execution_finished: "); sb.Append(Execution_finished); } if (isset.merge_type) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Merge_type: "); sb.Append(Merge_type); } if (isset.sharded) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Sharded: "); sb.Append(Sharded); } if (Row_desc != null && isset.row_desc) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Row_desc: "); sb.Append(Row_desc); } if (isset.node_id) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Node_id: "); sb.Append(Node_id); } sb.Append(")"); return(sb.ToString()); }
public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("TStepResult"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (Serialized_rows != null && isset.serialized_rows) { field.Name = "serialized_rows"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Serialized_rows.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.execution_finished) { field.Name = "execution_finished"; field.Type = TType.Bool; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBoolAsync(Execution_finished, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.merge_type) { field.Name = "merge_type"; field.Type = TType.I32; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI32Async((int)Merge_type, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.sharded) { field.Name = "sharded"; field.Type = TType.Bool; field.ID = 4; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBoolAsync(Sharded, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (Row_desc != null && isset.row_desc) { field.Name = "row_desc"; field.Type = TType.List; field.ID = 5; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.Struct, Row_desc.Count), cancellationToken); foreach (TColumnType _iter35 in Row_desc) { await _iter35.WriteAsync(oprot, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.node_id) { field.Name = "node_id"; field.Type = TType.I32; field.ID = 6; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI32Async(Node_id, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }