private static void UpdateOutlookAttachments( ) { if (OutlookProcessor.SyncVersion < 5) { IResourceList mailWithAttachments = RS.FindResourcesWithProp(STR.Email, PROP.Attachment); foreach (IResource mail in mailWithAttachments) { IResourceList attachments = mail.GetLinksFrom(null, PROP.Attachment); foreach (IResource attachment in attachments) { if (!mail.HasProp(PROP.EmbeddedMessage)) { mail.DeleteLink(PROP.Attachment, attachment); attachment.AddLink(PROP.Attachment, mail); } } } } if (OutlookProcessor.SyncVersion < 8) { IResourceList mailWithAttachments = RS.FindResourcesWithProp(STR.Email, PROP.Attachment); foreach (IResource mail in mailWithAttachments) { IResourceList attachments = mail.GetLinksFrom(null, PROP.Attachment); foreach (IResource attachment in attachments) { ContactManager.CloneLinkage(mail, attachment); } } } }
private void LinkContactsAndAttachment(IResource mail, IResource attachment) { ContactManager.CloneLinkage(mail, attachment); }