Example #1
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);
        }
Example #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.LongValue)
            {
                hash ^= LongValue.GetHashCode();
            }
            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);
        }
Example #4
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);
        }
Example #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = TypeHashCode;
         result = (result * 397) ^ (StringValue?.GetHashCode() ?? 0);
         result = (result * 397) ^ (LongValue?.GetHashCode() ?? 0);
         result = (result * 397) ^ (Document?.GetHashCode() ?? 0);
         return(result);
     }
 }
Example #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ IsInteger.GetHashCode();
         hashCode = (hashCode * 397) ^ LongValue.GetHashCode();
         hashCode = (hashCode * 397) ^ DoubleValue.GetHashCode();
         return(hashCode);
     }
 }
Example #7
0
            public override int GetHashCode()
            {
                var hashCode = -894682935;

                hashCode = hashCode * -1521134295 + EqualityComparer <DateTime?> .Default.GetHashCode(NullableDateTimeValue);

                hashCode = hashCode * -1521134295 + DateTimeValue.GetHashCode();
                hashCode = hashCode * -1521134295 + EqualityComparer <DateTimeOffset?> .Default.GetHashCode(NullableDateTimeOffsetValue);

                hashCode = hashCode * -1521134295 + EqualityComparer <DateTimeOffset> .Default.GetHashCode(DateTimeOffsetValue);

                hashCode = hashCode * -1521134295 + LongValue.GetHashCode();
                hashCode = hashCode * -1521134295 + EqualityComparer <long?> .Default.GetHashCode(NullableLongValue);

                return(hashCode);
            }
Example #8
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);
     }
 }
Example #9
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (EventId != 0UL)
            {
                hash ^= EventId.GetHashCode();
            }
            if (EventType != 0)
            {
                hash ^= EventType.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.LongValue)
            {
                hash ^= LongValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.DoubleValue)
            {
                hash ^= DoubleValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.SkeletonValue)
            {
                hash ^= SkeletonValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.ObjectValue)
            {
                hash ^= ObjectValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            if (valueTypeCase_ == ValueTypeOneofCase.CustomValue)
            {
                hash ^= CustomValue.GetHashCode();
            }
            if (appTypeCase_ == AppTypeOneofCase.AppId)
            {
                hash ^= AppId.GetHashCode();
            }
            hash ^= (int)valueTypeCase_;
            hash ^= (int)appTypeCase_;
            return(hash);
        }
        public override int GetHashCode()
        {
            int hashCode = 0;

            if (this.GetType() == typeof(LongPropertyValue))
            {
                hashCode = LongValue.GetHashCode();
            }
            else if (this.GetType() == typeof(LongPropertyValues))
            {
                foreach (long longValue in LongValues)
                {
                    hashCode += longValue.GetHashCode();
                }
            }
            else if (this.GetType() == typeof(FloatPropertyValue))
            {
                hashCode = FloatValue.GetHashCode();
            }
            else if (this.GetType() == typeof(StringPropertyValue))
            {
                hashCode = StringValue.GetHashCode();
            }
            else if (this.GetType() == typeof(FloatPropertyValues))
            {
                foreach (float floatValue in FloatValues)
                {
                    hashCode += floatValue.GetHashCode();
                }
            }
            else if (this.GetType() == typeof(StringPropertyValues))
            {
                foreach (String stringValue in StringValues)
                {
                    hashCode += stringValue.GetHashCode();
                }
            }

            return(hashCode);
        }
Example #11
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CharValue.GetHashCode();
         hashCode = (hashCode * 397) ^ ByteValue.GetHashCode();
         hashCode = (hashCode * 397) ^ SByteValue.GetHashCode();
         hashCode = (hashCode * 397) ^ ShortValue.GetHashCode();
         hashCode = (hashCode * 397) ^ UShortValue.GetHashCode();
         hashCode = (hashCode * 397) ^ IntValue;
         hashCode = (hashCode * 397) ^ (int)UIntValue;
         hashCode = (hashCode * 397) ^ LongValue.GetHashCode();
         hashCode = (hashCode * 397) ^ ULongValue.GetHashCode();
         hashCode = (hashCode * 397) ^ FloatValue.GetHashCode();
         hashCode = (hashCode * 397) ^ DoubleValue.GetHashCode();
         hashCode = (hashCode * 397) ^ DecimalValue.GetHashCode();
         hashCode = (hashCode * 397) ^ DateTimeValue.GetHashCode();
         hashCode = (hashCode * 397) ^ GuidValue.GetHashCode();
         hashCode = (hashCode * 397) ^ StringValue.GetHashCode();
         return(hashCode);
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.LongValue)
            {
                hash ^= LongValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.DoubleValue)
            {
                hash ^= DoubleValue.GetHashCode();
            }
            if (valueCase_ == ValueOneofCase.StringValue)
            {
                hash ^= StringValue.GetHashCode();
            }
            hash ^= (int)valueCase_;
            return(hash);
        }
Example #13
0
 public override int GetHashCode()
 {
     return(LongValue.GetHashCode());
 }