IsSame method
Checks if two recurrence objects are identical.
The recurrence to compare this one to.
Implementation
@override
bool IsSame(Recurrence otherRecurrence) {
// The base check compares runtime types, so the cast below is safe.
if (!super.IsSame(otherRecurrence)) {
return false;
}
WeeklyPattern otherWeeklyPattern = otherRecurrence as WeeklyPattern;
return _daysOfTheWeek.ToStringWithSeparator(",") ==
otherWeeklyPattern._daysOfTheWeek.ToStringWithSeparator(",") &&
_firstDayOfWeek == otherWeeklyPattern._firstDayOfWeek;
}