/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current <see cref="T:System.Object"/>. /// </returns> /// <filterpriority>2</filterpriority> public override int GetHashCode() { unchecked { int result = FirstStreetAddress != null?FirstStreetAddress.GetHashCode() : 0; result = (result * 397) ^ (SecondStreetAddress != null ? SecondStreetAddress.GetHashCode() : 0); result = (result * 397) ^ (CityName != null ? CityName.GetHashCode() : 0); result = (result * 397) ^ (CountyArea != null ? CountyArea.GetHashCode() : 0); result = (result * 397) ^ (StateProvince != null ? StateProvince.GetHashCode() : 0); result = (result * 397) ^ (Country != null ? Country.GetHashCode() : 0); result = (result * 397) ^ (PostalCode != null ? PostalCode.GetHashCode() : 0); return(result); } }
/// <summary> /// Initializes a new instance of the <see cref="Address"/> class. /// </summary> /// <param name="firstStreetAddress">The first street address.</param> /// <param name="secondStreetAddress">The second street address.</param> /// <param name="cityName">Name of the city.</param> /// <param name="countyArea">The county area.</param> /// <param name="stateProvince">The state province.</param> /// <param name="country">The country.</param> /// <param name="postalCode">The postal code.</param> public Address( string firstStreetAddress, string secondStreetAddress, string cityName, CountyArea countyArea, StateProvince stateProvince, Country country, PostalCode postalCode) { Check.IsNotNullOrWhitespace(firstStreetAddress, () => FirstStreetAddress); Check.IsNotNullOrWhitespace(cityName, () => CityName); Check.IsNotNull(stateProvince, () => StateProvince); FirstStreetAddress = firstStreetAddress; SecondStreetAddress = string.IsNullOrWhiteSpace(secondStreetAddress) ? null : secondStreetAddress; CityName = cityName; CountyArea = countyArea; StateProvince = stateProvince; Country = country; PostalCode = postalCode; }
/// <summary> /// Revises the county area. /// </summary> /// <param name="countyArea">The county area.</param> public virtual void ReviseCountyArea( CountyArea countyArea ) { CountyArea = countyArea; }
/// <summary> /// Assigns the birth county area. /// </summary> /// <param name="birthCountyArea">The birth county area.</param> /// <returns>A PatientBirthInfoBuilder.</returns> public PatientBirthInfoBuilder WithBirthCountyArea(CountyArea birthCountyArea) { _birthCountyArea = birthCountyArea; return this; }
/// <summary> /// Assigns the county area. /// </summary> /// <param name="countyArea">The county area.</param> /// <returns>A LocationProfileBuilder.</returns> public LocationProfileBuilder WithCountyArea(CountyArea countyArea) { _countyArea = countyArea; return this; }
/// <summary> /// Assigns the county area. /// </summary> /// <param name="countyArea">The county area.</param> /// <returns>An AddressBuilder.</returns> public AddressBuilder WithCountyArea(CountyArea countyArea) { _countyArea = countyArea; return(this); }
/// <summary> /// Assigns the county area. /// </summary> /// <param name="countyArea">The county area.</param> /// <returns>An AddressBuilder.</returns> public AddressBuilder WithCountyArea(CountyArea countyArea) { _countyArea = countyArea; return this; }