예제 #1
0
 public Photo(PhotoId photoId, UserId userId, string fileName, byte[] fileUpload)
 {
     PhotoId     = photoId;
     UserId      = userId;
     FileName    = FieldChecker.NotEmpty(fileName);
     ImageSource = ImageSource.Upload;
 }
예제 #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);
 }
예제 #3
0
 public SocialNetwork(SocialNetworkId socialNetworkId, UserId userId, string url,
                      Network network)
 {
     SocialNetworkId = socialNetworkId;
     UserId          = userId;
     Network         = network;
     Url             = FieldChecker.NotEmpty(url, nameof(url));
 }
예제 #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;
 }
예제 #5
0
 internal void UpdatePhoto(string photoUrl)
 {
     this.Url      = FieldChecker.NotEmpty(photoUrl);
     this.FileName = Path.GetFileName(photoUrl);
 }
예제 #6
0
 internal void UpdatePhoto(string fileName, byte[] photoUpload)
 {
     this.FileName = FieldChecker.NotEmpty(fileName);
 }
예제 #7
0
 internal SocialNetwork UpdateUrl(string url)
 {
     this.Url = FieldChecker.NotEmpty(url, nameof(url));
     return(this);
 }