public static Person Create(PersonName name, OfficeLocation officeLocation, EmailAddress emailAddress) { return(new Person( name ?? throw new ArgumentNullException(nameof(name)), officeLocation ?? throw new ArgumentNullException(nameof(officeLocation)), emailAddress ?? throw new ArgumentNullException(nameof(emailAddress)))); }
protected override int GetHashCodeCore() { unchecked { var hashCode = Name.GetHashCode(); hashCode = (hashCode * 397) ^ OfficeLocation.GetHashCode(); hashCode = (hashCode * 397) ^ EmailAddress.GetHashCode(); return(hashCode); } }
internal void UpdateAwardWinnerOfficeLocation(OfficeLocation newOfficeLocation) { Person = Person.UpdateOfficeLocation(newOfficeLocation); }
private Person(PersonName name, OfficeLocation officeLocation, EmailAddress emailAddress) { Name = name; OfficeLocation = officeLocation; EmailAddress = emailAddress; }
public Person UpdateOfficeLocation(OfficeLocation newOfficeLocation) { return(Create(Name, newOfficeLocation, EmailAddress)); }