示例#1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("TColumnValue(");

            sb.Append("BoolVal: ");
            sb.Append(BoolVal == null ? "<null>" : BoolVal.ToString());
            sb.Append(",ByteVal: ");
            sb.Append(ByteVal == null ? "<null>" : ByteVal.ToString());
            sb.Append(",I16Val: ");
            sb.Append(I16Val == null ? "<null>" : I16Val.ToString());
            sb.Append(",I32Val: ");
            sb.Append(I32Val == null ? "<null>" : I32Val.ToString());
            sb.Append(",I64Val: ");
            sb.Append(I64Val == null ? "<null>" : I64Val.ToString());
            sb.Append(",DoubleVal: ");
            sb.Append(DoubleVal == null ? "<null>" : DoubleVal.ToString());
            sb.Append(",StringVal: ");
            sb.Append(StringVal == null ? "<null>" : StringVal.ToString());
            sb.Append(")");
            return(sb.ToString());
        }
示例#2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (StringVal != null ? StringVal.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IntVal;
         hashCode = (hashCode * 397) ^ BooleanVal.GetHashCode();
         hashCode = (hashCode * 397) ^ ByteVal.GetHashCode();
         hashCode = (hashCode * 397) ^ LongVal.GetHashCode();
         hashCode = (hashCode * 397) ^ FloatVal.GetHashCode();
         hashCode = (hashCode * 397) ^ DoubleVal.GetHashCode();
         hashCode = (hashCode * 397) ^ DateTimeVal.GetHashCode();
         hashCode = (hashCode * 397) ^ ShortVal.GetHashCode();
         hashCode = (hashCode * 397) ^ UShortVal.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)UIntVal;
         hashCode = (hashCode * 397) ^ ULongVal.GetHashCode();
         hashCode = (hashCode * 397) ^ SByteVal.GetHashCode();
         hashCode = (hashCode * 397) ^ CharVal.GetHashCode();
         return(hashCode);
     }
 }
示例#3
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (__isset.boolVal)
                {
                    hashcode = (hashcode * 397) + BoolVal.GetHashCode();
                }
                if (__isset.byteVal)
                {
                    hashcode = (hashcode * 397) + ByteVal.GetHashCode();
                }
                if (__isset.i16Val)
                {
                    hashcode = (hashcode * 397) + I16Val.GetHashCode();
                }
                if (__isset.i32Val)
                {
                    hashcode = (hashcode * 397) + I32Val.GetHashCode();
                }
                if (__isset.i64Val)
                {
                    hashcode = (hashcode * 397) + I64Val.GetHashCode();
                }
                if (__isset.doubleVal)
                {
                    hashcode = (hashcode * 397) + DoubleVal.GetHashCode();
                }
                if (__isset.stringVal)
                {
                    hashcode = (hashcode * 397) + StringVal.GetHashCode();
                }
                if (__isset.binaryVal)
                {
                    hashcode = (hashcode * 397) + BinaryVal.GetHashCode();
                }
            }
            return(hashcode);
        }
示例#4
0
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("TColumn");

            oprot.WriteStructBegin(struc);
            TField field = new TField();

            if (BoolVal != null && __isset.boolVal)
            {
                field.Name = "boolVal";
                field.Type = TType.Struct;
                field.ID   = 1;
                oprot.WriteFieldBegin(field);
                BoolVal.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (ByteVal != null && __isset.byteVal)
            {
                field.Name = "byteVal";
                field.Type = TType.Struct;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                ByteVal.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (I16Val != null && __isset.i16Val)
            {
                field.Name = "i16Val";
                field.Type = TType.Struct;
                field.ID   = 3;
                oprot.WriteFieldBegin(field);
                I16Val.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (I32Val != null && __isset.i32Val)
            {
                field.Name = "i32Val";
                field.Type = TType.Struct;
                field.ID   = 4;
                oprot.WriteFieldBegin(field);
                I32Val.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (I64Val != null && __isset.i64Val)
            {
                field.Name = "i64Val";
                field.Type = TType.Struct;
                field.ID   = 5;
                oprot.WriteFieldBegin(field);
                I64Val.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (DoubleVal != null && __isset.doubleVal)
            {
                field.Name = "doubleVal";
                field.Type = TType.Struct;
                field.ID   = 6;
                oprot.WriteFieldBegin(field);
                DoubleVal.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (StringVal != null && __isset.stringVal)
            {
                field.Name = "stringVal";
                field.Type = TType.Struct;
                field.ID   = 7;
                oprot.WriteFieldBegin(field);
                StringVal.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (BinaryVal != null && __isset.binaryVal)
            {
                field.Name = "binaryVal";
                field.Type = TType.Struct;
                field.ID   = 8;
                oprot.WriteFieldBegin(field);
                BinaryVal.Write(oprot);
                oprot.WriteFieldEnd();
            }
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }
示例#5
0
        public override string ToString()
        {
            var  sb      = new StringBuilder("TColumn(");
            bool __first = true;

            if (BoolVal != null && __isset.boolVal)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("BoolVal: ");
                sb.Append(BoolVal == null ? "<null>" : BoolVal.ToString());
            }
            if (ByteVal != null && __isset.byteVal)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("ByteVal: ");
                sb.Append(ByteVal == null ? "<null>" : ByteVal.ToString());
            }
            if (I16Val != null && __isset.i16Val)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("I16Val: ");
                sb.Append(I16Val == null ? "<null>" : I16Val.ToString());
            }
            if (I32Val != null && __isset.i32Val)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("I32Val: ");
                sb.Append(I32Val == null ? "<null>" : I32Val.ToString());
            }
            if (I64Val != null && __isset.i64Val)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("I64Val: ");
                sb.Append(I64Val == null ? "<null>" : I64Val.ToString());
            }
            if (DoubleVal != null && __isset.doubleVal)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("DoubleVal: ");
                sb.Append(DoubleVal == null ? "<null>" : DoubleVal.ToString());
            }
            if (StringVal != null && __isset.stringVal)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("StringVal: ");
                sb.Append(StringVal == null ? "<null>" : StringVal.ToString());
            }
            if (BinaryVal != null && __isset.binaryVal)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("BinaryVal: ");
                sb.Append(BinaryVal == null ? "<null>" : BinaryVal.ToString());
            }
            sb.Append(")");
            return(sb.ToString());
        }
示例#6
0
        public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
            oprot.IncrementRecursionDepth();
            try
            {
                var struc = new TStruct("TColumn");
                await oprot.WriteStructBeginAsync(struc, cancellationToken);

                var field = new TField();
                if (BoolVal != null && __isset.boolVal)
                {
                    field.Name = "boolVal";
                    field.Type = TType.Struct;
                    field.ID   = 1;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await BoolVal.WriteAsync(oprot, cancellationToken);

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

                    await ByteVal.WriteAsync(oprot, cancellationToken);

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

                    await I16Val.WriteAsync(oprot, cancellationToken);

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

                    await I32Val.WriteAsync(oprot, cancellationToken);

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

                    await I64Val.WriteAsync(oprot, cancellationToken);

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

                    await DoubleVal.WriteAsync(oprot, cancellationToken);

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

                    await StringVal.WriteAsync(oprot, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (BinaryVal != null && __isset.binaryVal)
                {
                    field.Name = "binaryVal";
                    field.Type = TType.Struct;
                    field.ID   = 8;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await BinaryVal.WriteAsync(oprot, cancellationToken);

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

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