Exemplo n.º 1
0
 public MessageMetadata(JObject metadata)
 {
     this.newUser              = (string)metadata[HikeConstants.NEW_USER] == "true";
     this.dndNumbers           = (JArray)metadata[HikeConstants.DND_NUMBERS];
     this.participantInfoState = ConvMessage.fromJSON(metadata);
     this.dndMissedCallNumber  = (string)metadata[HikeConstants.METADATA_DND];
     this.json = metadata;
 }
Exemplo n.º 2
0
        public override bool Equals(Object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            ConvMessage other = (ConvMessage)obj;

            if (IsSent != other.IsSent)
            {
                return(false);
            }
            if (Message == null)
            {
                if (other.Message != null)
                {
                    return(false);
                }
            }
            else if (Message.CompareTo(other.Message) != 0)
            {
                return(false);
            }
            if (Msisdn == null)
            {
                if (other.Msisdn != null)
                {
                    return(false);
                }
            }
            else if (Msisdn.CompareTo(other.Msisdn) != 0)
            {
                return(false);
            }
            if (MessageStatus.Equals(other.MessageStatus))
            {
                return(false);
            }
            if (Timestamp != other.Timestamp)
            {
                return(false);
            }
            return(true);
        }