예제 #1
0
        internal static ReadOnlyCollection <AttachmentLink> ItemToICal(Item item, ReadOnlyCollection <AttachmentLink> existingAttachmentLinks, OutboundAddressCache addressCache, Stream stream, string charsetName, OutboundConversionOptions outboundConversionOptions)
        {
            ReadOnlyCollection <AttachmentLink> readOnlyCollection = AttachmentLink.MergeAttachmentLinks(existingAttachmentLinks, item.AttachmentCollection.CoreAttachmentCollection);

            foreach (AttachmentLink attachmentLink in readOnlyCollection)
            {
                if (string.IsNullOrEmpty(attachmentLink.ContentId))
                {
                    attachmentLink.ContentId = AttachmentLink.CreateContentId(item.CoreItem, attachmentLink.AttachmentId, outboundConversionOptions.ImceaEncapsulationDomain);
                }
            }
            return(CalendarDocument.InternalItemsToICal(null, new Item[]
            {
                item
            }, readOnlyCollection, addressCache, false, stream, new List <LocalizedString>(), charsetName, outboundConversionOptions));
        }
예제 #2
0
 public ReadOnlyCollection <AttachmentLink> InitializeAttachmentLinks(IList <AttachmentLink> linksToMerge)
 {
     this.attachmentLinks = AttachmentLink.MergeAttachmentLinks(linksToMerge, this.AttachmentCollection);
     return(this.attachmentLinks);
 }