/// <summary> /// </summary> /// <param name="destAppointment"></param> /// <param name="sourceAppointment"></param> /// <param name="addDescription"></param> /// <param name="addReminders"></param> /// <param name="addAttendeesToDescription"></param> /// <returns> /// </returns> private bool CompareAppointments(Appointment destAppointment, Appointment sourceAppointment, bool addDescription, bool addReminders, bool addAttendeesToDescription) { var isFound = destAppointment.Equals(sourceAppointment); //If both entries have same content if (isFound) { //If description flag is on, compare description if (addDescription) { if (!sourceAppointment.CompareDescription(destAppointment, addAttendeesToDescription)) { isFound = false; } } } if (isFound) { //If reminder flag is on, compare reminder if (addReminders) { //Check if reminders match if (sourceAppointment.ReminderSet != destAppointment.ReminderSet) { isFound = false; } else if (sourceAppointment.ReminderSet) { if (sourceAppointment.ReminderMinutesBeforeStart != destAppointment.ReminderMinutesBeforeStart) { isFound = false; } } } } return isFound; }