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