Exemple #1
0
        internal static ChangeHighlightHelper CompareForChangeHighlightOnUpdatedItems(PropertyBag propBagItem1, long bodySizeItem1, PropertyBag propBagItem2, long bodySizeItem2)
        {
            ChangeHighlightHelper changeHighlightHelper = MeetingRequest.ComparePropertyBags(propBagItem1, propBagItem2, true);

            if (bodySizeItem1 != bodySizeItem2)
            {
                changeHighlightHelper[InternalSchema.HtmlBody] = true;
            }
            return(changeHighlightHelper);
        }
Exemple #2
0
        private void ProcessChangeHighlights(CalendarItemBase calendarItem, long meetingRequestBodySize, long calendarItemBodySize)
        {
            int num = base.GetValueOrDefault <int>(InternalSchema.ChangeHighlight, -1);

            if (calendarItem.IsNew && !(calendarItem is CalendarItemOccurrence))
            {
                num = 0;
                base.LocationIdentifierHelperInstance.SetLocationIdentifier(47221U);
                this[InternalSchema.ChangeHighlight] = num;
            }
            else
            {
                ChangeHighlightHelper changeHighlightHelper = MeetingRequest.CompareForChangeHighlightOnUpdatedItems(base.PropertyBag, meetingRequestBodySize, calendarItem.PropertyBag, calendarItemBodySize);
                if (this.ShouldPreserveAttendeesChanges(calendarItem))
                {
                    PreservablePropertyContext context = new PreservablePropertyContext(this, calendarItem, (ChangeHighlightProperties)num);
                    foreach (StorePropertyDefinition storePropertyDefinition in ChangeHighlightHelper.HighlightProperties)
                    {
                        if (changeHighlightHelper[storePropertyDefinition])
                        {
                            PreservableMeetingMessageProperty preservableMeetingMessageProperty = null;
                            if (PreservableMeetingMessageProperty.InstanceFromPropertyDefinition.TryGetValue(storePropertyDefinition, out preservableMeetingMessageProperty))
                            {
                                changeHighlightHelper[storePropertyDefinition] = !preservableMeetingMessageProperty.ShouldPreserve(context);
                            }
                        }
                    }
                }
                num = changeHighlightHelper.HighlightFlags;
                MeetingMessageType meetingMessageType = changeHighlightHelper.SuggestedMeetingType;
                if (meetingMessageType == MeetingMessageType.InformationalUpdate && calendarItem.IsCancelled)
                {
                    meetingMessageType = MeetingMessageType.FullUpdate;
                }
                if (this.MeetingRequestType != MeetingMessageType.PrincipalWantsCopy)
                {
                    this.MeetingRequestType = meetingMessageType;
                }
                else
                {
                    base.LocationIdentifierHelperInstance.SetLocationIdentifier(35701U);
                    this[InternalSchema.OriginalMeetingType] = meetingMessageType;
                }
                base.LocationIdentifierHelperInstance.SetLocationIdentifier(52085U);
                this[InternalSchema.ChangeHighlight] = num;
            }
            calendarItem.SetChangeHighlight(num);
        }
Exemple #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);
        }