Example #1
0
 internal static bool?HasRecurrenceTypeChanged(object meetingProperty, object calendarItemProperty)
 {
     if (meetingProperty is int && (int)meetingProperty == 0 && calendarItemProperty is PropertyError)
     {
         return(null);
     }
     return(new bool?(!MeetingRequest.ArePropsEqual(meetingProperty, calendarItemProperty)));
 }
Example #2
0
 internal static bool?HasRecurrencePatternChanged(object meetingProperty, object calendarItemProperty)
 {
     if (string.IsNullOrEmpty(meetingProperty as string) && (calendarItemProperty is PropertyError || string.IsNullOrEmpty(calendarItemProperty as string)))
     {
         return(null);
     }
     return(new bool?(!MeetingRequest.ArePropsEqual(meetingProperty, calendarItemProperty)));
 }
Example #3
0
        internal static ChangeHighlightHelper ComparePropertyBags(PropertyBag meetingPropBag, PropertyBag calItemPropBag, bool isUpdate)
        {
            ChangeHighlightHelper changeHighlightHelper = new ChangeHighlightHelper(0, isUpdate);

            if (meetingPropBag == null || calItemPropBag == null)
            {
                return(changeHighlightHelper);
            }
            object[] array  = new object[ChangeHighlightHelper.HighlightProperties.Length];
            object[] array2 = new object[ChangeHighlightHelper.HighlightProperties.Length];
            for (int i = 0; i < ChangeHighlightHelper.HighlightProperties.Length; i++)
            {
                StorePropertyDefinition storePropertyDefinition = ChangeHighlightHelper.HighlightProperties[i];
                array[i]  = meetingPropBag.TryGetProperty(storePropertyDefinition);
                array2[i] = calItemPropBag.TryGetProperty(storePropertyDefinition);
                if (storePropertyDefinition == InternalSchema.MapiRecurrenceType)
                {
                    bool?flag = MeetingRequest.HasRecurrenceTypeChanged(array[i], array2[i]);
                    if (flag != null)
                    {
                        changeHighlightHelper[storePropertyDefinition] = flag.Value;
                    }
                }
                else if (storePropertyDefinition == InternalSchema.RecurrencePattern)
                {
                    bool?flag2 = MeetingRequest.HasRecurrencePatternChanged(array[i], array2[i]);
                    if (flag2 != null)
                    {
                        changeHighlightHelper[storePropertyDefinition] = flag2.Value;
                    }
                }
                else if (storePropertyDefinition != InternalSchema.Duration || !string.IsNullOrEmpty(array[i] as string))
                {
                    changeHighlightHelper[storePropertyDefinition] = !MeetingRequest.ArePropsEqual(array[i], array2[i]);
                }
            }
            return(changeHighlightHelper);
        }
Example #4
0
        private bool ShouldPreserveLocalExceptions(CalendarItem calendarItem)
        {
            InternalRecurrence recurrenceFromItem = CalendarItem.GetRecurrenceFromItem(this);
            Recurrence         recurrence         = null;

            try
            {
                recurrence = calendarItem.Recurrence;
            }
            catch (RecurrenceFormatException ex)
            {
                ExTraceGlobals.MeetingMessageTracer.Information <string, GlobalObjectId>((long)this.GetHashCode(), "Storage.MeetingRequest.ShouldPreserveLocalExceptions encountered a recurrence format exception ({0}). Local exceptions will not be preserved: GOID={1}", ex.Message, this.GlobalObjectId);
            }
            catch (CorruptDataException ex2)
            {
                ExTraceGlobals.MeetingMessageTracer.Information <string, GlobalObjectId>((long)this.GetHashCode(), "Storage.MeetingRequest.ShouldPreserveLocalExceptions encountered a corrupt data exception ({0}). Local exceptions will not be preserved: GOID={1}", ex2.Message, this.GlobalObjectId);
            }
            return(recurrence != null && recurrenceFromItem != null && recurrence.Equals(recurrenceFromItem) && MeetingRequest.ArePropsEqual(calendarItem.TryGetProperty(InternalSchema.StartTime), base.TryGetProperty(InternalSchema.StartTime)) && MeetingRequest.ArePropsEqual(calendarItem.TryGetProperty(InternalSchema.EndTime), base.TryGetProperty(InternalSchema.EndTime)));
        }