IWorkSourceDocument
OfficeIMO.IWork
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.
Returned or exposed by 3
- Property IWorkNativeEditSession.Source
- Method IWorkSourceDocument.Load
- Method IWorkSourceDocument.WithCancellation
Methods
public IWorkNativeEditSession BeginEdit() #Starts a separate preservation-aware native edit session over this captured snapshot.
Returns
IWorkNativeEditSessionpublic string ComputePackageContentHash() #Computes a deterministic SHA-256 hash of the captured normalized package entries.
Returns
stringpublic void Dispose() #Completes this captured snapshot's lifetime. Captured data and views do not own input streams.
public static IWorkSourceDocument Load(string path, IWorkLoadOptions? options = null) #Opens an iWork file or directory bundle and detects its application kind.
Parameters
- path string
- options OfficeIMO.IWork.IWorkLoadOptions? = null
Returns
IWorkSourceDocumentpublic 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
- expectedKind OfficeIMO.IWork.IWorkDocumentKind
- options OfficeIMO.IWork.IWorkLoadOptions? = null
Returns
IWorkSourceDocumentpublic 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
- expectedKind OfficeIMO.IWork.IWorkDocumentKind
- options OfficeIMO.IWork.IWorkLoadOptions? = null
Returns
IWorkSourceDocumentpublic 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
- expectedKind OfficeIMO.IWork.IWorkDocumentKind
- options OfficeIMO.IWork.IWorkLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
IWorkSourceDocumentpublic 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
- options OfficeIMO.IWork.IWorkLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
IWorkSourceDocumentpublic 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
- expectedKind OfficeIMO.IWork.IWorkDocumentKind
- options OfficeIMO.IWork.IWorkLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
IWorkSourceDocumentpublic 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
- options OfficeIMO.IWork.IWorkLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
IWorkSourceDocumentpublic static IWorkSourceDocument Load(Stream stream, IWorkLoadOptions? options = null) #Opens a ZIP-based iWork stream and detects its application kind.
Parameters
- stream System.IO.Stream
- options OfficeIMO.IWork.IWorkLoadOptions? = null
Returns
IWorkSourceDocumentpublic static IWorkSourceDocument Load(byte[] data, IWorkLoadOptions? options = null) #Opens iWork package bytes and detects the application kind.
Parameters
- data byte[]
- options OfficeIMO.IWork.IWorkLoadOptions? = null
Returns
IWorkSourceDocumentpublic static IWorkSourceDocument Load(byte[] data, IWorkDocumentKind expectedKind, IWorkLoadOptions? options = null) #Opens iWork package bytes and verifies the expected application kind.
Parameters
- data byte[]
- expectedKind OfficeIMO.IWork.IWorkDocumentKind
- options OfficeIMO.IWork.IWorkLoadOptions? = null
Returns
IWorkSourceDocumentpublic static IWorkSourceDocument Load(byte[] data, IWorkLoadOptions? options, CancellationToken cancellationToken) #Opens package bytes with cancellation and detects the application kind.
Parameters
- data byte[]
- options OfficeIMO.IWork.IWorkLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
IWorkSourceDocumentpublic static IWorkSourceDocument Load(byte[] data, IWorkDocumentKind expectedKind, IWorkLoadOptions? options, CancellationToken cancellationToken) #Opens package bytes with cancellation and verifies the application kind.
Parameters
- data byte[]
- expectedKind OfficeIMO.IWork.IWorkDocumentKind
- options OfficeIMO.IWork.IWorkLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
IWorkSourceDocumentpublic IWorkKeynoteProjection ReadKeynote() #Reads a Keynote package into a bounded semantic source projection.
Returns
IWorkKeynoteProjectionpublic IWorkNumbersProjection ReadNumbers() #Reads a Numbers package into a bounded semantic source projection.
Returns
IWorkNumbersProjectionpublic IWorkPagesProjection ReadPages() #Reads a Pages package into a bounded semantic source projection.
Returns
IWorkPagesProjectionpublic IWorkSourceDocument WithCancellation(CancellationToken cancellationToken) #Creates a source view whose subsequent projections and conversions use the supplied cancellation token.
Parameters
- cancellationToken System.Threading.CancellationToken
Returns
IWorkSourceDocumentInherited Methods
Properties
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.