Beispiel #1
0
 public LinkedResource GetLinkedResource()
 {
     return(new LinkedResource(ContentStream)
     {
         ContentId = ContentId,
         ContentLink = ContentLink,
         ContentType = ContentType.GetContentType(),
         TransferEncoding = TransferEncoding
     });
 }
Beispiel #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);
        }
Beispiel #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);
        }