Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeDocumentAsset

OfficeIMO.Reader

Namespace
OfficeIMO.Reader
Assembly
OfficeIMO.Reader.Core
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

Asset metadata emitted by a document read adapter.

Inheritance

  • object
  • OfficeDocumentAsset

Usage

Explore 16 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.

Accepted by parameters 9

Constructors

public OfficeDocumentAsset() #

Properties

public string Id { get; set; } #

Stable asset identifier within the read result.

public string Kind { get; set; } #

Normalized asset kind, such as image or preview.

public string? MediaType { get; set; } #

Media type when known.

public string? Extension { get; set; } #

Suggested file extension when known.

public string? FileName { get; set; } #

Deterministic suggested filename for writing this asset outside the read result envelope.

public string? AltText { get; set; } #

Accessibility description or alternate text when available from the source document.

public string? Title { get; set; } #

Source title or caption-like label when available from the asset metadata.

public int? Width { get; set; } #

Width in pixels or source units when known.

public int? Height { get; set; } #

Height in pixels or source units when known.

public long? LengthBytes { get; set; } #

Asset byte length when known.

public string? PayloadHash { get; set; } #

Stable payload hash when available.

public byte[]? PayloadBytes { get; set; } #
JsonIgnore

Optional in-memory payload for callers that request materializable assets. This payload is not included in JSON transport output.

public string? SourceObjectId { get; set; } #

Source-specific relationship, resource, or object identifier.

public OfficeDocumentRegion? Region { get; set; } #

Source geometry for this asset when the read adapter can locate a concrete placement.

public ReaderLocation Location { get; set; } #

Source location for this asset.

Extension Methods

public static bool PayloadHashMatches(OfficeDocumentAsset asset, out string? actualHash) #

Checks whether an asset payload matches its declared payload hash.

Parameters

asset OfficeIMO.Reader.OfficeDocumentAsset required
Asset to validate.
actualHash string? required
Computed SHA-256 hash when validation could run.

Returns

bool
public static bool TryBuildDataUri(OfficeDocumentAsset asset, out string? dataUri, long? maxInlineBytes = 65536) #

Builds a data URI for an asset payload when the payload exists and fits the configured size cap.

Parameters

asset OfficeIMO.Reader.OfficeDocumentAsset required
Asset to encode.
dataUri string? required
Data URI when one could be built.
maxInlineBytes long? = 65536 optional
Maximum payload size to inline. Set to null for no size cap.

Returns

bool