Esempio n. 1
0
        public void AddBcc(Account account)
        {
            _ = account ?? throw new ArgumentNullException(nameof(account));

            if (!MessagePersons.Any(x => x.Type == MessagePersonType.Bcc && x.Account == account))
            {
                MessagePersons.Add(new MessagePerson(account, this, MessagePersonType.Bcc));
            }
        }
Esempio n. 2
0
        public void SetSender(Account sender)
        {
            _ = sender ?? throw new ArgumentNullException(nameof(sender));

            var actualReceiver = MessagePersons.FirstOrDefault(x => x.Type == MessagePersonType.Sender);

            if (actualReceiver != null)
            {
                MessagePersons.Remove(actualReceiver);
            }
            MessagePersons.Add(new MessagePerson(sender, this, MessagePersonType.Sender));
        }