Method Open
Open(Stream, ResourceLimits?)
Opens an embedded object's payload part.
public static OlePayload Open(Stream payload, ResourceLimits? limits = null)
Parameters
payloadStreamThe payload part's bytes — for a
.docx, whatPreservedPart.OpenStream()returns for the partDocWright.Dom.OleObject.PartUrinames.limitsResourceLimitsThe resource caps to apply, or null for none.
Returns
- OlePayload
The opened payload. The caller owns it.
Exceptions
- ArgumentNullException
payloadis null.- InvalidDocumentException
The part is not a compound file, or is malformed.
- ResourceLimitExceededException
The part exceeds a cap in
limits.