コード例 #1
0
ファイル: Address.cs プロジェクト: girish66/REM
        /// <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);
            }
        }
コード例 #2
0
ファイル: Address.cs プロジェクト: girish66/REM
        /// <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;
        }
コード例 #3
0
ファイル: PatientContact.cs プロジェクト: divyang4481/REM
 /// <summary>
 /// Revises the county area.
 /// </summary>
 /// <param name="countyArea">The county area.</param>
 public virtual void ReviseCountyArea( CountyArea countyArea )
 {
     CountyArea = countyArea;
 }
コード例 #4
0
 /// <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;
 }
コード例 #5
0
 /// <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;
 }
コード例 #6
0
ファイル: AddressBuilder.cs プロジェクト: girish66/REM
 /// <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);
 }
コード例 #7
0
ファイル: AddressBuilder.cs プロジェクト: divyang4481/REM
 /// <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;
 }