public override Int32 GetHashCode()
        {
            var hash = 1374496523;

            unchecked {
                hash = (hash * -1521134295) + Id.GetHashCode();
                hash = (hash * -1521134295) + VersionedId.GetHashCode();
                hash = (hash * -1521134295) + Added.GetHashCode();
                if (IsTValueAValueType || !ReferenceEquals(Value, null))
                {
                    hash = (hash * -1521134295) + ValueEqualityComparer.GetHashCode(Value);
                }
            }
            return(hash);
        }
Ejemplo n.º 2
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (Id.Length != 0)
        {
            hash ^= Id.GetHashCode();
        }
        if (Version != 0UL)
        {
            hash ^= Version.GetHashCode();
        }
        if (eventCase_ == EventOneofCase.Added)
        {
            hash ^= Added.GetHashCode();
        }
        if (eventCase_ == EventOneofCase.Decremented)
        {
            hash ^= Decremented.GetHashCode();
        }
        if (eventCase_ == EventOneofCase.Incremented)
        {
            hash ^= Incremented.GetHashCode();
        }
        if (eventCase_ == EventOneofCase.NameChanged)
        {
            hash ^= NameChanged.GetHashCode();
        }
        if (eventCase_ == EventOneofCase.Removed)
        {
            hash ^= Removed.GetHashCode();
        }
        hash ^= (int)eventCase_;
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }