internal LinkedResource GetLinkedResource()
        {
            LinkedResource slr = new LinkedResource(ContentStream);

            slr.ContentId   = ContentId;
            slr.ContentLink = ContentLink;

            slr.ContentType      = ContentType.GetContentType();
            slr.TransferEncoding = TransferEncoding;

            return(slr);
        }
        internal Attachment GetAttachment()
        {
            Attachment saa = new Attachment(ContentStream, Name);

            saa.ContentId = ContentId;
            this.ContentDisposition.SetContentDisposition(saa.ContentDisposition);

            saa.ContentType      = ContentType.GetContentType();
            saa.Name             = Name;
            saa.TransferEncoding = TransferEncoding;
            saa.NameEncoding     = NameEncoding;
            return(saa);
        }
        internal AlternateView GetAlternateView()
        {
            AlternateView sav = new AlternateView(ContentStream);

            sav.BaseUri   = BaseUri;
            sav.ContentId = ContentId;

            sav.ContentType = ContentType.GetContentType();

            foreach (SerializeableLinkedResource lr in LinkedResources)
            {
                sav.LinkedResources.Add(lr.GetLinkedResource());
            }

            sav.TransferEncoding = TransferEncoding;
            return(sav);
        }