예제 #1
0
 /// <summary>
 /// String representation of the Recipient
 /// </summary>
 public override string ToString()
 {
     return(String.Format("{0} @ {1} ({2})", Person == null ? "none" : Person.ToString(), Institution == null ? "none" : Institution.ToString(), TelecomAddress == null ? "none" : TelecomAddress.ToString()));
 }
예제 #2
0
        /// <summary>
        /// Tests equality between this instance and another
        /// </summary>
        public bool Equals(Recipient other)
        {
            bool personEqual      = (Person == null && other.Person == null) || (Person != null && Person.Equals(other.Person));
            bool institutionEqual = (Institution == null && other.Institution == null) || (Institution != null && Institution.Equals(other.Institution));
            bool telecomEqual     = (TelecomAddress == null && other.TelecomAddress == null) || (TelecomAddress != null && TelecomAddress.Equals(other.TelecomAddress));

            return(personEqual && institutionEqual && telecomEqual);
        }