ical-org / ical.net

ical.net - iCalendar library for .Net
Other
798 stars 231 forks source link

Implement GetHashCode and Equals in terms of the type hierarchy #274

Open rianjs opened 7 years ago

rianjs commented 7 years ago

Extending some of the ideas from #271, calendar components should delegate to their parents the hashing and equality-checking for the properties that their parent types own, and simplify down to the properties that the child type owns.

For example, Event does its own thing, even though there is a type hierarchy above it that it completely ignores. It should probably use the type hierarchy instead. This way, bugfixes and feature enhancements will propagate to the other child types as well.

This may require spending some time understanding the relationship between UniqueComponent and RecurringComponent, and moving some of the hashing and equality logic to other places.

rianjs commented 6 years ago

C.f. #393