public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("TSetMetaPath"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (MetaPath != null && __isset.metaPath) { field.Name = "metaPath"; field.Type = TType.List; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.Struct, MetaPath.Count), cancellationToken); foreach (TSetMetaPathItem _iter15 in MetaPath) { await _iter15.WriteAsync(oprot, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (SmallSetInfo != null && __isset.smallSetInfo) { field.Name = "smallSetInfo"; field.Type = TType.Struct; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await SmallSetInfo.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (SplitInfo != null && __isset.splitInfo) { field.Name = "splitInfo"; field.Type = TType.Struct; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); await SplitInfo.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }
public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.metaPath) { hashcode = (hashcode * 397) + TCollections.GetHashCode(MetaPath); } if (__isset.smallSetInfo) { hashcode = (hashcode * 397) + SmallSetInfo.GetHashCode(); } if (__isset.splitInfo) { hashcode = (hashcode * 397) + SplitInfo.GetHashCode(); } } return(hashcode); }
public override string ToString() { var sb = new StringBuilder("TSetMetaPath("); bool __first = true; if (MetaPath != null && __isset.metaPath) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("MetaPath: "); sb.Append(MetaPath); } if (SmallSetInfo != null && __isset.smallSetInfo) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("SmallSetInfo: "); sb.Append(SmallSetInfo == null ? "<null>" : SmallSetInfo.ToString()); } if (SplitInfo != null && __isset.splitInfo) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("SplitInfo: "); sb.Append(SplitInfo == null ? "<null>" : SplitInfo.ToString()); } sb.Append(")"); return(sb.ToString()); }