コード例 #1
0
 public LinkedResource GetLinkedResource()
 {
     return(new LinkedResource(ContentStream)
     {
         ContentId = ContentId,
         ContentLink = ContentLink,
         ContentType = ContentType.GetContentType(),
         TransferEncoding = TransferEncoding
     });
 }
コード例 #2
0
        public Attachment GetAttachment()
        {
            var attachment = new Attachment(ContentStream, Name)
            {
                ContentId        = ContentId,
                ContentType      = ContentType.GetContentType(),
                Name             = Name,
                TransferEncoding = TransferEncoding,
                NameEncoding     = NameEncoding,
            };

            ContentDisposition.CopyTo(attachment.ContentDisposition);

            return(attachment);
        }
コード例 #3
0
        public AlternateView GetAlternateView()
        {
            var sav = new AlternateView(ContentStream)
            {
                BaseUri          = BaseUri,
                ContentId        = ContentId,
                ContentType      = ContentType.GetContentType(),
                TransferEncoding = TransferEncoding,
            };

            foreach (var linkedResource in LinkedResources)
            {
                sav.LinkedResources.Add(linkedResource.GetLinkedResource());
            }

            return(sav);
        }