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