Esempio n. 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ Offering.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Day;
         hashCode = (hashCode * 397) ^ Time.GetHashCode();
         hashCode = (hashCode * 397) ^ Duration.GetHashCode();
         hashCode = (hashCode * 397) ^ External.GetHashCode();
         hashCode = (hashCode * 397) ^ (Room != null ? Room.GetHashCode() : 0);
         return(hashCode);
     }
 }
Esempio n. 2
0
 public bool Equals(Offering other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Id.Equals(other.Id) &&
            Equals(Course, other.Course) &&
            Equals(Campus, other.Campus) &&
            Start.Date.Equals(other.Start.Date) &&
            End.Date.Equals(other.End.Date));
 }
Esempio n. 3
0
 public bool Equals(Meeting other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Id.Equals(other.Id) &&
            Offering.Equals(other.Offering) &&
            Day == other.Day &&
            Math.Floor(Time.TotalMilliseconds).Equals(Math.Floor(other.Time.TotalMilliseconds)) &&
            Math.Floor(Duration.TotalMilliseconds).Equals(Math.Floor(other.Duration.TotalMilliseconds)) &&
            External == other.External &&
            string.Equals(Room, other.Room));
 }