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

            if (commonTelemetry_ != null)
            {
                hash ^= CommonTelemetry.GetHashCode();
            }
            if (datapointValueCase_ == DatapointValueOneofCase.LongValue)
            {
                hash ^= LongValue.GetHashCode();
            }
            if (datapointValueCase_ == DatapointValueOneofCase.DoubleValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (datapointValueCase_ == DatapointValueOneofCase.BooleanValue)
            {
                hash ^= BooleanValue.GetHashCode();
            }
            if (datapointValueCase_ == DatapointValueOneofCase.Distribution)
            {
                hash ^= Distribution.GetHashCode();
            }
            if (MetricKind != 0)
            {
                hash ^= MetricKind.GetHashCode();
            }
            hash ^= (int)datapointValueCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #2
0
        public override int GetHashCode()
        {
            switch (Kind)
            {
            case JObjectKind.Array:
                return(ArrayValue.GetHashCode());

            case JObjectKind.Boolean:
                return(BooleanValue.GetHashCode());

            case JObjectKind.Null:
                return(0);

            case JObjectKind.Object:
                return(ObjectValue.GetHashCode());

            case JObjectKind.String:
                return(StringValue.GetHashCode());

            case JObjectKind.Number:
                if (IsFractional)
                {
                    return(DoubleValue.GetHashCode());
                }
                if (IsNegative)
                {
                    return(LongValue.GetHashCode());
                }
                return(ULongValue.GetHashCode());
            }
            return(0);
        }
Пример #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (valueCase_ == ValueOneofCase.BooleanValue)
            {
                hash ^= BooleanValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.Int64Value)
            {
                hash ^= Int64Value.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.FloatValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FloatValue);
            }
            if (valueCase_ == ValueOneofCase.DoubleValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (valueCase_ == ValueOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            hash ^= (int)valueCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (commonTelemetry_ != null)
            {
                hash ^= CommonTelemetry.GetHashCode();
            }
            if (LongValue != 0L)
            {
                hash ^= LongValue.GetHashCode();
            }
            if (DoubleValue != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (BooleanValue != false)
            {
                hash ^= BooleanValue.GetHashCode();
            }
            if (distribution_ != null)
            {
                hash ^= Distribution.GetHashCode();
            }
            if (MetricKind != 0)
            {
                hash ^= MetricKind.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #5
0
        /// <summary></summary>
        public override int GetHashCode()
        {
            var code = 13;

            code = (code * 7) + Id.GetHashCode();
            if (Attribute != null)
            {
                code = (code * 7) + Attribute.GetHashCode();
            }
            code = (code * 7) + NumericValue.GetHashCode();
            if (StringValueEnumerationKey != null)
            {
                code = (code * 7) + StringValueEnumerationKey.GetHashCode();
            }
            code = (code * 7) + BooleanValue.GetHashCode();
            if (PriorityEnumerationKey != null)
            {
                code = (code * 7) + PriorityEnumerationKey.GetHashCode();
            }
            if (ReliabilityEnumerationKey != null)
            {
                code = (code * 7) + ReliabilityEnumerationKey.GetHashCode();
            }
            var arrCode = 13;

            if (ArrayValue != null)
            {
                foreach (var item in ArrayValue)
                {
                    arrCode = (arrCode * 7) + item.GetHashCode();
                }
            }
            return(code + arrCode);
        }
Пример #6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (valueTypeCase_ == ValueTypeOneofCase.NullValue)
            {
                hash ^= NullValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.BooleanValue)
            {
                hash ^= BooleanValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.IntegerValue)
            {
                hash ^= IntegerValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.DoubleValue)
            {
                hash ^= DoubleValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.TimestampValue)
            {
                hash ^= TimestampValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.BytesValue)
            {
                hash ^= BytesValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.ReferenceValue)
            {
                hash ^= ReferenceValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.GeoPointValue)
            {
                hash ^= GeoPointValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.ArrayValue)
            {
                hash ^= ArrayValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.MapValue)
            {
                hash ^= MapValue.GetHashCode();
            }
            hash ^= (int)valueTypeCase_;
            return(hash);
        }
        public override int GetHashCode()
        {
            int hashCode = 1910658984;

            if (Name != null)
            {
                hashCode += Name.GetHashCode();
            }

            if (StringValue != null)
            {
                hashCode += StringValue.GetHashCode();
            }

            if (CustomAttributeDefinitionId != null)
            {
                hashCode += CustomAttributeDefinitionId.GetHashCode();
            }

            if (Type != null)
            {
                hashCode += Type.GetHashCode();
            }

            if (NumberValue != null)
            {
                hashCode += NumberValue.GetHashCode();
            }

            if (BooleanValue != null)
            {
                hashCode += BooleanValue.GetHashCode();
            }

            if (SelectionUidValues != null)
            {
                hashCode += SelectionUidValues.GetHashCode();
            }

            if (Key != null)
            {
                hashCode += Key.GetHashCode();
            }

            return(hashCode);
        }
                public override int GetHashCode()
                {
                    int hash = 1;

                    if (Type != 0)
                    {
                        hash ^= Type.GetHashCode();
                    }
                    if (valueCase_ == ValueOneofCase.Int32Value)
                    {
                        hash ^= Int32Value.GetHashCode();
                    }
                    if (valueCase_ == ValueOneofCase.Int64Value)
                    {
                        hash ^= Int64Value.GetHashCode();
                    }
                    if (valueCase_ == ValueOneofCase.FloatValue)
                    {
                        hash ^= FloatValue.GetHashCode();
                    }
                    if (valueCase_ == ValueOneofCase.DoubleValue)
                    {
                        hash ^= DoubleValue.GetHashCode();
                    }
                    if (valueCase_ == ValueOneofCase.BooleanValue)
                    {
                        hash ^= BooleanValue.GetHashCode();
                    }
                    if (valueCase_ == ValueOneofCase.StringValue)
                    {
                        hash ^= StringValue.GetHashCode();
                    }
                    if (valueCase_ == ValueOneofCase.BytesValue)
                    {
                        hash ^= BytesValue.GetHashCode();
                    }
                    if (valueCase_ == ValueOneofCase.MetaValue)
                    {
                        hash ^= MetaValue.GetHashCode();
                    }
                    hash ^= (int)valueCase_;
                    return(hash);
                }
Пример #9
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (feedAttributeId_ != null)
            {
                hash ^= FeedAttributeId.GetHashCode();
            }
            if (integerValue_ != null)
            {
                hash ^= IntegerValue.GetHashCode();
            }
            if (booleanValue_ != null)
            {
                hash ^= BooleanValue.GetHashCode();
            }
            if (stringValue_ != null)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (doubleValue_ != null)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.GetHashCode(DoubleValue);
            }
            if (priceValue_ != null)
            {
                hash ^= PriceValue.GetHashCode();
            }
            hash ^= integerValues_.GetHashCode();
            hash ^= booleanValues_.GetHashCode();
            hash ^= stringValues_.GetHashCode();
            hash ^= doubleValues_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }