Exemplo 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);
     }
 }
Exemplo 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));
 }
Exemplo 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));
 }