public User(string name, string userName, EmailVO email, PasswordVO password, bool administrator) { Id = Guid.NewGuid(); Name = name; UserName = userName; Email = email.ToString(); Password = password.ToString(); Administrator = administrator; this.Validate(); this.Password = this.CriptPassword(password.ToString()); }
public Email(EmailVO to, EmailVO from, string body, Project project, string subject) { To = to.ToString(); From = from.ToString(); Body = body; Project = project; Id = Guid.NewGuid(); Status = StatusMailEnum.Sending; Date = DateTime.Now; Subject = subject; this.Validate(); }
public async Task Send( EmailVO to, string templateID, params KeyValuePair <string, string>[] values) { var mailEvent = new SendMailEvent { To = to.ToString(), TemplateID = templateID, ProjectApiKey = Guid.Parse(_settings.ProjectApiKey) }; foreach (var value in values) { mailEvent.KeyValues.Add(value); } await _bus.Publish(mailEvent); }
public void Deve_Retornar_Email_Valido(string email) { var vo = new EmailVO(email); Assert.Equal(email, vo.ToString()); }
public void SetEmail(EmailVO value) { this.Email = value.ToString(); this.Validate(); }