// Token: 0x06000D65 RID: 3429 RVA: 0x00032C78 File Offset: 0x00030E78
        private void LoadConversationFeedPropertiesIfRequested(QueryNotification notification, ConversationType conv)
        {
            bool flag   = false;
            int  index  = Array.IndexOf <PropertyDefinition>(this.SubscriptionProperties, ConversationItemSchema.ConversationInitialMemberDocumentId);
            int  index2 = Array.IndexOf <PropertyDefinition>(this.SubscriptionProperties, ConversationItemSchema.ConversationMemberDocumentIds);
            int? initialMemberDocumentId = null;

            int[] memberDocumentIds = null;
            if (RowNotificationHandler.IsPropertyDefined(notification, index))
            {
                initialMemberDocumentId = RowNotificationHandler.GetItemProperty <int?>(notification, index);
                flag = true;
            }
            if (RowNotificationHandler.IsPropertyDefined(notification, index2))
            {
                memberDocumentIds = RowNotificationHandler.GetItemProperty <int[]>(notification, index2);
                flag = true;
            }
            if (flag)
            {
                SimulatedWebRequestContext.Execute(base.UserContext, "LoadConversationFeedPropertiesIfRequested", delegate(MailboxSession mailboxSession, IRecipientSession adSession, RequestDetailsLogger logger)
                {
                    ConversationFeedLoader conversationFeedLoader = new ConversationFeedLoader(mailboxSession, this.TimeZone);
                    conversationFeedLoader.LoadConversationFeedItems(conv, initialMemberDocumentId, memberDocumentIds);
                });
            }
        }
示例#2
0
        // Token: 0x06000D14 RID: 3348 RVA: 0x00030B94 File Offset: 0x0002ED94
        protected static T GetItemProperty <T>(QueryNotification notification, int index, T defaultValue)
        {
            if (!RowNotificationHandler.IsPropertyDefined(notification, index))
            {
                return(defaultValue);
            }
            object obj = notification.Row[index];

            if (!(obj is T))
            {
                return(defaultValue);
            }
            return((T)((object)obj));
        }
        // Token: 0x06000D28 RID: 3368 RVA: 0x0003165C File Offset: 0x0002F85C
        protected override NotificationPayloadBase GetPayloadFromNotification(StoreObjectId folderId, QueryNotification notification)
        {
            CalendarItemNotificationPayload calendarItemNotificationPayload = new CalendarItemNotificationPayload();

            calendarItemNotificationPayload.FolderId       = StoreId.StoreIdToEwsId(base.MailboxGuid, folderId);
            calendarItemNotificationPayload.SubscriptionId = base.SubscriptionId;
            calendarItemNotificationPayload.EventType      = notification.EventType;
            calendarItemNotificationPayload.Source         = new MailboxLocation(base.MailboxGuid);
            EwsCalendarItemType ewsCalendarItemType = new EwsCalendarItemType();

            ewsCalendarItemType.InstanceKey      = notification.Index;
            calendarItemNotificationPayload.Item = ewsCalendarItemType;
            if (notification.EventType != QueryNotificationType.RowDeleted)
            {
                VersionedId itemProperty = RowNotificationHandler.GetItemProperty <VersionedId>(notification, 0);
                if (itemProperty == null)
                {
                    ExTraceGlobals.NotificationsCallTracer.TraceDebug((long)this.GetHashCode(), "Invalid StoreId for calendar item notification.");
                    calendarItemNotificationPayload.Reload = true;
                    return(calendarItemNotificationPayload);
                }
                ConcatenatedIdAndChangeKey concatenatedId = IdConverter.GetConcatenatedId(itemProperty, new MailboxId(base.MailboxGuid), null);
                ewsCalendarItemType.ItemId  = new ItemId(concatenatedId.Id, concatenatedId.ChangeKey);
                ewsCalendarItemType.Start   = base.GetDateTimeProperty(notification, 2);
                ewsCalendarItemType.End     = base.GetDateTimeProperty(notification, 3);
                ewsCalendarItemType.Subject = RowNotificationHandler.GetItemProperty <string>(notification, 4);
                ewsCalendarItemType.LegacyFreeBusyStatusString = BusyTypeConverter.ToString((BusyType)RowNotificationHandler.GetItemProperty <int>(notification, 5));
                ewsCalendarItemType.IsAllDayEvent = RowNotificationHandler.GetItemProperty <bool?>(notification, 6);
                ewsCalendarItemType.IsRecurring   = new bool?(RowNotificationHandler.GetItemProperty <byte[]>(notification, 7) != null);
                if (RowNotificationHandler.IsPropertyDefined(notification, 8))
                {
                    ewsCalendarItemType.Organizer = RowNotificationHandler.CreateRecipientFromParticipant((Participant)notification.Row[8]);
                }
                ewsCalendarItemType.IsMeeting            = RowNotificationHandler.GetItemProperty <bool?>(notification, 9);
                ewsCalendarItemType.MyResponseTypeString = ResponseTypeConverter.ToString((ResponseType)RowNotificationHandler.GetItemProperty <int>(notification, 10));
                ewsCalendarItemType.SensitivityString    = SensitivityConverter.ToString(RowNotificationHandler.GetItemProperty <Sensitivity>(notification, 11));
                ewsCalendarItemType.HasAttachments       = RowNotificationHandler.GetItemProperty <bool?>(notification, 12);
                LocationSourceType itemProperty2 = (LocationSourceType)RowNotificationHandler.GetItemProperty <int>(notification, 26);
                ewsCalendarItemType.EnhancedLocation = ((itemProperty2 == LocationSourceType.None) ? new EnhancedLocationType
                {
                    DisplayName = RowNotificationHandler.GetItemProperty <string>(notification, 13),
                    PostalAddress = new Microsoft.Exchange.Services.Core.Types.PostalAddress()
                } : new EnhancedLocationType
                {
                    DisplayName = RowNotificationHandler.GetItemProperty <string>(notification, 24),
                    Annotation = RowNotificationHandler.GetItemProperty <string>(notification, 25),
                    PostalAddress = new Microsoft.Exchange.Services.Core.Types.PostalAddress
                    {
                        LocationSource = itemProperty2,
                        LocationUri = RowNotificationHandler.GetItemProperty <string>(notification, 27),
                        Latitude = this.GetLocationPropertyValue(notification, 28),
                        Longitude = this.GetLocationPropertyValue(notification, 29),
                        Accuracy = this.GetLocationPropertyValue(notification, 30),
                        Altitude = this.GetLocationPropertyValue(notification, 31),
                        AltitudeAccuracy = this.GetLocationPropertyValue(notification, 32),
                        Street = RowNotificationHandler.GetItemProperty <string>(notification, 33),
                        City = RowNotificationHandler.GetItemProperty <string>(notification, 34),
                        State = RowNotificationHandler.GetItemProperty <string>(notification, 35),
                        Country = RowNotificationHandler.GetItemProperty <string>(notification, 36),
                        PostalCode = RowNotificationHandler.GetItemProperty <string>(notification, 37)
                    }
                });
                StoreId itemProperty3 = RowNotificationHandler.GetItemProperty <StoreId>(notification, 14);
                ewsCalendarItemType.ParentFolderId = IdConverter.GetFolderIdFromStoreId(itemProperty3, new MailboxId(base.MailboxGuid));
                byte[] itemProperty4 = RowNotificationHandler.GetItemProperty <byte[]>(notification, 15);
                if (itemProperty4 != null)
                {
                    try
                    {
                        GlobalObjectId globalObjectId = new GlobalObjectId(itemProperty4);
                        ewsCalendarItemType.UID = globalObjectId.Uid;
                    }
                    catch (CorruptDataException ex)
                    {
                        ExTraceGlobals.NotificationsCallTracer.TraceError <string>((long)this.GetHashCode(), "Exception setting the UID in CalendarItemNotificationHandler:GetPayloadFromNotification. Exception: {1}", ex.Message);
                    }
                }
                ewsCalendarItemType.AppointmentState       = new int?(RowNotificationHandler.GetItemProperty <int>(notification, 16));
                ewsCalendarItemType.IsCancelled            = new bool?((ewsCalendarItemType.AppointmentState.Value & 4) == 4);
                ewsCalendarItemType.CalendarItemTypeString = CalendarItemTypeConverter.ToString(RowNotificationHandler.GetItemProperty <CalendarItemType>(notification, 17));
                ewsCalendarItemType.AppointmentReplyTime   = base.GetDateTimeProperty(notification, 18);
                if (RowNotificationHandler.IsPropertyDefined(notification, 19))
                {
                    ewsCalendarItemType.JoinOnlineMeetingUrl = RowNotificationHandler.GetItemProperty <string>(notification, 19);
                }
                ewsCalendarItemType.Categories  = RowNotificationHandler.GetItemProperty <string[]>(notification, 20);
                ewsCalendarItemType.IsOrganizer = new bool?(RowNotificationHandler.GetItemProperty <bool>(notification, 23));
                ConversationId itemProperty5 = RowNotificationHandler.GetItemProperty <ConversationId>(notification, 21);
                string         id            = IdConverter.ConversationIdToEwsId(base.MailboxGuid, itemProperty5);
                ewsCalendarItemType.ConversationId      = new ItemId(id, null);
                ewsCalendarItemType.IsResponseRequested = new bool?(RowNotificationHandler.GetItemProperty <bool>(notification, 22));
                try
                {
                    base.UserContext.LockAndReconnectMailboxSession(3000);
                    ewsCalendarItemType.EffectiveRights = EffectiveRightsProperty.GetFromEffectiveRights(EffectiveRights.Modify | EffectiveRights.Read | EffectiveRights.Delete, base.UserContext.MailboxSession);
                }
                finally
                {
                    if (base.UserContext.MailboxSessionLockedByCurrentThread())
                    {
                        base.UserContext.UnlockAndDisconnectMailboxSession();
                    }
                }
            }
            return(calendarItemNotificationPayload);
        }
        private ItemType GetMessageItemFromNotification(QueryNotification notification)
        {
            ExTraceGlobals.NotificationsCallTracer.TraceDebug <string>((long)this.GetHashCode(), "[MessageItemRowNotificationHandler.GetMessageItemFromNotification] Start. SubscriptionId: {0}", base.SubscriptionId);
            ItemType itemType;

            if (notification.EventType == QueryNotificationType.RowDeleted)
            {
                itemType = new MessageType
                {
                    InstanceKey = notification.Index
                };
            }
            else
            {
                StoreId       itemProperty  = RowNotificationHandler.GetItemProperty <StoreId>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.Id));
                StoreObjectId storeObjectId = StoreId.GetStoreObjectId(itemProperty);
                itemType                   = ItemType.CreateFromStoreObjectType(storeObjectId.ObjectType);
                itemType.InstanceKey       = notification.Index;
                itemType.ItemId            = this.StoreIdToEwsItemId(itemProperty);
                itemType.ParentFolderId    = new FolderId(base.GetEwsId(RowNotificationHandler.GetItemProperty <StoreId>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, StoreObjectSchema.ParentItemId))), null);
                itemType.ConversationId    = new ItemId(IdConverter.ConversationIdToEwsId(base.MailboxGuid, RowNotificationHandler.GetItemProperty <ConversationId>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.ConversationId))), null);
                itemType.Subject           = RowNotificationHandler.GetItemProperty <string>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.Subject));
                itemType.ImportanceString  = RowNotificationHandler.GetItemProperty <Importance>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.Importance), Importance.Normal).ToString();
                itemType.SensitivityString = RowNotificationHandler.GetItemProperty <Sensitivity>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.Sensitivity), Sensitivity.Normal).ToString();
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.ReceivedTime)))
                {
                    itemType.DateTimeReceived = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.ReceivedTime));
                }
                itemType.HasAttachments = new bool?(RowNotificationHandler.GetItemProperty <bool>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.HasAttachment)));
                itemType.IsDraft        = new bool?(RowNotificationHandler.GetItemProperty <bool>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, MessageItemSchema.IsDraft)));
                itemType.ItemClass      = RowNotificationHandler.GetItemProperty <string>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, StoreObjectSchema.ItemClass));
                MessageType messageType = itemType as MessageType;
                if (messageType != null)
                {
                    if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.From)))
                    {
                        messageType.From = RowNotificationHandler.CreateRecipientFromParticipant((Participant)notification.Row[Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.From)]);
                    }
                    if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.Sender)))
                    {
                        messageType.Sender = RowNotificationHandler.CreateRecipientFromParticipant((Participant)notification.Row[Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.Sender)]);
                    }
                    messageType.IsRead = new bool?(RowNotificationHandler.GetItemProperty <bool>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, MessageItemSchema.IsRead)));
                }
                FlagType flagType = new FlagType();
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.CompleteDate)))
                {
                    flagType.CompleteDate = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.CompleteDate));
                }
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.FlagStatus)))
                {
                    flagType.FlagStatus = RowNotificationHandler.GetItemProperty <FlagStatus>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.FlagStatus), FlagStatus.NotFlagged);
                }
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, TaskSchema.StartDate)))
                {
                    flagType.StartDate = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, TaskSchema.StartDate));
                }
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, TaskSchema.DueDate)))
                {
                    flagType.DueDate = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, TaskSchema.DueDate));
                }
                itemType.Flag = flagType;
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, StoreObjectSchema.CreationTime)))
                {
                    itemType.DateTimeCreated = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, StoreObjectSchema.CreationTime));
                }
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, StoreObjectSchema.LastModifiedTime)))
                {
                    itemType.LastModifiedTime = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, StoreObjectSchema.LastModifiedTime));
                }
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.ReceivedOrRenewTime)))
                {
                    itemType.ReceivedOrRenewTime = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.ReceivedOrRenewTime));
                }
                itemType.Categories = RowNotificationHandler.GetItemProperty <string[]>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.Categories));
                itemType.Preview    = RowNotificationHandler.GetItemProperty <string>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.Preview), null);
                itemType.Size       = RowNotificationHandler.GetItemProperty <int?>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.Size), null);
                itemType.AddExtendedPropertyValue(new ExtendedPropertyType(WellKnownProperties.NormalizedSubject, RowNotificationHandler.GetItemProperty <string>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, MessageItemRowNotificationHandler.normalizedSubjectPropertyDefinition), null)));
                itemType.DisplayTo = RowNotificationHandler.GetItemProperty <string>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.DisplayTo), null);
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.IconIndex)))
                {
                    IconIndex itemProperty2 = (IconIndex)RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.IconIndex));
                    if (itemProperty2 > (IconIndex)0)
                    {
                        itemType.IconIndexString = itemProperty2.ToString();
                    }
                }
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.SentTime)))
                {
                    itemType.DateTimeSent = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, ItemSchema.SentTime));
                }
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, MessageItemRowNotificationHandler.lastVerbExecutedPropertyDefinition)))
                {
                    itemType.AddExtendedPropertyValue(new ExtendedPropertyType(WellKnownProperties.LastVerbExecuted, RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, MessageItemRowNotificationHandler.lastVerbExecutedPropertyDefinition)).ToString()));
                }
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, MessageItemRowNotificationHandler.lastVerbExecutionTimePropertyDefinition)))
                {
                    itemType.AddExtendedPropertyValue(new ExtendedPropertyType(WellKnownProperties.LastVerbExecutionTime, base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.subscriptionProperties, MessageItemRowNotificationHandler.lastVerbExecutionTimePropertyDefinition))));
                }
                ExTraceGlobals.NotificationsCallTracer.TraceDebug <string>((long)this.GetHashCode(), "[MessageItemRowNotificationHandler.GetMessageItemFromNotification] End. SubscriptionId: {0}", base.SubscriptionId);
            }
            return(itemType);
        }
        // Token: 0x06000D64 RID: 3428 RVA: 0x00032724 File Offset: 0x00030924
        private ConversationType GetConversationFromNotification(QueryNotification notification)
        {
            ExTraceGlobals.NotificationsCallTracer.TraceDebug <string>((long)this.GetHashCode(), "[ConversationRowNotificationHandler.GetConversationFromNotification] Start. SubscriptionId: {0}", base.SubscriptionId);
            ConversationType conv = new ConversationType();

            conv.InstanceKey = notification.Index;
            if (notification.EventType != QueryNotificationType.RowDeleted)
            {
                conv.ConversationId          = new ItemId(IdConverter.ConversationIdToEwsId(base.MailboxGuid, RowNotificationHandler.GetItemProperty <ConversationId>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationId))), null);
                conv.ConversationTopic       = RowNotificationHandler.GetItemProperty <string>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationTopic));
                conv.UniqueRecipients        = RowNotificationHandler.GetItemProperty <string[]>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationMVTo));
                conv.UniqueSenders           = RowNotificationHandler.GetItemProperty <string[]>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationMVFrom));
                conv.LastDeliveryTime        = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationLastDeliveryTime));
                conv.LastDeliveryOrRenewTime = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationLastDeliveryOrRenewTime));
                conv.Categories = RowNotificationHandler.GetItemProperty <string[]>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationCategories));
                FlagType flagType = new FlagType();
                if (RowNotificationHandler.IsPropertyDefined(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationFlagStatus)))
                {
                    flagType.FlagStatus = (FlagStatus)RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationFlagStatus), 0);
                }
                conv.FlagStatus         = flagType.FlagStatus;
                conv.HasAttachments     = new bool?(RowNotificationHandler.GetItemProperty <bool>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationHasAttach)));
                conv.HasIrm             = new bool?(RowNotificationHandler.GetItemProperty <bool>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationHasIrm)));
                conv.MessageCount       = new int?(RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationMessageCount)));
                conv.GlobalMessageCount = new int?(RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationGlobalMessageCount)));
                conv.UnreadCount        = new int?(RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationUnreadMessageCount)));
                conv.GlobalUnreadCount  = new int?(RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationGlobalUnreadMessageCount)));
                conv.Size             = new int?(RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationMessageSize)));
                conv.ItemClasses      = RowNotificationHandler.GetItemProperty <string[]>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationMessageClasses));
                conv.ImportanceString = ((ImportanceType)RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationImportance), 1)).ToString();
                StoreId[] itemProperty = RowNotificationHandler.GetItemProperty <StoreId[]>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationItemIds), new StoreId[0]);
                conv.ItemIds = Array.ConvertAll <StoreId, ItemId>(itemProperty, (StoreId s) => new ItemId(base.GetEwsId(s), null));
                StoreId[] itemProperty2 = RowNotificationHandler.GetItemProperty <StoreId[]>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationGlobalItemIds), new StoreId[0]);
                conv.GlobalItemIds = Array.ConvertAll <StoreId, ItemId>(itemProperty2, (StoreId s) => new ItemId(base.GetEwsId(s), null));
                conv.DraftStoreIds = from storeId in itemProperty2
                                     where DraftItemIdsProperty.IsItemInDraftsFolder(storeId, this.draftFolderId)
                                     select StoreId.GetStoreObjectId(storeId);

                if (conv.DraftStoreIds.FirstOrDefault <StoreId>() != null)
                {
                    SimulatedWebRequestContext.Execute(base.UserContext, "ConversationNotificationDraftItemIds", delegate(MailboxSession mailboxSession, IRecipientSession adSession, RequestDetailsLogger logger)
                    {
                        NormalQueryView.PrepareDraftItemIds(mailboxSession, new ConversationType[]
                        {
                            conv
                        });
                    });
                }
                conv.LastModifiedTime   = base.GetDateTimeProperty(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, StoreObjectSchema.LastModifiedTime));
                conv.Preview            = RowNotificationHandler.GetItemProperty <string>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationPreview));
                conv.MailboxScopeString = MailboxSearchLocation.PrimaryOnly.ToString();
                IconIndex itemProperty3 = (IconIndex)RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationReplyForwardState));
                if (itemProperty3 > (IconIndex)0)
                {
                    conv.IconIndexString = itemProperty3.ToString();
                }
                itemProperty3 = (IconIndex)RowNotificationHandler.GetItemProperty <int>(notification, Array.IndexOf <PropertyDefinition>(this.conversationViewQuerySubscriptionProperties, ConversationItemSchema.ConversationGlobalReplyForwardState));
                if (itemProperty3 > (IconIndex)0)
                {
                    conv.GlobalIconIndexString = itemProperty3.ToString();
                }
                this.LoadConversationFeedPropertiesIfRequested(notification, conv);
                ExTraceGlobals.NotificationsCallTracer.TraceDebug <string>((long)this.GetHashCode(), "[ConversationRowNotificationHandler.GetConversationFromNotification] End. SubscriptionId: {0}", base.SubscriptionId);
            }
            return(conv);
        }