Example #1
0
 public Alias(string recipient, ActivationCriteria activationCriteria, MailDomain domain)
     : base()
 {
     Recipient          = recipient;
     ActivationCriteria = activationCriteria;
     Domain             = domain;
 }
Example #2
0
        public Alias AliasFrom(string recipient)
        {
            if (recipient is null)
            {
                throw new ArgumentNullException(nameof(recipient));
            }

            var generator          = new ActivationCodeGenerator();
            var activationCode     = generator.GenerateCode();
            var activationCriteria = new ActivationCriteria(activationCode);

            return(new Alias(recipient, activationCriteria, this));
        }