Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (HasBoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (HasIntValue)
            {
                hash ^= IntValue.GetHashCode();
            }
            if (HasFloatValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(FloatValue);
            }
            if (HasStringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (HasBlobValue)
            {
                hash ^= BlobValue.GetHashCode();
            }
            if (HasUintValue)
            {
                hash ^= UintValue.GetHashCode();
            }
            hash ^= (int)typeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = (NullStringValue != null ? NullStringValue.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullStringValue != null ? NotNullStringValue.GetHashCode() : 0);
         result = (result * 397) ^ (NullStringArrayValue != null ? NullStringArrayValue.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullStringArrayValue != null ? NotNullStringArrayValue.GetHashCode() : 0);
         result = (result * 397) ^ (NullBoolValue.HasValue ? NullBoolValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullBoolValue.HasValue ? NotNullBoolValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ BoolValue.GetHashCode();
         result = (result * 397) ^ (NullIntValue.HasValue ? NullIntValue.Value : 0);
         result = (result * 397) ^ (NotNullIntValue.HasValue ? NotNullIntValue.Value : 0);
         result = (result * 397) ^ IntValue;
         result = (result * 397) ^ (NullDecimalValue.HasValue ? NullDecimalValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullDecimalValue.HasValue ? NotNullDecimalValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ DecimalValue.GetHashCode();
         result = (result * 397) ^ (NullGuidValue.HasValue ? NullGuidValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullGuidValue.HasValue ? NotNullGuidValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ GuidValue.GetHashCode();
         result = (result * 397) ^ (NullGuidArrayValue != null ? NullGuidArrayValue.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullGuidArrayValue != null ? NotNullGuidArrayValue.GetHashCode() : 0);
         result = (result * 397) ^ (NullDateTimeValue.HasValue ? NullDateTimeValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullDateTimeValue.HasValue ? NotNullDateTimeValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ (NullPartialDateValue.HasValue ? NullPartialDateValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullPartialDateValue.HasValue ? NotNullPartialDateValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ EnumValue.GetHashCode();
         result = (result * 397) ^ (NullEnumValue.HasValue ? NullEnumValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullEnumValue.HasValue ? NotNullEnumValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ EnumFlagsValue.GetHashCode();
         result = (result * 397) ^ (NullEnumFlagsValue.HasValue ? NullEnumFlagsValue.Value.GetHashCode() : 0);
         result = (result * 397) ^ (NotNullEnumFlagsValue.HasValue ? NotNullEnumFlagsValue.Value.GetHashCode() : 0);
         return(result);
     }
 }
Пример #3
0
                public override int GetHashCode()
                {
                    int hash = 1;

                    if (kindCase_ == KindOneofCase.StringValue)
                    {
                        hash ^= StringValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.FloatValue)
                    {
                        hash ^= FloatValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.DoubleValue)
                    {
                        hash ^= DoubleValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.IntValue)
                    {
                        hash ^= IntValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.UintValue)
                    {
                        hash ^= UintValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.SintValue)
                    {
                        hash ^= SintValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.BoolValue)
                    {
                        hash ^= BoolValue.GetHashCode();
                    }
                    hash ^= (int)kindCase_;
                    return(hash);
                }
Пример #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (kindCase_ == KindOneofCase.NullValue)
            {
                hash ^= NullValue.GetHashCode();
            }
            if (kindCase_ == KindOneofCase.NumberValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(NumberValue);
            }
            if (kindCase_ == KindOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (kindCase_ == KindOneofCase.BoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (kindCase_ == KindOneofCase.StructValue)
            {
                hash ^= StructValue.GetHashCode();
            }
            if (kindCase_ == KindOneofCase.ListValue)
            {
                hash ^= ListValue.GetHashCode();
            }
            hash ^= (int)kindCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #5
0
        /// <summary>
        /// Overriden. Returns a hash code for the current Object.
        /// </summary>
        /// <returns>A hash code for the current Object.</returns>
        public override int GetHashCode()
        {
            switch (ValueType)
            {
            case ValueTypeDefinitionData.Reference:
                return(ReferenceValue.GetHashCode());

            case ValueTypeDefinitionData.DateTime:
                return(DateTimeValue.GetHashCode());

            case ValueTypeDefinitionData.Bool:
                return(BoolValue.GetHashCode());

            case ValueTypeDefinitionData.Float:
                return(FloatValue.GetHashCode());

            case ValueTypeDefinitionData.Int:
                return(IntValue.GetHashCode());

            case ValueTypeDefinitionData.StringNonUnicode:
                return(StringNonUnicodeValue.GetHashCode());

            default:
                return(base.GetHashCode());
            }
        }
Пример #6
0
 /// <summary>Serves as the default hash function.</summary>
 /// <returns>A hash code for the current object.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Keywords?.GetCollectionHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (OtherData?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ BoolValue.GetHashCode();
         return(hashCode);
     }
 }
Пример #7
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (column_ != null)
            {
                hash ^= Column.GetHashCode();
            }
            if (NegateComparator != false)
            {
                hash ^= NegateComparator.GetHashCode();
            }
            if (Comparator != global::LukeKennedy.LSQL.Net.Comparator.UnknownComparator)
            {
                hash ^= Comparator.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.Int64Value)
            {
                hash ^= Int64Value.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.Uint64Value)
            {
                hash ^= Uint64Value.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.DoubleValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (valueCase_ == ValueOneofCase.BoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.BytesValue)
            {
                hash ^= BytesValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.TimeValue)
            {
                hash ^= TimeValue.GetHashCode();
            }
            hash ^= (int)valueCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #8
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (BoolValue != false)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (Int32Value != 0)
            {
                hash ^= Int32Value.GetHashCode();
            }
            if (Uint32Value != 0)
            {
                hash ^= Uint32Value.GetHashCode();
            }
            if (Int64Value != 0L)
            {
                hash ^= Int64Value.GetHashCode();
            }
            if (Uint64Value != 0UL)
            {
                hash ^= Uint64Value.GetHashCode();
            }
            if (Sint32Value != 0)
            {
                hash ^= Sint32Value.GetHashCode();
            }
            if (Sint64Value != 0L)
            {
                hash ^= Sint64Value.GetHashCode();
            }
            if (FloatValue != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FloatValue);
            }
            if (DoubleValue != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (EnumValue != 0)
            {
                hash ^= EnumValue.GetHashCode();
            }
            if (StringValue.Length != 0)
            {
                hash ^= StringValue.GetHashCode();
            }
            return(hash);
        }
Пример #9
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.IntValue)
            {
                hash ^= IntValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.LongIntValue)
            {
                hash ^= LongIntValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.BoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.BytesValue)
            {
                hash ^= BytesValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.FloatValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FloatValue);
            }
            if (valueCase_ == ValueOneofCase.DoubleValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (ObjectTypeId != 0)
            {
                hash ^= ObjectTypeId.GetHashCode();
            }
            hash ^= (int)valueCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #10
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (HasBoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (HasIntValue)
            {
                hash ^= IntValue.GetHashCode();
            }
            if (HasFloatValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(FloatValue);
            }
            if (HasStringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (HasBlobValue)
            {
                hash ^= BlobValue.GetHashCode();
            }
            if (HasMessageValue)
            {
                hash ^= MessageValue.GetHashCode();
            }
            if (HasFourccValue)
            {
                hash ^= FourccValue.GetHashCode();
            }
            if (HasUintValue)
            {
                hash ^= UintValue.GetHashCode();
            }
            if (HasEntityIdValue)
            {
                hash ^= EntityIdValue.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #11
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = GuidValue.GetHashCode();
         result = (result * 397) ^ (StringValue != null ? StringValue.GetHashCode() : 0);
         result = (result * 397) ^ IntValue;
         result = (result * 397) ^ LongValue.GetHashCode();
         result = (result * 397) ^ BoolValue.GetHashCode();
         result = (result * 397) ^ ByteValue.GetHashCode();
         result = (result * 397) ^ DecimalValue.GetHashCode();
         result = (result * 397) ^ DoubleValue.GetHashCode();
         result = (result * 397) ^ DateTimeValue.GetHashCode();
         result = (result * 397) ^ MaybeMoney.GetHashCode();
         return(result);
     }
 }
Пример #12
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (BoolValue != false)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (IntValue != 0L)
            {
                hash ^= IntValue.GetHashCode();
            }
            if (FloatValue != 0D)
            {
                hash ^= FloatValue.GetHashCode();
            }
            if (StringValue.Length != 0)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (BlobValue.Length != 0)
            {
                hash ^= BlobValue.GetHashCode();
            }
            if (MessageValue.Length != 0)
            {
                hash ^= MessageValue.GetHashCode();
            }
            if (FourccValue.Length != 0)
            {
                hash ^= FourccValue.GetHashCode();
            }
            if (UintValue != 0UL)
            {
                hash ^= UintValue.GetHashCode();
            }
            if (entityIdValue_ != null)
            {
                hash ^= EntityIdValue.GetHashCode();
            }
            return(hash);
        }
Пример #13
0
        public override int GetHashCode()
        {
            int hash = 1;

            hash ^= Labels.GetHashCode();
            if (startTime_ != null)
            {
                hash ^= StartTime.GetHashCode();
            }
            if (endTime_ != null)
            {
                hash ^= EndTime.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.BoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.Int64Value)
            {
                hash ^= Int64Value.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.DoubleValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (valueCase_ == ValueOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.DistributionValue)
            {
                hash ^= DistributionValue.GetHashCode();
            }
            hash ^= (int)valueCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #14
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (TypeName.Length != 0)
            {
                hash ^= TypeName.GetHashCode();
            }
            if (oneofValueCase_ == OneofValueOneofCase.BoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (oneofValueCase_ == OneofValueOneofCase.IntValue)
            {
                hash ^= IntValue.GetHashCode();
            }
            if (oneofValueCase_ == OneofValueOneofCase.DoubleValue)
            {
                hash ^= DoubleValue.GetHashCode();
            }
            if (oneofValueCase_ == OneofValueOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (ProtoDesc.Length != 0)
            {
                hash ^= ProtoDesc.GetHashCode();
            }
            hash ^= (int)oneofValueCase_;
            return(hash);
        }
Пример #15
0
            public override int GetHashCode()
            {
                int hash = 1;

                if (Key.Length != 0)
                {
                    hash ^= Key.GetHashCode();
                }
                if (typedValueCase_ == TypedValueOneofCase.BoolValue)
                {
                    hash ^= BoolValue.GetHashCode();
                }
                if (typedValueCase_ == TypedValueOneofCase.IntValue)
                {
                    hash ^= IntValue.GetHashCode();
                }
                hash ^= (int)typedValueCase_;
                if (_unknownFields != null)
                {
                    hash ^= _unknownFields.GetHashCode();
                }
                return(hash);
            }
Пример #16
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (valueCase_ == ValueOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.BoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.FloatValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FloatValue);
            }
            hash ^= (int)valueCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #17
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (BaseName.Length != 0)
            {
                hash ^= BaseName.GetHashCode();
            }
            if (BaseTime != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(BaseTime);
            }
            if (BaseUnit.Length != 0)
            {
                hash ^= BaseUnit.GetHashCode();
            }
            if (BaseVersion != 0)
            {
                hash ^= BaseVersion.GetHashCode();
            }
            if (baseValueOptionalCase_ == BaseValueOptionalOneofCase.BaseValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(BaseValue);
            }
            if (baseSumOptionalCase_ == BaseSumOptionalOneofCase.BaseSum)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(BaseSum);
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Unit.Length != 0)
            {
                hash ^= Unit.GetHashCode();
            }
            if (Time != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Time);
            }
            if (UpdateTime != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(UpdateTime);
            }
            if (valueOneofCase_ == ValueOneofOneofCase.Value)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Value);
            }
            if (valueOneofCase_ == ValueOneofOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (valueOneofCase_ == ValueOneofOneofCase.DataValue)
            {
                hash ^= DataValue.GetHashCode();
            }
            if (valueOneofCase_ == ValueOneofOneofCase.BoolValue)
            {
                hash ^= BoolValue.GetHashCode();
            }
            if (sumOptionalCase_ == SumOptionalOneofCase.Sum)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Sum);
            }
            hash ^= (int)baseValueOptionalCase_;
            hash ^= (int)baseSumOptionalCase_;
            hash ^= (int)valueOneofCase_;
            hash ^= (int)sumOptionalCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }