Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Year != 0)
            {
                hash ^= Year.GetHashCode();
            }
            if (Month != 0)
            {
                hash ^= Month.GetHashCode();
            }
            if (Day != 0)
            {
                hash ^= Day.GetHashCode();
            }
            if (Hours != 0)
            {
                hash ^= Hours.GetHashCode();
            }
            if (Minutes != 0)
            {
                hash ^= Minutes.GetHashCode();
            }
            if (Seconds != 0)
            {
                hash ^= Seconds.GetHashCode();
            }
            if (Nanos != 0)
            {
                hash ^= Nanos.GetHashCode();
            }
            if (timeOffsetCase_ == TimeOffsetOneofCase.UtcOffset)
            {
                hash ^= UtcOffset.GetHashCode();
            }
            if (timeOffsetCase_ == TimeOffsetOneofCase.TimeZone)
            {
                hash ^= TimeZone.GetHashCode();
            }
            hash ^= (int)timeOffsetCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     return(Year ^ (Month << 28) ^ (Day << 22) ^ (Hour << 14) ^ (Minute << 8) ^ (Second << 6) ^ UtcOffset.GetHashCode());
 }