Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

IWorkSourceDocument

OfficeIMO.IWork

Namespace
OfficeIMO.IWork
Assembly
OfficeIMO.IWork
Source revision
ba882f6b0d07 with working tree changes
Implements
IDisposable
Modifiers
sealed

Bounded, read-only representation of a Pages, Numbers, or Keynote source package.

Inheritance

  • object
  • IWorkSourceDocument

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Methods

public IWorkNativeEditSession BeginEdit() #

Starts a separate preservation-aware native edit session over this captured snapshot.

public string ComputePackageContentHash() #

Computes a deterministic SHA-256 hash of the captured normalized package entries.

Returns

string
public void Dispose() #

Completes this captured snapshot's lifetime. Captured data and views do not own input streams.

Load 12 overloads
public static IWorkSourceDocument Load(string path, IWorkLoadOptions? options = null) #

Opens an iWork file or directory bundle and detects its application kind.

Parameters

path string required
options OfficeIMO.IWork.IWorkLoadOptions? = null optional
public static IWorkSourceDocument Load(string path, IWorkDocumentKind expectedKind, IWorkLoadOptions? options = null) #

Opens an iWork file or directory bundle and verifies the expected application kind.

Parameters

path string required
expectedKind OfficeIMO.IWork.IWorkDocumentKind required
options OfficeIMO.IWork.IWorkLoadOptions? = null optional
public static IWorkSourceDocument Load(Stream stream, IWorkDocumentKind expectedKind, IWorkLoadOptions? options = null) #

Opens a ZIP-based iWork stream using the supplied application kind.

Parameters

stream System.IO.Stream required
expectedKind OfficeIMO.IWork.IWorkDocumentKind required
options OfficeIMO.IWork.IWorkLoadOptions? = null optional
public static IWorkSourceDocument Load(string path, IWorkDocumentKind expectedKind, IWorkLoadOptions? options, CancellationToken cancellationToken) #

Opens a file or directory bundle with cancellation and verifies its application kind.

Parameters

path string required
expectedKind OfficeIMO.IWork.IWorkDocumentKind required
options OfficeIMO.IWork.IWorkLoadOptions? required
cancellationToken System.Threading.CancellationToken required
public static IWorkSourceDocument Load(string path, IWorkLoadOptions? options, CancellationToken cancellationToken) #

Opens a file or directory bundle with cancellation and detects its application kind.

Parameters

path string required
options OfficeIMO.IWork.IWorkLoadOptions? required
cancellationToken System.Threading.CancellationToken required
public static IWorkSourceDocument Load(Stream stream, IWorkDocumentKind expectedKind, IWorkLoadOptions? options, CancellationToken cancellationToken) #

Opens a caller-owned ZIP stream with cancellation and verifies its application kind.

Parameters

stream System.IO.Stream required
expectedKind OfficeIMO.IWork.IWorkDocumentKind required
options OfficeIMO.IWork.IWorkLoadOptions? required
cancellationToken System.Threading.CancellationToken required
public static IWorkSourceDocument Load(Stream stream, IWorkLoadOptions? options, CancellationToken cancellationToken) #

Opens a caller-owned ZIP stream with cancellation and detects its application kind.

Parameters

stream System.IO.Stream required
options OfficeIMO.IWork.IWorkLoadOptions? required
cancellationToken System.Threading.CancellationToken required
public static IWorkSourceDocument Load(Stream stream, IWorkLoadOptions? options = null) #

Opens a ZIP-based iWork stream and detects its application kind.

Parameters

stream System.IO.Stream required
options OfficeIMO.IWork.IWorkLoadOptions? = null optional
public static IWorkSourceDocument Load(byte[] data, IWorkLoadOptions? options = null) #

Opens iWork package bytes and detects the application kind.

Parameters

data byte[] required
options OfficeIMO.IWork.IWorkLoadOptions? = null optional
public static IWorkSourceDocument Load(byte[] data, IWorkDocumentKind expectedKind, IWorkLoadOptions? options = null) #

Opens iWork package bytes and verifies the expected application kind.

Parameters

data byte[] required
expectedKind OfficeIMO.IWork.IWorkDocumentKind required
options OfficeIMO.IWork.IWorkLoadOptions? = null optional
public static IWorkSourceDocument Load(byte[] data, IWorkLoadOptions? options, CancellationToken cancellationToken) #

Opens package bytes with cancellation and detects the application kind.

Parameters

data byte[] required
options OfficeIMO.IWork.IWorkLoadOptions? required
cancellationToken System.Threading.CancellationToken required
public static IWorkSourceDocument Load(byte[] data, IWorkDocumentKind expectedKind, IWorkLoadOptions? options, CancellationToken cancellationToken) #

Opens package bytes with cancellation and verifies the application kind.

Parameters

data byte[] required
expectedKind OfficeIMO.IWork.IWorkDocumentKind required
options OfficeIMO.IWork.IWorkLoadOptions? required
cancellationToken System.Threading.CancellationToken required
public IWorkKeynoteProjection ReadKeynote() #

Reads a Keynote package into a bounded semantic source projection.

public IWorkNumbersProjection ReadNumbers() #

Reads a Numbers package into a bounded semantic source projection.

public IWorkPagesProjection ReadPages() #

Reads a Pages package into a bounded semantic source projection.

public IWorkSourceDocument WithCancellation(CancellationToken cancellationToken) #

Creates a source view whose subsequent projections and conversions use the supplied cancellation token.

Parameters

cancellationToken System.Threading.CancellationToken required

Properties

public IWorkDocumentKind Kind { get; } #

Gets the source application.

public IWorkContainerKind ContainerKind { get; } #

Gets the physical source layout.

public long ContainerLengthBytes { get; } #

Gets the ZIP byte length, or aggregate physical file bytes captured from a directory bundle before nested expansion.

public IReadOnlyList<IWorkPackageEntry> Entries { get; } #

Gets preserved package entries, including resources and metadata.

public IReadOnlyList<IWorkArchiveRecord> Records { get; } #

Gets every preserved IWA payload record, including auxiliary payloads.

public IReadOnlyList<string> BuildVersions { get; } #

Gets build-history strings recorded by the producer.

public IReadOnlyList<IWorkPreviewAsset> Previews { get; } #

Gets embedded raster or PDF previews ordered from most useful to least useful.

public IReadOnlyList<IWorkDiagnostic> Diagnostics { get; } #

Gets package-level diagnostics.

public IWorkPreviewAsset? PreferredRasterPreview { get; } #

Gets the preferred raster asset for a visual fallback.

public string? FilePath { get; private set; } #

Gets the captured source file path; directory bundles and byte/stream loads have no file association.