コード例 #1
0
ファイル: User.cs プロジェクト: YTakahashii/gRPC-Training
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserID.Length != 0)
            {
                hash ^= UserID.GetHashCode();
            }
            if (CityName.Length != 0)
            {
                hash ^= CityName.GetHashCode();
            }
            if (Password.Length != 0)
            {
                hash ^= Password.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
ファイル: TaCity.cs プロジェクト: VYurov2019/SideProjects
        public override int GetHashCode()
        {
            int hash = 17;

            hash = hash * 23 + (CityName == null ? 0 : CityName.GetHashCode());
            hash = hash * 23 + IsCityFrom.GetHashCode();
            return(hash);
        }
コード例 #3
0
 public override int GetHashCode()
 {
     return(IataCode.GetHashCode()
            ^ Type.GetHashCode()
            ^ Name.GetHashCode()
            ^ DetailedName.GetHashCode()
            ^ CityName.GetHashCode()
            ^ CountryName.GetHashCode()
            ^ Id?.GetHashCode() ?? 0);
 }
コード例 #4
0
 /// <summary>
 /// GetHashCode
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 17;
         hash = hash * 23 + CityName.GetHashCode();
         hash = hash * 23 + DistrictName.GetHashCode();
         hash = hash * 23 + CountyName.GetHashCode();
         hash = hash * 23 + ProvinceName.GetHashCode();
         hash = hash * 23 + CityDivisionCode.GetHashCode();
         return(hash);
     }
 }
コード例 #5
0
ファイル: Address.cs プロジェクト: gokulm/Asam-Beta
        /// <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);
            }
        }
コード例 #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = LocationId.GetHashCode();
         hashCode = (hashCode * 397) ^ (CountryCode != null ? CountryCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (RegionCode != null ? RegionCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CityName != null ? CityName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PostalCode != null ? PostalCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Latitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Longitude.GetHashCode();
         hashCode = (hashCode * 397) ^ MetroCode.GetHashCode();
         hashCode = (hashCode * 397) ^ (AreaCode != null ? AreaCode.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #7
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (IataAirportCode.Length != 0)
            {
                hash ^= IataAirportCode.GetHashCode();
            }
            if (IcaoAirportCode.Length != 0)
            {
                hash ^= IcaoAirportCode.GetHashCode();
            }
            if (CityName.Length != 0)
            {
                hash ^= CityName.GetHashCode();
            }
            if (localizedCityName_ != null)
            {
                hash ^= LocalizedCityName.GetHashCode();
            }
            if (AirportName.Length != 0)
            {
                hash ^= AirportName.GetHashCode();
            }
            if (localizedAirportName_ != null)
            {
                hash ^= LocalizedAirportName.GetHashCode();
            }
            if (CountryCode.Length != 0)
            {
                hash ^= CountryCode.GetHashCode();
            }
            if (Timezone.Length != 0)
            {
                hash ^= Timezone.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #8
0
ファイル: Weather.cs プロジェクト: vwied/grpc-cs-server
        public override int GetHashCode()
        {
            int hash = 1;

            if (ID != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(ID);
            }
            if (CityName.Length != 0)
            {
                hash ^= CityName.GetHashCode();
            }
            if (TempMax != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(TempMax);
            }
            if (TempMin != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(TempMin);
            }
            if (Wind != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Wind);
            }
            if (Type.Length != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #9
0
ファイル: Zipcode.cs プロジェクト: Saveyy/MixMix
 public override int GetHashCode()
 {
     return(Id.GetHashCode() ^ Country.GetHashCode() ^ CityName.GetHashCode() ^ Zip.GetHashCode());
 }
コード例 #10
0
 public override int GetHashCode()
 {
     return(CityName.GetHashCode() ^ TimeZoneId.GetHashCode());
 }