Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (City.Length != 0)
            {
                hash ^= City.GetHashCode();
            }
            if (TemperatureC != 0)
            {
                hash ^= TemperatureC.GetHashCode();
            }
            if (TemperatureF != 0)
            {
                hash ^= TemperatureF.GetHashCode();
            }
            if (Summary.Length != 0)
            {
                hash ^= Summary.GetHashCode();
            }
            if (date_ != null)
            {
                hash ^= Date.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (creationTime_ != null)
            {
                hash ^= CreationTime.GetHashCode();
            }
            if (date_ != null)
            {
                hash ^= Date.GetHashCode();
            }
            if (City.Length != 0)
            {
                hash ^= City.GetHashCode();
            }
            if (Context != global::Forecast.Context.InSun)
            {
                hash ^= Context.GetHashCode();
            }
            if (TemperatureC != 0)
            {
                hash ^= TemperatureC.GetHashCode();
            }
            if (Summary != global::Forecast.Summary.Freezing)
            {
                hash ^= Summary.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 public WeatherForecast(DateTime date, int tempC, SummaryText summary)
 {
     Date = date;
     TemperatureC = TemperatureC.From(tempC);
     Summary = summary;
 }