private void DetectExceptionInconsistencies(ConsistencyCheckResult result, ExceptionInfo exceptionInfo) { if (exceptionInfo.BlobDifferences != DifferencesBetweenBlobAndAttach.None) { foreach (object obj in Enum.GetValues(typeof(DifferencesBetweenBlobAndAttach))) { DifferencesBetweenBlobAndAttach differencesBetweenBlobAndAttach = (DifferencesBetweenBlobAndAttach)obj; if ((exceptionInfo.BlobDifferences & differencesBetweenBlobAndAttach) == differencesBetweenBlobAndAttach) { this.FailCheck(result, exceptionInfo, differencesBetweenBlobAndAttach); } } } }
private static object GetActualValueOfExceptionalProperty(ExceptionInfo exceptionInfo, DifferencesBetweenBlobAndAttach difference) { if (difference <= DifferencesBetweenBlobAndAttach.HasAttachment) { if (difference <= DifferencesBetweenBlobAndAttach.AppointmentColor) { switch (difference) { case DifferencesBetweenBlobAndAttach.None: case DifferencesBetweenBlobAndAttach.StartTime | DifferencesBetweenBlobAndAttach.EndTime: case DifferencesBetweenBlobAndAttach.StartTime | DifferencesBetweenBlobAndAttach.Subject: case DifferencesBetweenBlobAndAttach.EndTime | DifferencesBetweenBlobAndAttach.Subject: case DifferencesBetweenBlobAndAttach.StartTime | DifferencesBetweenBlobAndAttach.EndTime | DifferencesBetweenBlobAndAttach.Subject: break; case DifferencesBetweenBlobAndAttach.StartTime: return(exceptionInfo.StartTime); case DifferencesBetweenBlobAndAttach.EndTime: return(exceptionInfo.EndTime); case DifferencesBetweenBlobAndAttach.Subject: return(exceptionInfo.PropertyBag[ItemSchema.Subject]); case DifferencesBetweenBlobAndAttach.Location: return(exceptionInfo.PropertyBag[CalendarItemBaseSchema.Location]); default: if (difference == DifferencesBetweenBlobAndAttach.AppointmentColor) { return(exceptionInfo.PropertyBag[CalendarItemBaseSchema.AppointmentColor]); } break; } } else { if (difference == DifferencesBetweenBlobAndAttach.IsAllDayEvent) { return(exceptionInfo.PropertyBag[CalendarItemBaseSchema.MapiIsAllDayEvent]); } if (difference == DifferencesBetweenBlobAndAttach.HasAttachment) { return(exceptionInfo.PropertyBag[MessageItemSchema.MapiHasAttachment]); } } } else if (difference <= DifferencesBetweenBlobAndAttach.ReminderIsSet) { if (difference == DifferencesBetweenBlobAndAttach.FreeBusyStatus) { return(exceptionInfo.PropertyBag[CalendarItemBaseSchema.FreeBusyStatus]); } if (difference == DifferencesBetweenBlobAndAttach.ReminderIsSet) { return(exceptionInfo.PropertyBag[ItemSchema.ReminderIsSetInternal]); } } else { if (difference == DifferencesBetweenBlobAndAttach.ReminderMinutesBeforeStartInternal) { return(exceptionInfo.PropertyBag[ItemSchema.ReminderMinutesBeforeStartInternal]); } if (difference == DifferencesBetweenBlobAndAttach.AppointmentState) { return(exceptionInfo.PropertyBag[CalendarItemBaseSchema.AppointmentState]); } } return(null); }
private void FailCheck(ConsistencyCheckResult result, ExceptionInfo exceptionInfo, DifferencesBetweenBlobAndAttach difference) { result.Status = CheckStatusType.Failed; result.AddInconsistency(base.Context, PropertyInconsistency.CreateInstance(RoleType.Attendee, CalendarInconsistencyFlag.RecurringException, string.Format("Exc{0}", difference), exceptionInfo.OriginalStartTime, RecurrenceBlobsConsistentCheck.GetActualValueOfExceptionalProperty(exceptionInfo, difference), base.Context)); }