rianjs / ical.net

ical.NET - an open source iCal library for .NET
MIT License
782 stars 230 forks source link

VEVENT, VALARM, VTODO, VJOURNAL, etc. should all have sane Equals and GetHashCode methods #181

Closed rianjs closed 6 years ago

rianjs commented 7 years ago

Here's a fast list of Event's possible subcomponents:

Skip/re-evaluate later

rianjs commented 7 years ago

For consideration later:

return Equals(DtStart, other.DtStart)
    && Equals(DtEnd, other.DtEnd)
    && string.Equals(Location, other.Location, StringComparison.OrdinalIgnoreCase)
    && Status.Equals(other.Status)
    && IsActive() == other.IsActive()
    && Transparency.Equals(other.Transparency)
    && EvaluationIncludesReferenceDate == other.EvaluationIncludesReferenceDate
    && string.Equals(Description, other.Description, StringComparison.OrdinalIgnoreCase)
    && (DtStamp != null && DtStamp.Equals(other.DtStamp))
    && Duration.Equals(other.Duration)
    && (DtEnd != null && DtEnd.Equals(other.DtEnd))
    && (Organizer != null && Organizer.Equals(other.Organizer))
    && string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase)
    && string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase)
    && resourcesSet.SetEquals(other.Resources)
    && (Attachments != null && CollectionHelpers.Equals(Attachments, other.Attachments))
    && (ExceptionDates != null && CollectionHelpers.Equals(ExceptionDates, other.ExceptionDates))
    && (ExceptionRules != null && CollectionHelpers.Equals(ExceptionRules, other.ExceptionRules))
    && (RecurrenceRules != null && CollectionHelpers.Equals(RecurrenceRules, other.RecurrenceRules))
    && (RecurrenceDates != null && CollectionHelpers.Equals(RecurrenceDates, other.RecurrenceDates))
    && (Contacts != null && CollectionHelpers.Equals(Contacts, other.Contacts));