Esempio n. 1
0
        /// <summary>
        /// Checks to see if two UnsuccessAddresses are equal.
        /// </summary>
        /// <param name="obj">The UnsuccessAddresses to check</param>
        /// <returns>true if obj and this are equal</returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (this.GetType() != obj.GetType())
            {
                return(false);
            }

            DestinationAddress da = (DestinationAddress)obj;

            if (!da.IsDistributionList)
            {
                // value member check
                return
                    (_DestinationAddressTon.Equals(da._DestinationAddressTon) &&
                     _DestinationAddressNpi.Equals(da._DestinationAddressNpi) &&
                     _DestinationAddress.Equals(da._DestinationAddress));
            }
            else
            {
                return(_DistributionList.Equals(da._DistributionList));
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Clones this DestinationAddress.
        /// </summary>
        /// <returns>The cloned object.</returns>
        public object Clone()
        {
            DestinationAddress temp = null;

            if (!this.IsDistributionList)
            {
                temp = new DestinationAddress(
                    _DestinationAddressTon, _DestinationAddressNpi, _DestinationAddress);
            }
            else
            {
                temp = new DestinationAddress(_DistributionList);
            }

            temp._IsDistributionList = this.IsDistributionList;

            return(temp);
        }