Пример #1
0
 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;
 }
Пример #2
0
        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);
        }