public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (Subject.Length != 0)
            {
                hash ^= Subject.GetHashCode();
            }
            if (Body.Length != 0)
            {
                hash ^= Body.GetHashCode();
            }
            if (sender_ != null)
            {
                hash ^= Sender.GetHashCode();
            }
            hash ^= recipients_.GetHashCode();
            if (viewedAt_ != null)
            {
                hash ^= ViewedAt.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
 public override int GetHashCode()
 {
     unchecked {
         const int randomPrime = 397;
         int       hashCode    = Id.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ DocumentId.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ UserId.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ ViewedAt.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 3
0
 public void MergeFrom(MailboxEntry other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Operations.Messaging.MailboxEntryIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.Subject.Length != 0)
     {
         Subject = other.Subject;
     }
     if (other.Body.Length != 0)
     {
         Body = other.Body;
     }
     if (other.sender_ != null)
     {
         if (sender_ == null)
         {
             sender_ = new global::HOLMS.Types.IAM.StaffMember();
         }
         Sender.MergeFrom(other.Sender);
     }
     recipients_.Add(other.recipients_);
     if (other.viewedAt_ != null)
     {
         if (viewedAt_ == null)
         {
             viewedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         ViewedAt.MergeFrom(other.ViewedAt);
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             createdAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.MessageId.Length != 0)
     {
         MessageId = other.MessageId;
     }
 }