public static MandrillMailAddress ToMandrillAddress(this MailAddressDto dto, MandrillMailAddressType type = MandrillMailAddressType.To)
 => dto == null ? null : new MandrillMailAddress
 {
     Email = dto.Address,
     Name  = dto.DisplayName,
     Type  = type
 };
 public static List <MandrillMailAddress> ToMandrillAddress(this IEnumerable <MailAddressDto> dto, MandrillMailAddressType type = MandrillMailAddressType.To)
 => dto.Select(x => ToMandrillAddress(x, type)).ToList();
예제 #3
0
 public void AddTo(string email, string name, MandrillMailAddressType? type)
 {
     To.Add(new MandrillMailAddress(email, name) {Type = type});
 }