Esempio n. 1
0
 public Photo(PhotoId photoId, UserId userId, string fileName, byte[] fileUpload)
 {
     PhotoId     = photoId;
     UserId      = userId;
     FileName    = FieldChecker.NotEmpty(fileName);
     ImageSource = ImageSource.Upload;
 }
Esempio n. 2
0
 public Photo(PhotoId photoId, UserId userId, string url)
 {
     PhotoId     = photoId;
     UserId      = userId;
     Url         = FieldChecker.NotEmpty(url);
     ImageSource = ImageSource.Url;
     FileName    = Path.GetFileName(url);
 }
Esempio n. 3
0
 public SocialNetwork(SocialNetworkId socialNetworkId, UserId userId, string url,
                      Network network)
 {
     SocialNetworkId = socialNetworkId;
     UserId          = userId;
     Network         = network;
     Url             = FieldChecker.NotEmpty(url, nameof(url));
 }
Esempio n. 4
0
 public User(UserId userId, string firstName, string lastName, string email,
             string description)
 {
     Id            = userId.Value;
     FirstName     = FieldChecker.NotEmpty(firstName, nameof(firstName));
     LastName      = FieldChecker.NotEmpty(lastName, nameof(lastName));
     Email         = FieldChecker.NotEmpty(email, nameof(email));
     CurrentStatus = UserStatus.Pending;
     CreationDate  = DateTime.UtcNow;
     UserId        = userId;
     Description   = description;
 }
Esempio n. 5
0
 internal void UpdatePhoto(string photoUrl)
 {
     this.Url      = FieldChecker.NotEmpty(photoUrl);
     this.FileName = Path.GetFileName(photoUrl);
 }
Esempio n. 6
0
 internal void UpdatePhoto(string fileName, byte[] photoUpload)
 {
     this.FileName = FieldChecker.NotEmpty(fileName);
 }
Esempio n. 7
0
 internal SocialNetwork UpdateUrl(string url)
 {
     this.Url = FieldChecker.NotEmpty(url, nameof(url));
     return(this);
 }