Beispiel #1
0
        public override void UndeleteResource(IResource res)
        {
            Guard.NullArgument(res, "res");
            IResourceList attachments = res.GetLinksOfType(null, PROP.Attachment);

            foreach (IResource attachment in attachments.ValidResources)
            {
                attachment.SetProp(Core.Props.IsDeleted, false);
            }

            IResource folder = null;
            MAPIIDs   IDs    = OutlookSession.GetInboxIDs();

            if (IDs != null)
            {
                folder = Folder.Find(IDs.EntryID);
            }

            if (folder != null)
            {
                MoveMessageToFolderAction action = new MoveMessageToFolderAction(false);
                action.DoMove(folder, res.ToResourceList());
            }
        }