public async 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 0: if (field.Type == TType.I32) { Success = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 1: if (field.Type == TType.Struct) { Ouch = new InvalidOperation(); await Ouch.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 InvalidOperation DeepCopy() { var tmp2 = new InvalidOperation(); if (__isset.whatOp) { tmp2.WhatOp = this.WhatOp; } tmp2.__isset.whatOp = this.__isset.whatOp; if ((Why != null) && __isset.why) { tmp2.Why = this.Why; } tmp2.__isset.why = this.__isset.why; return(tmp2); }