public override string ToString() { var sb = new StringBuilder("SuggestDictionaryIncrements("); bool __first = true; if (ItemIncrement != null && __isset.itemIncrement) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("ItemIncrement: "); sb.Append(ItemIncrement == null ? "<null>" : ItemIncrement.ToString()); } if (TagIncrements != null && __isset.tagIncrements) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("TagIncrements: "); sb.Append(TagIncrements); } sb.Append(")"); return(sb.ToString()); }
public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.itemIncrement) { hashcode = (hashcode * 397) + ItemIncrement.GetHashCode(); } if (__isset.tagIncrements) { hashcode = (hashcode * 397) + TCollections.GetHashCode(TagIncrements); } } return(hashcode); }
public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("SuggestDictionaryIncrements"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (ItemIncrement != null && __isset.itemIncrement) { field.Name = "itemIncrement"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await ItemIncrement.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (TagIncrements != null && __isset.tagIncrements) { field.Name = "tagIncrements"; field.Type = TType.List; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.Struct, TagIncrements.Count), cancellationToken); foreach (SuggestTagDictionaryIncrement _iter228 in TagIncrements) { await _iter228.WriteAsync(oprot, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }
public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("SuggestDictionaryIncrements"); oprot.WriteStructBegin(struc); TField field = new TField(); if (ItemIncrement != null && __isset.itemIncrement) { field.Name = "itemIncrement"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); ItemIncrement.Write(oprot); oprot.WriteFieldEnd(); } if (TagIncrements != null && __isset.tagIncrements) { field.Name = "tagIncrements"; field.Type = TType.List; field.ID = 2; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, TagIncrements.Count)); foreach (SuggestTagDictionaryIncrement _iter316 in TagIncrements) { _iter316.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }