public override string ToString() { var sb = new StringBuilder("Result("); bool __first = true; if (RdRes != null && __isset.rdRes) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("RdRes: "); sb.Append(RdRes == null ? "<null>" : RdRes.ToString()); } if (WrRes != null && __isset.wrRes) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("WrRes: "); sb.Append(WrRes == null ? "<null>" : WrRes.ToString()); } sb.Append(")"); return(sb.ToString()); }
public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("Result"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (RdRes != null && __isset.rdRes) { field.Name = "rdRes"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await RdRes.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (WrRes != null && __isset.wrRes) { field.Name = "wrRes"; field.Type = TType.Struct; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await WrRes.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }