public void SetContactDetails(ContactNumber contactNumber, EmailAddress emailAddress, WebsiteUrl websiteUrl) { Guard.Against.Null(contactNumber, nameof(contactNumber)); Guard.Against.Null(EmailAddress, nameof(EmailAddress)); Guard.Against.Null(WebsiteUrl, nameof(WebsiteUrl)); ContactNumber = contactNumber; EmailAddress = emailAddress; WebsiteUrl = websiteUrl; }
public static Organiser Create(string name, string description, ContactNumber contactNumber, EmailAddress emailAddress, WebsiteUrl websiteUrl) { Guard.Against.NullOrEmpty(name, nameof(name)); Guard.Against.NullOrEmpty(description, nameof(description)); Guard.Against.Null(contactNumber, nameof(contactNumber)); Guard.Against.Null(emailAddress, nameof(emailAddress)); Guard.Against.Null(websiteUrl, nameof(websiteUrl)); var organiser = new Organiser(OrganiserId.New()) { Name = name, Description = description, ContactNumber = contactNumber, EmailAddress = emailAddress, WebsiteUrl = websiteUrl }; return(organiser); }