public static bool TryParse(string value, out IEmail email) { if (Assertion.IsEmail(value)) { email = new Email(value); return true; } email = null; return false; }
public AvatarConfiguration(string email, IAvatarFolder folder, int width = 100, AvatarImageExtension extension = AvatarImageExtension.Jpg, AvatarRating rating = AvatarRating.G, AvatarDefaultImage defaultimage = AvatarDefaultImage.NoImage) { Email = new Email(email); Folder = folder; ValidateRange(width); Width = width; FileName = Email.Hash; Extension = extension; Rating = rating; DefaultImage = defaultimage; }