Table of Contents

Method Open

Namespace
DocWright.Ole
Assembly
DocWright.Ole.dll

Open(Stream, ResourceLimits?)

Opens an embedded object's payload part.

public static OlePayload Open(Stream payload, ResourceLimits? limits = null)

Parameters

payload Stream

The payload part's bytes — for a .docx, what PreservedPart.OpenStream() returns for the part DocWright.Dom.OleObject.PartUri names.

limits ResourceLimits

The resource caps to apply, or null for none.

Returns

OlePayload

The opened payload. The caller owns it.

Exceptions

ArgumentNullException

payload is null.

InvalidDocumentException

The part is not a compound file, or is malformed.

ResourceLimitExceededException

The part exceeds a cap in limits.