Пример #1
0
 public PrivateMessage(Message source)
 {
     From          = source.From;
     To            = source.To;
     Text          = source.Text;
     TimeStamp     = source.TimeStamp;
     RecipientPair = new PrivateMessagePair(source.From, source.To.Single());
 }
Пример #2
0
            public override bool Equals(object obj)
            {
                if (obj == null)
                {
                    return(false);
                }

                PrivateMessagePair recipientObj = obj as PrivateMessagePair;

                if (recipientObj == null)
                {
                    return(false);
                }
                return(Equals(recipientObj));
            }
Пример #3
0
            public bool Equals(PrivateMessagePair other)
            {
                if (other == null)
                {
                    return(false);
                }

                if (!From.Equals(other.From) && !From.Equals(other.To))
                {
                    return(false);
                }
                if (!To.Equals(other.To) && !To.Equals(other.From))
                {
                    return(false);
                }

                return(true);
            }