コード例 #1
0
ファイル: Email.cs プロジェクト: netdragoon/gravatar
 public static bool TryParse(string value, out IEmail email)
 {
     if (Assertion.IsEmail(value))
     {
         email = new Email(value);
         return true;
     }
     email = null;
     return false;
 }
コード例 #2
0
 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;
 }