Beispiel #1
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (__isset.parentID)
                {
                    hashcode = (hashcode * 397) + ParentID.GetHashCode();
                }
                if (__isset.level)
                {
                    hashcode = (hashcode * 397) + Level.GetHashCode();
                }
                if (__isset.children)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(Children);
                }
                if (__isset.smallset)
                {
                    hashcode = (hashcode * 397) + Smallset.GetHashCode();
                }
                if (__isset.splitinfo)
                {
                    hashcode = (hashcode * 397) + Splitinfo.GetHashCode();
                }
            }
            return(hashcode);
        }
Beispiel #2
0
        public override string ToString()
        {
            var  sb      = new StringBuilder("TBigSetGenericData(");
            bool __first = true;

            if (__isset.parentID)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("ParentID: ");
                sb.Append(ParentID);
            }
            if (__isset.level)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Level: ");
                sb.Append(Level);
            }
            if (Children != null && __isset.children)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Children: ");
                sb.Append(Children);
            }
            if (Smallset != null && __isset.smallset)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Smallset: ");
                sb.Append(Smallset == null ? "<null>" : Smallset.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());
        }
Beispiel #3
0
        public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
            oprot.IncrementRecursionDepth();
            try
            {
                var struc = new TStruct("TBigSetGenericData");
                await oprot.WriteStructBeginAsync(struc, cancellationToken);

                var field = new TField();
                if (__isset.parentID)
                {
                    field.Name = "parentID";
                    field.Type = TType.I64;
                    field.ID   = 1;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(ParentID, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (__isset.level)
                {
                    field.Name = "level";
                    field.Type = TType.I16;
                    field.ID   = 2;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI16Async(Level, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (Children != null && __isset.children)
                {
                    field.Name = "children";
                    field.Type = TType.List;
                    field.ID   = 3;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    {
                        await oprot.WriteListBeginAsync(new TList(TType.Struct, Children.Count), cancellationToken);

                        foreach (TMetaItem _iter11 in Children)
                        {
                            await _iter11.WriteAsync(oprot, cancellationToken);
                        }
                        await oprot.WriteListEndAsync(cancellationToken);
                    }
                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (Smallset != null && __isset.smallset)
                {
                    field.Name = "smallset";
                    field.Type = TType.Struct;
                    field.ID   = 4;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await Smallset.WriteAsync(oprot, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (Splitinfo != null && __isset.splitinfo)
                {
                    field.Name = "splitinfo";
                    field.Type = TType.Struct;
                    field.ID   = 5;
                    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();
            }
        }