コード例 #1
0
        private void Initialize(Item originalItem, bool isReplyAll, bool shouldUseSender)
        {
            this.isReplyAll      = isReplyAll;
            this.shouldUseSender = shouldUseSender;
            LastAction lastAction;

            if (isReplyAll)
            {
                lastAction = LastAction.ReplyToAll;
            }
            else
            {
                lastAction = LastAction.ReplyToSender;
            }
            IconIndex iconIndex = IconIndex.MailReplied;

            if (this.originalItemSigned)
            {
                iconIndex = IconIndex.MailSmimeSignedReplied;
            }
            else if (this.originalItemEncrypted)
            {
                iconIndex = IconIndex.MailEncryptedReplied;
            }
            else if (this.originalItemIrm)
            {
                iconIndex = IconIndex.MailIrmReplied;
            }
            if (originalItem.Id != null && originalItem.Id.ObjectId != null && !originalItem.Id.ObjectId.IsFakeId && !(originalItem is PostItem))
            {
                this.newItem.SafeSetProperty(InternalSchema.ReplyForwardStatus, ReplyForwardUtils.EncodeReplyForwardStatus(lastAction, iconIndex, originalItem.Id));
            }
        }
コード例 #2
0
        public void Create()
        {
            Shortcut.WorkingDirectory = workingDirectory;

            //стиль окна приложения
            Shortcut.WindowStyle = (int)WindowStyle;

            //Параметры командной строки
            Shortcut.Arguments = Arguments;

            //Иконка
            if (!string.IsNullOrEmpty(IconFile))
            {
                if (IconIndex == null)
                {
                    IconIndex = 0;
                }
                string iconString = IconFile + ", " + IconIndex.ToString();
                Shortcut.IconLocation = iconString;
            }

            //Описание
            Shortcut.Description = Description;

            Shortcut.Save();
        }
コード例 #3
0
 internal static string EncodeReplyForwardStatus(LastAction lastAction, IconIndex iconIndex, VersionedId id)
 {
     if (id == null)
     {
         return(string.Empty);
     }
     return(ReplyForwardUtils.EncodeReplyForwardStatus(lastAction, iconIndex, id.ToBase64String()));
 }
コード例 #4
0
        /// <summary>
        /// The index page.
        /// </summary>
        /// <returns>A IActionResult.</returns>
        public async Task <IActionResult> Index()
        {
            var responseModel = await HttpClientAsync.Async <IList <Icon> >(IconRoute.Index);

            IconIndex <IconPostModel> index = new IconIndex <IconPostModel>(responseModel);

            return(SearchGridConfiguration(index));
        }
コード例 #5
0
        private static void UpdateMeetingReplyIconIndex(Item item)
        {
            IconIndex valueOrDefault = item.GetValueOrDefault <IconIndex>(InternalSchema.IconIndex, IconIndex.Default);

            if ((valueOrDefault & IconIndex.BaseAppointment) > (IconIndex)0)
            {
                item[InternalSchema.IconIndex] = IconIndex.Default;
            }
        }
コード例 #6
0
        private void UpdateIconIndex()
        {
            IconIndex valueOrDefault = base.GetValueOrDefault <IconIndex>(InternalSchema.IconIndex, IconIndex.Default);

            if (valueOrDefault == IconIndex.Default)
            {
                base.LocationIdentifierHelperInstance.SetLocationIdentifier(44149U);
                this[InternalSchema.IconIndex] = CalendarItemBase.CalculateMeetingRequestIcon(this);
            }
        }
コード例 #7
0
 /// <summary>
 ///		Obtiene la ruta a un icono
 /// </summary>
 internal string GetIconRoute(IconIndex iconIndex)
 {
     if (ImageRoutes != null && ImageRoutes.TryGetValue(iconIndex, out string icon))
     {
         return(icon);
     }
     else
     {
         return(null);
     }
 }
コード例 #8
0
 private static string EncodeReplyForwardStatus(LastAction lastAction, IconIndex iconIndex, string parentMessageItemIdBase64String)
 {
     EnumValidator.AssertValid <IconIndex>(iconIndex);
     return(string.Format("{0}{1}{2}{3}{4}", new object[]
     {
         (int)lastAction,
         ',',
         (int)iconIndex,
         ',',
         parentMessageItemIdBase64String
     }));
 }
コード例 #9
0
        // Token: 0x06000F5C RID: 3932 RVA: 0x0003B790 File Offset: 0x00039990
        private static ConversationType GetConversationFromDataRow(OwaSearchContext searchContext, MailboxSession mailboxSession, object[] row, Dictionary <PropertyDefinition, int> orderDictionary)
        {
            ConversationType conversationType = new ConversationType();

            conversationType.InstanceKey = SearchFolderDataRetrieverBase.GetItemProperty <byte[]>(row, orderDictionary[ItemSchema.InstanceKey], null);
            ConversationId itemProperty = SearchFolderDataRetrieverBase.GetItemProperty <ConversationId>(row, orderDictionary[ConversationItemSchema.ConversationId], null);

            conversationType.ConversationId    = new ItemId(IdConverter.ConversationIdToEwsId(mailboxSession.MailboxGuid, itemProperty), null);
            conversationType.ConversationTopic = SearchFolderDataRetrieverBase.GetItemProperty <string>(row, orderDictionary[ConversationItemSchema.ConversationTopic]);
            conversationType.UniqueRecipients  = SearchFolderDataRetrieverBase.GetItemProperty <string[]>(row, orderDictionary[ConversationItemSchema.ConversationMVTo]);
            conversationType.UniqueSenders     = SearchFolderDataRetrieverBase.GetItemProperty <string[]>(row, orderDictionary[ConversationItemSchema.ConversationMVFrom]);
            conversationType.LastDeliveryTime  = SearchFolderDataRetrieverBase.GetDateTimeProperty(searchContext.RequestTimeZone, row, orderDictionary[ConversationItemSchema.ConversationLastDeliveryTime]);
            conversationType.Categories        = SearchFolderDataRetrieverBase.GetItemProperty <string[]>(row, orderDictionary[ConversationItemSchema.ConversationCategories]);
            if (SearchFolderDataRetrieverBase.IsPropertyDefined(row, orderDictionary[ConversationItemSchema.ConversationFlagStatus]))
            {
                FlagStatus itemProperty2 = (FlagStatus)SearchFolderDataRetrieverBase.GetItemProperty <int>(row, orderDictionary[ConversationItemSchema.ConversationFlagStatus], 0);
                if (itemProperty2 != FlagStatus.NotFlagged)
                {
                    conversationType.FlagStatus = new FlagType
                    {
                        FlagStatus = itemProperty2
                    }.FlagStatus;
                }
            }
            conversationType.HasAttachments     = new bool?(SearchFolderDataRetrieverBase.GetItemProperty <bool>(row, orderDictionary[ConversationItemSchema.ConversationHasAttach]));
            conversationType.HasIrm             = new bool?(SearchFolderDataRetrieverBase.GetItemProperty <bool>(row, orderDictionary[ConversationItemSchema.ConversationHasIrm]));
            conversationType.MessageCount       = new int?(SearchFolderDataRetrieverBase.GetItemProperty <int>(row, orderDictionary[ConversationItemSchema.ConversationMessageCount]));
            conversationType.GlobalMessageCount = new int?(SearchFolderDataRetrieverBase.GetItemProperty <int>(row, orderDictionary[ConversationItemSchema.ConversationGlobalMessageCount]));
            conversationType.UnreadCount        = new int?(SearchFolderDataRetrieverBase.GetItemProperty <int>(row, orderDictionary[ConversationItemSchema.ConversationUnreadMessageCount]));
            conversationType.GlobalUnreadCount  = new int?(SearchFolderDataRetrieverBase.GetItemProperty <int>(row, orderDictionary[ConversationItemSchema.ConversationGlobalUnreadMessageCount]));
            conversationType.Size             = new int?(SearchFolderDataRetrieverBase.GetItemProperty <int>(row, orderDictionary[ConversationItemSchema.ConversationMessageSize]));
            conversationType.ItemClasses      = SearchFolderDataRetrieverBase.GetItemProperty <string[]>(row, orderDictionary[ConversationItemSchema.ConversationMessageClasses]);
            conversationType.ImportanceString = ((ImportanceType)SearchFolderDataRetrieverBase.GetItemProperty <int>(row, orderDictionary[ConversationItemSchema.ConversationImportance], 1)).ToString();
            StoreId[] itemProperty3 = SearchFolderDataRetrieverBase.GetItemProperty <StoreId[]>(row, orderDictionary[ConversationItemSchema.ConversationItemIds], new StoreId[0]);
            conversationType.ItemIds = Array.ConvertAll <StoreId, ItemId>(itemProperty3, (StoreId s) => new ItemId(SearchFolderDataRetrieverBase.GetEwsId(s, mailboxSession.MailboxGuid), null));
            StoreId[] itemProperty4 = SearchFolderDataRetrieverBase.GetItemProperty <StoreId[]>(row, orderDictionary[ConversationItemSchema.ConversationGlobalItemIds], new StoreId[0]);
            conversationType.GlobalItemIds    = Array.ConvertAll <StoreId, ItemId>(itemProperty4, (StoreId s) => new ItemId(SearchFolderDataRetrieverBase.GetEwsId(s, mailboxSession.MailboxGuid), null));
            conversationType.LastModifiedTime = SearchFolderDataRetrieverBase.GetDateTimeProperty(searchContext.RequestTimeZone, row, orderDictionary[StoreObjectSchema.LastModifiedTime]);
            conversationType.Preview          = SearchFolderDataRetrieverBase.GetItemProperty <string>(row, orderDictionary[ConversationItemSchema.ConversationPreview]);
            IconIndex itemProperty5 = (IconIndex)SearchFolderDataRetrieverBase.GetItemProperty <int>(row, orderDictionary[ConversationItemSchema.ConversationReplyForwardState]);

            if (itemProperty5 > (IconIndex)0)
            {
                conversationType.IconIndexString = itemProperty5.ToString();
            }
            itemProperty5 = (IconIndex)SearchFolderDataRetrieverBase.GetItemProperty <int>(row, orderDictionary[ConversationItemSchema.ConversationGlobalReplyForwardState]);
            if (itemProperty5 > (IconIndex)0)
            {
                conversationType.GlobalIconIndexString = itemProperty5.ToString();
            }
            return(conversationType);
        }
コード例 #10
0
        /// <summary>Creates the file association.</summary>
        /// <exceptions cref="ArgumentNullException">Extension -or- ProperName is null (VB.NET: Nothing).</exceptions>
        /// <exceptions cref="ArgumentException">Extension -or- ProperName is empty.</exceptions>
        /// <exceptions cref="SecurityException">The user does not have registry write access.</exceptions>
        public void Create()
        {
            // remove the extension to avoid incompatibilities [such as DDE links]
            try
            {
                Remove();
            }
            catch (ArgumentException) { }             // the extension doesn't exist

            // create the exception
            if (Extension == "" || ProperName == "")
            {
                throw new ArgumentException();
            }
            int cnt;

            try
            {
                RegistryKey RegKey = Registry.ClassesRoot.CreateSubKey(Extension);
                RegKey.SetValue("", ProperName);

                if (ContentType != null && ContentType != "")
                {
                    RegKey.SetValue("Content Type", ContentType);
                }

                RegKey.Close();
                RegKey = Registry.ClassesRoot.CreateSubKey(ProperName);
                RegKey.SetValue("", FullName);
                RegKey.Close();

                if (IconPath != "")
                {
                    RegKey = Registry.ClassesRoot.CreateSubKey(ProperName + "\\" + "DefaultIcon");
                    RegKey.SetValue("", IconPath + "," + IconIndex.ToString());
                    RegKey.Close();
                }

                for (cnt = 0; cnt < FileInfo.Commands.Captions.Count; cnt++)
                {
                    RegKey = Registry.ClassesRoot.CreateSubKey(ProperName + "\\" + "Shell" + "\\" + (String)FileInfo.Commands.Captions[cnt]);
                    RegKey = RegKey.CreateSubKey("Command");
                    RegKey.SetValue("", FileInfo.Commands.Commands[cnt]);
                    RegKey.Close();
                }
            }
            catch
            {
                throw new SecurityException();
            }
        }
コード例 #11
0
        /// <summary>
        /// Converts the Persona to its multilined string equivalent.
        /// </summary>
        public override String ToString()
        {
            string sPersonaData = "Persona Information: {" + Environment.NewLine +
                                  "   Id: " + Id.ToString() + Environment.NewLine +
                                  "   Avatar Index: " + IconIndex.ToString() + Environment.NewLine +
                                  "   Name: " + Name + Environment.NewLine +
                                  "   Motto: " + Motto + Environment.NewLine +
                                  "   Level: " + Level.ToString() + Environment.NewLine +
                                  "   Cash: " + Cash.ToString() + Environment.NewLine +
                                  "   Boost: " + Boost.ToString() + Environment.NewLine +
                                  "}";

            return(sPersonaData);
        }
コード例 #12
0
            protected override bool TryAggregate(PropertyAggregationContext context, out object value)
            {
                IconIndex iconIndex = IconIndex.Default;

                foreach (IStorePropertyBag storePropertyBag in context.Sources)
                {
                    IconIndex valueOrDefault = storePropertyBag.GetValueOrDefault <IconIndex>(InternalSchema.IconIndex, IconIndex.Default);
                    if (valueOrDefault != IconIndex.Default && valueOrDefault != iconIndex)
                    {
                        iconIndex = valueOrDefault;
                    }
                }
                value = iconIndex;
                return(true);
            }
コード例 #13
0
        private static IconIndex GetIconIndexForNewItem(IconIndex iconIndex)
        {
            if (iconIndex <= IconIndex.BaseMail)
            {
                if (iconIndex != IconIndex.PostItem && iconIndex != IconIndex.BaseMail)
                {
                    return(iconIndex);
                }
            }
            else
            {
                switch (iconIndex)
                {
                case IconIndex.MailReplied:
                case IconIndex.MailForwarded:
                    break;

                default:
                    switch (iconIndex)
                    {
                    case IconIndex.MailEncryptedReplied:
                    case IconIndex.MailEncryptedForwarded:
                    case IconIndex.MailEncryptedRead:
                        return(IconIndex.MailEncrypted);

                    case IconIndex.MailSmimeSignedReplied:
                    case IconIndex.MailSmimeSignedForwarded:
                    case IconIndex.MailSmimeSignedRead:
                        return(IconIndex.MailSmimeSigned);

                    default:
                        switch (iconIndex)
                        {
                        case IconIndex.MailIrmForwarded:
                        case IconIndex.MailIrmReplied:
                            return(IconIndex.MailIrm);

                        default:
                            return(iconIndex);
                        }
                        break;
                    }
                    break;
                }
            }
            return(IconIndex.Default);
        }
コード例 #14
0
 private static bool ShouldUpdateIconIndex(IPropertyBag propertyBag, IconIndex iconIndexFromSource)
 {
     if (iconIndexFromSource.Equals(IconIndex.BaseMail))
     {
         AnnotatedPropertyValue annotatedProperty = propertyBag.GetAnnotatedProperty(new PropertyTag(276824067U));
         if (annotatedProperty.PropertyValue.IsError)
         {
             return(false);
         }
         IconIndex iconIndex = (IconIndex)annotatedProperty.PropertyValue.Value;
         if (iconIndex != IconIndex.MailReplied && iconIndex != IconIndex.MailForwarded)
         {
             return(false);
         }
     }
     return(true);
 }
コード例 #15
0
        internal ForwardCreation(Item originalItem, MessageItem message, ReplyForwardConfiguration parameters) : base(originalItem, message, parameters, true)
        {
            LastAction lastAction = LastAction.Forward;
            IconIndex  iconIndex  = IconIndex.MailForwarded;

            if (this.originalItemSigned)
            {
                iconIndex = IconIndex.MailSmimeSignedForwarded;
            }
            else if (this.originalItemEncrypted)
            {
                iconIndex = IconIndex.MailEncryptedForwarded;
            }
            else if (this.originalItemIrm)
            {
                iconIndex = IconIndex.MailIrmForwarded;
            }
            if (originalItem.Id != null && originalItem.Id.ObjectId != null && !originalItem.Id.ObjectId.IsFakeId && !(originalItem is PostItem))
            {
                this.newItem.SafeSetProperty(InternalSchema.ReplyForwardStatus, ReplyForwardUtils.EncodeReplyForwardStatus(lastAction, iconIndex, originalItem.Id));
            }
        }
コード例 #16
0
ファイル: ResourcesEx.cs プロジェクト: TICG/SilDev.CSharpLib
 /// <summary>
 ///     Returns the specified <see cref="Icon"/> resource from the system file
 ///     "imageres.dll".
 /// </summary>
 /// <param name="index">
 ///     The index of the icon to extract.
 /// </param>
 /// <param name="large">
 ///     true to return the large image; otherwise, false.
 /// </param>
 /// <param name="location">
 ///     The directory where the "imageres.dll" file is located.
 /// </param>
 public static Icon GetSystemIcon(IconIndex index, bool large = false, string location = "%system%")
 {
     try
     {
         var path = PathEx.Combine(location);
         if (string.IsNullOrWhiteSpace(path))
         {
             throw new ArgumentNullException(nameof(path));
         }
         if (PathEx.IsDir(path))
         {
             path = Path.Combine(path, "imageres.dll");
         }
         if (!File.Exists(path))
         {
             path = PathEx.Combine("%system%\\imageres.dll");
         }
         if (!File.Exists(path))
         {
             throw new PathNotFoundException(path);
         }
         return(GetIconFromFile(path, (int)index, large));
     }
     catch (PathNotFoundException ex)
     {
         Log.Write(ex);
     }
     catch (Exception ex) when(ex.IsCaught())
     {
         if (Log.DebugMode > 1)
         {
             Log.Write(ex);
         }
     }
     return(null);
 }
コード例 #17
0
ファイル: ResourcesEx.cs プロジェクト: TICG/SilDev.CSharpLib
 /// <summary>
 ///     Returns the specified <see cref="Icon"/> resource from the system file
 ///     "imageres.dll".
 /// </summary>
 /// <param name="index">
 ///     The index of the icon to extract.
 /// </param>
 /// <param name="location">
 ///     The directory where the "imageres.dll" file is located.
 /// </param>
 public static Icon GetSystemIcon(IconIndex index, string location) =>
 GetSystemIcon(index, false, location);
コード例 #18
0
        protected virtual void UpdateNewItemProperties()
        {
            IExchangePrincipal exchangePrincipal = (this.newItem.Session == null) ? null : this.newItem.Session.MailboxOwner;
            MailboxSession     mailboxSession    = this.newItem.Session as MailboxSession;

            if (mailboxSession != null && exchangePrincipal != null)
            {
                PostItem postItem = this.newItem as PostItem;
                if (postItem != null)
                {
                    postItem.Sender = new Participant(exchangePrincipal);
                }
                else
                {
                    ((MessageItem)this.newItem).Sender = new Participant(exchangePrincipal);
                }
            }
            string text           = null;
            string valueOrDefault = this.originalItem.GetValueOrDefault <string>(InternalSchema.InternetMessageId);

            if (!string.IsNullOrEmpty(valueOrDefault))
            {
                text = valueOrDefault;
            }
            string text2 = null;

            valueOrDefault = this.originalItem.GetValueOrDefault <string>(InternalSchema.InReplyTo);
            if (!string.IsNullOrEmpty(valueOrDefault))
            {
                text2 = valueOrDefault;
            }
            this.newItem.SafeSetProperty(InternalSchema.InReplyTo, text);
            StringBuilder stringBuilder = new StringBuilder(128);

            valueOrDefault = this.originalItem.GetValueOrDefault <string>(InternalSchema.InternetReferences);
            if (!string.IsNullOrEmpty(valueOrDefault))
            {
                stringBuilder.Append(valueOrDefault);
            }
            else if (text2 != null)
            {
                stringBuilder.Append(text2);
            }
            if (text != null)
            {
                if (stringBuilder.Length + 1 + text.Length > 32768 || stringBuilder.Length == 0)
                {
                    stringBuilder.Clear();
                    stringBuilder.Append(text);
                }
                else
                {
                    stringBuilder.Append(',');
                    stringBuilder.Append(text);
                }
            }
            this.newItem.SafeSetProperty(InternalSchema.InternetReferences, stringBuilder.ToString());
            this.newItem.SafeSetProperty(InternalSchema.Categories, StoreObject.SafePropertyValue(this.originalItem.TryGetProperty(InternalSchema.Categories), typeof(string[]), null));
            byte[]            parentBytes       = this.originalItem.TryGetProperty(InternalSchema.ConversationIndex) as byte[];
            ConversationIndex conversationIndex = ConversationIndex.CreateFromParent(parentBytes);

            this.newItem.SafeSetProperty(InternalSchema.ConversationIndex, conversationIndex.ToByteArray());
            ConversationId valueOrDefault2 = this.originalItem.GetValueOrDefault <ConversationId>(InternalSchema.ConversationFamilyId);

            this.newItem.SafeSetProperty(InternalSchema.ConversationFamilyId, valueOrDefault2);
            object propValue = this.originalItem.TryGetProperty(InternalSchema.SupportsSideConversation);

            this.newItem.SafeSetProperty(InternalSchema.SupportsSideConversation, propValue);
            ConversationCreatorSidCalculatorFactory conversationCreatorSidCalculatorFactory = new ConversationCreatorSidCalculatorFactory(XSOFactory.Default);
            IConversationCreatorSidCalculator       conversationCreatorSidCalculator;

            byte[] propValue2;
            if (conversationCreatorSidCalculatorFactory.TryCreate(mailboxSession, exchangePrincipal, out conversationCreatorSidCalculator) && conversationCreatorSidCalculator.TryCalculateOnReply(conversationIndex, out propValue2))
            {
                this.newItem.SafeSetProperty(ItemSchema.ConversationCreatorSID, propValue2);
            }
            bool?valueAsNullable = this.originalItem.GetValueAsNullable <bool>(InternalSchema.ConversationIndexTracking);

            if (valueAsNullable != null && valueAsNullable.Value)
            {
                this.newItem.SafeSetProperty(InternalSchema.ConversationIndexTracking, true);
            }
            this.newItem.SafeSetProperty(InternalSchema.ConversationTopic, StoreObject.SafePropertyValue(this.originalItem.TryGetProperty(InternalSchema.ConversationTopic), typeof(string), StoreObject.SafePropertyValue(this.originalItem.TryGetProperty(InternalSchema.NormalizedSubjectInternal), typeof(string), null)));
            this.newItem.SafeSetProperty(InternalSchema.Sensitivity, StoreObject.SafePropertyValue(this.originalItem.TryGetProperty(InternalSchema.Sensitivity), typeof(Sensitivity), Sensitivity.Normal));
            this.newItem.SafeSetProperty(InternalSchema.OriginalSensitivity, StoreObject.SafePropertyValue(this.originalItem.TryGetProperty(InternalSchema.OriginalSensitivity), typeof(Sensitivity), Sensitivity.Normal));
            this.newItem.SafeSetProperty(InternalSchema.IsReadReceiptRequested, false);
            this.newItem.SafeSetProperty(InternalSchema.IsDeliveryReceiptRequested, false);
            this.newItem.SafeSetProperty(InternalSchema.IsReplyRequested, StoreObject.SafePropertyValue(this.originalItem.TryGetProperty(InternalSchema.IsReplyRequested), typeof(bool), null));
            this.newItem.SafeSetProperty(InternalSchema.IsResponseRequested, StoreObject.SafePropertyValue(this.originalItem.TryGetProperty(InternalSchema.IsResponseRequested), typeof(bool), null));
            this.newItem.SafeSetProperty(InternalSchema.NativeBlockStatus, StoreObject.SafePropertyValue(this.originalItem.TryGetProperty(InternalSchema.NativeBlockStatus), typeof(int), null));
            object obj = this.originalItem.TryGetProperty(InternalSchema.IconIndex);

            if (!PropertyError.IsPropertyError(obj))
            {
                IconIndex iconIndex = (IconIndex)obj;
                if (iconIndex != IconIndex.Default)
                {
                    iconIndex = ReplyForwardCommon.GetIconIndexForNewItem(iconIndex);
                    this.newItem.SafeSetProperty(InternalSchema.IconIndex, iconIndex);
                }
            }
            ReplyForwardCommon.UpdateXLoop(this.originalItem, this.newItem, this.parameters.XLoop);
        }
コード例 #19
0
        private static void AssociateVerb(string ProgID, string Command, string Name, IconIndex IconIndex, string Position)
        {
            ProgramAssociationInfo a = new ProgramAssociationInfo(ProgID);

            a.AddVerb(new ProgramVerb(Name, PathToProgram + Command));
            Registry.LocalMachine.OpenSubKey("SOFTWARE", true).OpenSubKey("Classes", true).OpenSubKey(ProgID, true).OpenSubKey("shell", true).OpenSubKey(Name, true).SetValue("Icon", PathToIcons + ',' + (int)IconIndex);
            Registry.LocalMachine.OpenSubKey("SOFTWARE", true).OpenSubKey("Classes", true).OpenSubKey(ProgID, true).OpenSubKey("shell", true).OpenSubKey(Name, true).SetValue("Position", Position);
        }
コード例 #20
0
        private static void AssociateMainData(string ProgID, string Description, EditFlags flags, IconIndex IconIndex)
        {
            ProgramAssociationInfo a = new ProgramAssociationInfo(ProgID);

            if (!a.Exists)
            {
                a.Create();
            }
            Registry.LocalMachine.OpenSubKey("SOFTWARE", true).OpenSubKey("Classes", true).OpenSubKey(ProgID, true).CreateSubKey("DefaultIcon", RegistryKeyPermissionCheck.ReadWriteSubTree).SetValue("", PathToIcons + ',' + (int)IconIndex);
            a.Description = Description;
            a.EditFlags   = flags;
        }
コード例 #21
0
        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);
        }
コード例 #22
0
        public override void Apply(MailboxSession session, Item item)
        {
            PersistablePropertyBag propertyBag = item.PropertyBag;

            propertyBag[MessageItemSchema.IsRead]           = this.IsRead;
            propertyBag[MessageItemSchema.WasEverRead]      = this.IsRead;
            propertyBag[MessageItemSchema.IsDraft]          = this.IsDraft;
            propertyBag[ItemSchema.ReceivedTime]            = OlcMessageProperties.ConvertToExDateTime(this.ReceivedDate);
            propertyBag[StoreObjectSchema.LastModifiedTime] = OlcMessageProperties.ConvertToExDateTime(this.LastModifiedDate);
            IconIndex      iconIndex   = IconIndex.Default;
            OlcMessageType messageType = this.MessageType;

            switch (messageType)
            {
            case OlcMessageType.CALENDAR_REQUEST:
                iconIndex = IconIndex.AppointmentMeet;
                break;

            case OlcMessageType.CALENDAR_CANCEL:
                iconIndex = IconIndex.AppointmentMeetCancel;
                break;

            case OlcMessageType.CALENDAR_ACCEPTED:
                iconIndex = IconIndex.AppointmentMeetYes;
                break;

            case OlcMessageType.CALENDAR_TENTATIVE:
                iconIndex = IconIndex.AppointmentMeetMaybe;
                break;

            case OlcMessageType.CALENDAR_DECLINED:
                iconIndex = IconIndex.AppointmentMeetNo;
                break;

            default:
                if (messageType == OlcMessageType.SMS || messageType == OlcMessageType.MMS)
                {
                    iconIndex = IconIndex.SmsDelivered;
                }
                break;
            }
            if (this.IsReplied && iconIndex == IconIndex.Default)
            {
                iconIndex = IconIndex.MailReplied;
            }
            if (this.IsForwarded && iconIndex == IconIndex.Default)
            {
                iconIndex = IconIndex.MailForwarded;
            }
            propertyBag[ItemSchema.IconIndex] = iconIndex;
            propertyBag[MessageItemSchema.MessageAnswered] = (this.IsReplied || this.IsForwarded);
            propertyBag[ItemSchema.Importance]             = this.Importance;
            propertyBag[ItemSchema.Sensitivity]            = this.Sensitivity;
            if (this.MapiFlagStatus == FlagStatus.Flagged)
            {
                propertyBag[ItemSchema.FlagStatus]      = 2;
                propertyBag[ItemSchema.IsToDoItem]      = true;
                propertyBag[ItemSchema.ItemColor]       = 6;
                propertyBag[ItemSchema.PercentComplete] = 0.0;
            }
        }
コード例 #23
0
        // Token: 0x06000F60 RID: 3936 RVA: 0x0003BCB8 File Offset: 0x00039EB8
        private static ItemType GetItemFromDataRow(OwaSearchContext searchContext, MailboxSession mailboxSession, object[] row, Dictionary <PropertyDefinition, int> orderDictionary)
        {
            StoreId       itemProperty  = SearchFolderDataRetrieverBase.GetItemProperty <StoreId>(row, orderDictionary[ItemSchema.Id], null);
            StoreObjectId storeObjectId = StoreId.GetStoreObjectId(itemProperty);
            ItemType      itemType      = ItemType.CreateFromStoreObjectType(storeObjectId.ObjectType);

            itemType.ItemId = SearchFolderDataRetrieverBase.StoreIdToEwsItemId(itemProperty, new MailboxId(mailboxSession.MailboxGuid, false));
            byte[] itemProperty2 = SearchFolderDataRetrieverBase.GetItemProperty <byte[]>(row, orderDictionary[ItemSchema.InstanceKey], new byte[0]);
            itemType.InstanceKey       = itemProperty2;
            itemType.InstanceKeyString = Convert.ToBase64String(itemProperty2);
            itemType.ParentFolderId    = new FolderId(SearchFolderDataRetrieverBase.GetEwsId(SearchFolderDataRetrieverBase.GetItemProperty <StoreId>(row, orderDictionary[StoreObjectSchema.ParentItemId], null), mailboxSession.MailboxGuid), null);
            itemType.ConversationId    = new ItemId(IdConverter.ConversationIdToEwsId(mailboxSession.MailboxGuid, SearchFolderDataRetrieverBase.GetItemProperty <ConversationId>(row, orderDictionary[ItemSchema.ConversationId], null)), null);
            itemType.Subject           = SearchFolderDataRetrieverBase.GetItemProperty <string>(row, orderDictionary[ItemSchema.Subject], string.Empty);
            itemType.ImportanceString  = SearchFolderDataRetrieverBase.GetItemProperty <Importance>(row, orderDictionary[ItemSchema.Importance], Importance.Normal).ToString();
            itemType.SensitivityString = SearchFolderDataRetrieverBase.GetItemProperty <Sensitivity>(row, orderDictionary[ItemSchema.Sensitivity], Sensitivity.Normal).ToString();
            string dateTimeProperty = SearchFolderDataRetrieverBase.GetDateTimeProperty(searchContext.RequestTimeZone, row, orderDictionary[ItemSchema.ReceivedTime]);

            if (!string.IsNullOrEmpty(dateTimeProperty))
            {
                itemType.DateTimeReceived = dateTimeProperty;
            }
            string dateTimeProperty2 = SearchFolderDataRetrieverBase.GetDateTimeProperty(searchContext.RequestTimeZone, row, orderDictionary[ItemSchema.SentTime]);

            if (!string.IsNullOrEmpty(dateTimeProperty2))
            {
                itemType.DateTimeSent = dateTimeProperty2;
            }
            itemType.HasAttachments = new bool?(SearchFolderDataRetrieverBase.GetItemProperty <bool>(row, orderDictionary[ItemSchema.HasAttachment], false));
            itemType.IsDraft        = new bool?(SearchFolderDataRetrieverBase.GetItemProperty <bool>(row, orderDictionary[MessageItemSchema.IsDraft], false));
            itemType.ItemClass      = SearchFolderDataRetrieverBase.GetItemProperty <string>(row, orderDictionary[StoreObjectSchema.ItemClass], string.Empty);
            itemType.Preview        = SearchFolderDataRetrieverBase.GetItemProperty <string>(row, orderDictionary[ItemSchema.Preview], string.Empty);
            MessageType messageType = itemType as MessageType;

            if (messageType != null)
            {
                Participant itemProperty3 = SearchFolderDataRetrieverBase.GetItemProperty <Participant>(row, orderDictionary[ItemSchema.From], null);
                if (itemProperty3 != null)
                {
                    messageType.From = RowNotificationHandler.CreateRecipientFromParticipant(itemProperty3);
                }
                Participant itemProperty4 = SearchFolderDataRetrieverBase.GetItemProperty <Participant>(row, orderDictionary[ItemSchema.Sender], null);
                if (itemProperty4 != null)
                {
                    messageType.Sender = RowNotificationHandler.CreateRecipientFromParticipant(itemProperty4);
                }
                messageType.IsRead = new bool?(SearchFolderDataRetrieverBase.GetItemProperty <bool>(row, orderDictionary[MessageItemSchema.IsRead], false));
            }
            IconIndex itemProperty5 = SearchFolderDataRetrieverBase.GetItemProperty <IconIndex>(row, orderDictionary[ItemSchema.IconIndex], IconIndex.Default);

            if (itemProperty5 != IconIndex.Default)
            {
                itemType.IconIndexString = itemProperty5.ToString();
            }
            FlagType flagType = new FlagType();

            itemType.Flag             = flagType;
            flagType.FlagStatus       = SearchFolderDataRetrieverBase.GetItemProperty <FlagStatus>(row, orderDictionary[ItemSchema.FlagStatus], FlagStatus.NotFlagged);
            itemType.DateTimeCreated  = SearchFolderDataRetrieverBase.GetDateTimeProperty(searchContext.RequestTimeZone, row, orderDictionary[StoreObjectSchema.CreationTime]);
            itemType.LastModifiedTime = SearchFolderDataRetrieverBase.GetDateTimeProperty(searchContext.RequestTimeZone, row, orderDictionary[StoreObjectSchema.LastModifiedTime]);
            itemType.Size             = SearchFolderDataRetrieverBase.GetItemProperty <int?>(row, orderDictionary[ItemSchema.Size], null);
            itemType.DisplayTo        = SearchFolderDataRetrieverBase.GetItemProperty <string>(row, orderDictionary[ItemSchema.DisplayTo], null);
            itemType.Categories       = SearchFolderDataRetrieverBase.GetItemProperty <string[]>(row, orderDictionary[ItemSchema.Categories], null);
            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);
        }