public override bool Equals(object obj)
        {
            var station = obj as Station;

            if (obj == null)
            {
                return(false);
            }

            return((StationName == null && station.StationName == null ||
                    StationName != null && StationName.Equals(station.StationName)) &&
                   (StateCountryName == null && station.StateCountryName == null ||
                    StateCountryName != null && StateCountryName.Equals(station.StateCountryName)) &&
                   (StateProvinceAbbrev == null && station.StateProvinceAbbrev == null ||
                    StateProvinceAbbrev != null && StateProvinceAbbrev.Equals(station.StateProvinceAbbrev)) &&
                   (ICAO == null && station.ICAO == null ||
                    ICAO != null && ICAO.Equals(station.ICAO)) &&
                   (IATA == null && station.IATA == null ||
                    IATA != null && IATA.Equals(station.IATA)) &&
                   SYNOP == station.SYNOP &&
                   (Latitude == null && station.Latitude == null ||
                    Latitude != null && Latitude.Equals(station.Latitude)) &&
                   (Longitude == null && station.Longitude == null ||
                    Longitude != null && Longitude.Equals(station.Longitude)) &&
                   Elevation == station.Elevation &&
                   METAR == station.METAR &&
                   RADAR == station.RADAR &&
                   AviationFlag == station.AviationFlag &&
                   UpperAir == station.UpperAir &&
                   ObservationSystem == station.ObservationSystem &&
                   OfficeType == station.OfficeType &&
                   (Country == null && station.Country == null ||
                    Country != null && Country.Equals(station.Country)) &&
                   Priority == Priority);
        }
Exemple #2
0
        /// <summary>
        /// 是否相等
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            VelItem o = obj as VelItem;

            if (o == null)
            {
                return(false);
            }

            return(StationName.Equals(o.StationName));
        }
Exemple #3
0
 public override bool Equals(object obj)
 {
     return(Item.Id == ((ItemStock)obj).Item.Id && StationName.Equals(((ItemStock)obj).StationName));
 }
Exemple #4
0
 /// <summary>
 /// Compare THIS object to second one and return true when equals
 /// </summary>
 /// <param name="other">Second PowerShellStation object to compare with called object</param>
 /// <returns>True when PowerShellStation is equal</returns>
 public bool Equals(PowerShellStation other)
 {
     return(StationName.Equals(other.StationName));
 }