Exemple #1
0
        public int GetHashCode(IJsonNotification obj)
        {
            if (obj == null)
            {
                return(0);
            }

            unchecked
            {
                var hashCode = obj.Id?.GetHashCode() ?? 0;
                hashCode = (hashCode * 397) ^ obj.Unread.GetHashCode();
                hashCode = (hashCode * 397) ^ obj.Type.GetHashCode();
                hashCode = (hashCode * 397) ^ obj.Date.GetHashCode();
                hashCode = (hashCode * 397) ^ Instance.GetHashCode(obj.Data);
                hashCode = (hashCode * 397) ^ Instance.GetHashCode(obj.MemberCreator);
                return(hashCode);
            }
        }
Exemple #2
0
        public bool Equals(IJsonNotification x, IJsonNotification y)
        {
            if (x == null && y != null)
            {
                return(false);
            }
            if (x != null && y == null)
            {
                return(false);
            }
            if (x == null)
            {
                return(true);
            }

            return(x.Type == y.Type &&
                   Instance.Equals(x.Data, y.Data) &&
                   x.Date == y.Date &&
                   Instance.Equals(x.MemberCreator, y.MemberCreator) &&
                   x.Unread == y.Unread &&
                   x.Id == y.Id);
        }
Exemple #3
0
 internal Notification(IJsonNotification json, TrelloAuthorization auth)
     : this(json.Id, auth)
 {
     _context.Merge(json);
 }