예제 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (HasId)
            {
                hash ^= Id.GetHashCode();
            }
            if (HasName)
            {
                hash ^= Name.GetHashCode();
            }
            if (HasManufacturerName)
            {
                hash ^= ManufacturerName.GetHashCode();
            }
            if (HasOperatingSystemName)
            {
                hash ^= OperatingSystemName.GetHashCode();
            }
            if (Type != global::Google.Ads.GoogleAds.V6.Enums.MobileDeviceTypeEnum.Types.MobileDeviceType.Unspecified)
            {
                hash ^= Type.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (id_ != null)
            {
                hash ^= Id.GetHashCode();
            }
            if (name_ != null)
            {
                hash ^= Name.GetHashCode();
            }
            if (manufacturerName_ != null)
            {
                hash ^= ManufacturerName.GetHashCode();
            }
            if (operatingSystemName_ != null)
            {
                hash ^= OperatingSystemName.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #3
0
 /// <summary>
 ///     Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>A hash code for the current <see cref="T:System.Object" />.</returns>
 public override int GetHashCode()
 {
     return((Architecture.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(CompatibleIds) ? 0 : CompatibleIds.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(ExcludeIds) ? 0 : ExcludeIds.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(HardwareDescription) ? 0 : HardwareDescription.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(HardwareId) ? 0 : HardwareId.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(ManufacturerName) ? 0 : ManufacturerName.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(ServerName) ? 0 : ServerName.GetHashCode()));
 }