Class PreservedPart
An unknown package part preserved opaquely for lossless round-trip (customXml, glossary, VBA and so on). Bytes are streamed lazily from the source package via the owning document's PartData.
public sealed class PreservedPart
- Inheritance
-
PreservedPart
- Inherited Members
Constructors
- PreservedPart(string, string, IPackagePartDataSource?)
Initializes a preserved part.
Properties
- ContentType
Gets the part's content type.
- HasReplacementContent
Gets a value indicating whether the part's bytes have been replaced in memory by SetContent(byte[]), so the source package is no longer consulted.
- PartUri
Gets the part URI, for example "/docProps/core.xml".
Methods
- OpenStream()
Opens a read-only stream over the preserved bytes, or over the replacement supplied to SetContent(byte[]).
- SetContent(byte[])
Replaces the part's bytes in memory.