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

        unchecked {
            if (__isset.field_id)
            {
                hashcode = (hashcode * 397) + Field_id.GetHashCode();
            }
            if ((Spec_int64 != null) && __isset.spec_int64)
            {
                hashcode = (hashcode * 397) + Spec_int64.GetHashCode();
            }
            if ((Spec_double != null) && __isset.spec_double)
            {
                hashcode = (hashcode * 397) + Spec_double.GetHashCode();
            }
            if ((Spec_bytes != null) && __isset.spec_bytes)
            {
                hashcode = (hashcode * 397) + Spec_bytes.GetHashCode();
            }
            if ((Spec_key != null) && __isset.spec_key)
            {
                hashcode = (hashcode * 397) + Spec_key.GetHashCode();
            }
            if ((Spec_li != null) && __isset.spec_li)
            {
                hashcode = (hashcode * 397) + Spec_li.GetHashCode();
            }
            if ((Spec_lb != null) && __isset.spec_lb)
            {
                hashcode = (hashcode * 397) + Spec_lb.GetHashCode();
            }
        }
        return(hashcode);
    }
Example #2
0
    public override string ToString()
    {
        var tmp176 = new StringBuilder("SpecValueSerialField(");
        int tmp177 = 0;

        if (__isset.field_id)
        {
            if (0 < tmp177++)
            {
                tmp176.Append(", ");
            }
            tmp176.Append("Field_id: ");
            Field_id.ToString(tmp176);
        }
        if ((Spec_int64 != null) && __isset.spec_int64)
        {
            if (0 < tmp177++)
            {
                tmp176.Append(", ");
            }
            tmp176.Append("Spec_int64: ");
            Spec_int64.ToString(tmp176);
        }
        if ((Spec_double != null) && __isset.spec_double)
        {
            if (0 < tmp177++)
            {
                tmp176.Append(", ");
            }
            tmp176.Append("Spec_double: ");
            Spec_double.ToString(tmp176);
        }
        if ((Spec_bytes != null) && __isset.spec_bytes)
        {
            if (0 < tmp177++)
            {
                tmp176.Append(", ");
            }
            tmp176.Append("Spec_bytes: ");
            Spec_bytes.ToString(tmp176);
        }
        if ((Spec_key != null) && __isset.spec_key)
        {
            if (0 < tmp177++)
            {
                tmp176.Append(", ");
            }
            tmp176.Append("Spec_key: ");
            Spec_key.ToString(tmp176);
        }
        if ((Spec_li != null) && __isset.spec_li)
        {
            if (0 < tmp177++)
            {
                tmp176.Append(", ");
            }
            tmp176.Append("Spec_li: ");
            Spec_li.ToString(tmp176);
        }
        if ((Spec_lb != null) && __isset.spec_lb)
        {
            if (0 < tmp177++)
            {
                tmp176.Append(", ");
            }
            tmp176.Append("Spec_lb: ");
            Spec_lb.ToString(tmp176);
        }
        tmp176.Append(')');
        return(tmp176.ToString());
    }
Example #3
0
    public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
    {
        oprot.IncrementRecursionDepth();
        try
        {
            var tmp174 = new TStruct("SpecValueSerialField");
            await oprot.WriteStructBeginAsync(tmp174, cancellationToken);

            var tmp175 = new TField();
            if (__isset.field_id)
            {
                tmp175.Name = "field_id";
                tmp175.Type = TType.I32;
                tmp175.ID   = 1;
                await oprot.WriteFieldBeginAsync(tmp175, cancellationToken);

                await oprot.WriteI32Async(Field_id, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if ((Spec_int64 != null) && __isset.spec_int64)
            {
                tmp175.Name = "spec_int64";
                tmp175.Type = TType.Struct;
                tmp175.ID   = 2;
                await oprot.WriteFieldBeginAsync(tmp175, cancellationToken);

                await Spec_int64.WriteAsync(oprot, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if ((Spec_double != null) && __isset.spec_double)
            {
                tmp175.Name = "spec_double";
                tmp175.Type = TType.Struct;
                tmp175.ID   = 3;
                await oprot.WriteFieldBeginAsync(tmp175, cancellationToken);

                await Spec_double.WriteAsync(oprot, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if ((Spec_bytes != null) && __isset.spec_bytes)
            {
                tmp175.Name = "spec_bytes";
                tmp175.Type = TType.Struct;
                tmp175.ID   = 4;
                await oprot.WriteFieldBeginAsync(tmp175, cancellationToken);

                await Spec_bytes.WriteAsync(oprot, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if ((Spec_key != null) && __isset.spec_key)
            {
                tmp175.Name = "spec_key";
                tmp175.Type = TType.Struct;
                tmp175.ID   = 5;
                await oprot.WriteFieldBeginAsync(tmp175, cancellationToken);

                await Spec_key.WriteAsync(oprot, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if ((Spec_li != null) && __isset.spec_li)
            {
                tmp175.Name = "spec_li";
                tmp175.Type = TType.Struct;
                tmp175.ID   = 6;
                await oprot.WriteFieldBeginAsync(tmp175, cancellationToken);

                await Spec_li.WriteAsync(oprot, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if ((Spec_lb != null) && __isset.spec_lb)
            {
                tmp175.Name = "spec_lb";
                tmp175.Type = TType.Struct;
                tmp175.ID   = 7;
                await oprot.WriteFieldBeginAsync(tmp175, cancellationToken);

                await Spec_lb.WriteAsync(oprot, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);

            await oprot.WriteStructEndAsync(cancellationToken);
        }
        finally
        {
            oprot.DecrementRecursionDepth();
        }
    }