API Reference
DocumentReader
Unified, read-only document extraction facade intended for AI ingestion.
Inheritance
- Object
- DocumentReader
Remarks
This facade is intentionally dependency-free and deterministic. It normalizes extraction into ReaderChunk instances with stable IDs and location metadata. Read operations are thread-safe. The legacy static registration methods update a process-wide compatibility registry; use OfficeDocumentReaderBuilder for isolated immutable readers.
Methods
public static ReaderHostBootstrapResult BootstrapHostFromAssemblies(IEnumerable<Assembly> assemblies, ReaderHostBootstrapOptions options = null) #ReaderHostBootstrapResultHost bootstrap helper that registers modular handlers from the provided assemblies and returns both typed and JSON capability manifests in one payload.
Parameters
- assemblies System.Collections.Generic.IEnumerable{System.Reflection.Assembly}
- Assemblies to scan for registrar methods.
- options OfficeIMO.Reader.ReaderHostBootstrapOptions = null
- Bootstrap options. When null, defaults are used.
public static ReaderHostBootstrapResult BootstrapHostFromAssemblies(IEnumerable<Assembly> assemblies, ReaderHostBootstrapProfile profile, Boolean indentedManifestJson = false) #ReaderHostBootstrapResultHost bootstrap helper that applies a preset profile, registers modular handlers from the provided assemblies, and returns both typed and JSON capability manifests in one payload.
Parameters
- assemblies System.Collections.Generic.IEnumerable{System.Reflection.Assembly}
- Assemblies to scan for registrar methods.
- profile OfficeIMO.Reader.ReaderHostBootstrapProfile
- Bootstrap profile preset.
- indentedManifestJson System.Boolean = false
- When true, indents the returned manifest JSON payload.
public static ReaderHostBootstrapResult BootstrapHostFromLoadedAssemblies(String assemblyNamePrefix = "OfficeIMO.Reader.", ReaderHostBootstrapOptions options = null) #ReaderHostBootstrapResultHost bootstrap helper that discovers and registers modular handlers from currently loaded assemblies whose simple name starts with assemblyNamePrefix, then returns both typed and JSON capability manifests in one payload.
Parameters
- assemblyNamePrefix System.String = "OfficeIMO.Reader."
- Simple assembly-name prefix filter. Default: OfficeIMO.Reader..
- options OfficeIMO.Reader.ReaderHostBootstrapOptions = null
- Bootstrap options. When null, defaults are used.
public static ReaderHostBootstrapResult BootstrapHostFromLoadedAssemblies(ReaderHostBootstrapProfile profile, String assemblyNamePrefix = "OfficeIMO.Reader.", Boolean indentedManifestJson = false) #ReaderHostBootstrapResultHost bootstrap helper that applies a preset profile, discovers and registers modular handlers from loaded assemblies, and returns both typed and JSON capability manifests in one payload.
Parameters
- profile OfficeIMO.Reader.ReaderHostBootstrapProfile
- Bootstrap profile preset.
- assemblyNamePrefix System.String = "OfficeIMO.Reader."
- Simple assembly-name prefix filter. Default: OfficeIMO.Reader..
- indentedManifestJson System.Boolean = false
- When true, indents the returned manifest JSON payload.
public static ReaderChunkHierarchyResult ChunkDocument(OfficeDocumentReadResult document, ReaderHierarchicalChunkingOptions options = null, CancellationToken cancellationToken = null) #ReaderChunkHierarchyResultToken-chunks an already-read rich document and builds its hierarchy.
Parameters
- document OfficeIMO.Reader.OfficeDocumentReadResult
- options OfficeIMO.Reader.ReaderHierarchicalChunkingOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static OfficeDocumentReadResult CreateDocumentResult(IEnumerable<ReaderChunk> chunks, ReaderInputKind fallbackKind, OfficeDocumentSource source = null, IEnumerable<String> capabilities = null, IReadOnlyList<OfficeDocumentAsset> assets = null) #OfficeDocumentReadResultCreates the shared v5 document envelope from adapter-produced chunks and optional source data.
Parameters
- chunks System.Collections.Generic.IEnumerable{OfficeIMO.Reader.ReaderChunk}
- fallbackKind OfficeIMO.Reader.ReaderInputKind
- source OfficeIMO.Reader.OfficeDocumentSource = null
- capabilities System.Collections.Generic.IEnumerable{System.String} = null
- assets System.Collections.Generic.IReadOnlyList{OfficeIMO.Reader.OfficeDocumentAsset} = null
public static ReaderDetectionResult Detect(String path, ReaderDetectionOptions options = null) #ReaderDetectionResultDetects a file kind from extension and bounded content evidence.
Parameters
- path System.String
- options OfficeIMO.Reader.ReaderDetectionOptions = null
public static ReaderDetectionResult Detect(Byte[] bytes, String sourceName = null, ReaderDetectionOptions options = null) #ReaderDetectionResultDetects a stream kind from source-name and bounded content evidence. Seekable streams are restored to their original position. Non-seekable streams are advanced by at most MaxProbeBytes.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- options OfficeIMO.Reader.ReaderDetectionOptions = null
Detect(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderDetectionOptions options) #Detects a byte payload kind from source-name and bounded content evidence.
Parameters
- bytes System.Byte[]
- sourceName System.String
- options OfficeIMO.Reader.ReaderDetectionOptions
public static async Task<ReaderDetectionResult> DetectAsync(String path, ReaderDetectionOptions options = null, CancellationToken cancellationToken = null) #Task<ReaderDetectionResult>Asynchronously detects a file kind from extension and bounded content evidence.
Parameters
- path System.String
- options OfficeIMO.Reader.ReaderDetectionOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static async Task<ReaderDetectionResult> DetectAsync(Byte[] bytes, String sourceName = null, ReaderDetectionOptions options = null, CancellationToken cancellationToken = null) #Task<ReaderDetectionResult>Asynchronously detects a stream kind from source-name and bounded content evidence. Seekable streams are restored to their original position.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- options OfficeIMO.Reader.ReaderDetectionOptions = null
- cancellationToken System.Threading.CancellationToken = null
DetectAsync(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderDetectionOptions options, System.Threading.CancellationToken cancellationToken) #Asynchronously detects a byte payload kind from source-name and bounded content evidence.
Parameters
- bytes System.Byte[]
- sourceName System.String
- options OfficeIMO.Reader.ReaderDetectionOptions
- cancellationToken System.Threading.CancellationToken
public static ReaderInputKind DetectKind(String path) #ReaderInputKindDetects the input kind based on file extension.
Parameters
- path System.String
- Source file path.
public static IReadOnlyList<ReaderHandlerRegistrarDescriptor> DiscoverHandlerRegistrars(params Assembly[] assemblies) #IReadOnlyList<ReaderHandlerRegistrarDescriptor>Discovers modular registrar methods in the provided assemblies.
Parameters
- assemblies System.Collections.Generic.IEnumerable{System.Reflection.Assembly}
DiscoverHandlerRegistrars(System.Reflection.Assembly[] assemblies) #Discovers modular registrar methods in the provided assemblies.
Parameters
- assemblies System.Reflection.Assembly[]
public static IReadOnlyList<ReaderHandlerRegistrarDescriptor> DiscoverHandlerRegistrarsFromLoadedAssemblies(String assemblyNamePrefix = "OfficeIMO.Reader.") #IReadOnlyList<ReaderHandlerRegistrarDescriptor>Discovers modular registrar methods from currently loaded assemblies whose simple name starts with assemblyNamePrefix.
Parameters
- assemblyNamePrefix System.String = "OfficeIMO.Reader."
- Simple assembly-name prefix filter. Default: OfficeIMO.Reader..
public static IReadOnlyList<ReaderTableExportBundle> ExportTables(IEnumerable<ReaderTable> tables, Boolean indentedJson = false, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderTableExportBundle>Builds deterministic CSV, Markdown, and JSON payloads for discovered reader tables.
Parameters
- tables System.Collections.Generic.IEnumerable{OfficeIMO.Reader.ReaderTable}
- Reader tables to export.
- indentedJson System.Boolean = false
- When true, writes indented table JSON payloads.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<ReaderVisualExportBundle> ExportVisuals(IEnumerable<ReaderVisual> visuals, Boolean indentedJson = false, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderVisualExportBundle>Builds deterministic payload and JSON sidecars for discovered reader visuals.
Parameters
- visuals System.Collections.Generic.IEnumerable{OfficeIMO.Reader.ReaderVisual}
- Reader visuals to export.
- indentedJson System.Boolean = false
- When true, writes indented visual JSON payloads.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<OfficeDocumentAsset> ExtractAssets(OfficeDocumentReadResult result, Func<OfficeDocumentAsset, Boolean> predicate = null, CancellationToken cancellationToken = null) #IReadOnlyList<OfficeDocumentAsset>Returns assets already attached to a shared read result, optionally filtered by caller-owned policy.
Parameters
- result OfficeIMO.Reader.OfficeDocumentReadResult
- Read result to inspect.
- predicate System.Func{OfficeIMO.Reader.OfficeDocumentAsset,System.Boolean} = null
- Optional predicate used to select assets.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<ReaderTable> ExtractMarkdownTables(String markdown, ReaderOptions options = null, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderTable>Extracts structured tables from Markdown text using the same parser path as Markdown reader chunks.
Parameters
- markdown System.String
- Markdown text to inspect.
- options OfficeIMO.Reader.ReaderOptions = null
- Reader options. MaxTableRows is honored.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Returns
Tables discovered in source order.
public static OfficeDocumentStructuredExtractionResult ExtractStructured(OfficeDocumentReadResult document, OfficeDocumentStructuredExtractionOptions options = null, CancellationToken cancellationToken = null) #OfficeDocumentStructuredExtractionResultExtracts a bounded structured view from an already-read document.
Parameters
- document OfficeIMO.Reader.OfficeDocumentReadResult
- options OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static IReadOnlyList<ReaderTable> ExtractTables(IEnumerable<ReaderChunk> chunks, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderTable>Extracts table metadata already attached to reader chunks.
Parameters
- chunks System.Collections.Generic.IEnumerable{OfficeIMO.Reader.ReaderChunk}
- Reader chunks to inspect.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<ReaderVisual> ExtractVisuals(IEnumerable<ReaderChunk> chunks, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderVisual>Extracts visual payload metadata already attached to reader chunks.
Parameters
- chunks System.Collections.Generic.IEnumerable{OfficeIMO.Reader.ReaderChunk}
- Reader chunks to inspect.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<ReaderHandlerCapability> GetCapabilities(Boolean includeBuiltIn = true, Boolean includeCustom = true) #IReadOnlyList<ReaderHandlerCapability>Lists built-in and custom reader capabilities for host discovery.
Parameters
- includeBuiltIn System.Boolean = true
- includeCustom System.Boolean = true
public static ReaderCapabilityManifest GetCapabilityManifest(Boolean includeBuiltIn = true, Boolean includeCustom = true) #ReaderCapabilityManifestBuilds a machine-readable capability manifest for host auto-discovery.
Parameters
- includeBuiltIn System.Boolean = true
- includeCustom System.Boolean = true
public static String GetCapabilityManifestJson(Boolean includeBuiltIn = true, Boolean includeCustom = true, Boolean indented = false) #StringBuilds a JSON capability manifest payload for host auto-discovery.
Parameters
- includeBuiltIn System.Boolean = true
- includeCustom System.Boolean = true
- indented System.Boolean = false
public static IEnumerable<ReaderChunk> Read(String path, ReaderOptions options = null, CancellationToken cancellationToken = null) #IEnumerable<ReaderChunk>Reads a supported document file and emits normalized extraction chunks.
Parameters
- path System.String
- Source file path.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IEnumerable<ReaderChunk> Read(Byte[] bytes, String sourceName = null, ReaderOptions options = null, CancellationToken cancellationToken = null) #IEnumerable<ReaderChunk>Reads a supported document from a stream and emits normalized extraction chunks.
Parameters
- stream System.IO.Stream
- Source stream. This method does not close the stream.
- sourceName System.String = null
- Optional source name used for kind detection (via extension) and citations/IDs. For example: "Policy.docx" or "Workbook.xlsx".
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Read(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Threading.CancellationToken cancellationToken) #Reads a supported document from bytes and emits normalized extraction chunks.
Parameters
- bytes System.Byte[]
- Source bytes.
- sourceName System.String
- Optional source name used for kind detection (via extension) and citations/IDs. For example: "Policy.docx" or "Workbook.xlsx".
- options OfficeIMO.Reader.ReaderOptions
- Extraction options.
- cancellationToken System.Threading.CancellationToken
- Cancellation token.
public static IReadOnlyList<OfficeDocumentAsset> ReadAssets(String path, ReaderOptions options = null, CancellationToken cancellationToken = null) #IReadOnlyList<OfficeDocumentAsset>Reads a supported document file and returns discovered assets in source order.
Parameters
- path System.String
- Source file path.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<OfficeDocumentAsset> ReadAssets(Byte[] bytes, String sourceName = null, ReaderOptions options = null, CancellationToken cancellationToken = null) #IReadOnlyList<OfficeDocumentAsset>Reads a supported document stream and returns discovered assets in source order.
Parameters
- stream System.IO.Stream
- Source stream. This method does not close the stream.
- sourceName System.String = null
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
ReadAssets(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Threading.CancellationToken cancellationToken) #Reads a supported document from bytes and returns discovered assets in source order.
Parameters
- bytes System.Byte[]
- Source bytes.
- sourceName System.String
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions
- Extraction options.
- cancellationToken System.Threading.CancellationToken
- Cancellation token.
public static async Task<IReadOnlyList<ReaderChunk>> ReadAsync(String path, ReaderOptions options = null, CancellationToken cancellationToken = null) #Task<IReadOnlyList<ReaderChunk>>Asynchronously reads a file into normalized chunks. Native async handlers are awaited directly; synchronous format engines are scheduled on a worker thread.
Parameters
- path System.String
- options OfficeIMO.Reader.ReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static async Task<IReadOnlyList<ReaderChunk>> ReadAsync(Byte[] bytes, String sourceName = null, ReaderOptions options = null, CancellationToken cancellationToken = null) #Task<IReadOnlyList<ReaderChunk>>Asynchronously reads a stream into normalized chunks. The caller retains ownership of the stream.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- options OfficeIMO.Reader.ReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
ReadAsync(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Threading.CancellationToken cancellationToken) #Asynchronously reads bytes into normalized chunks.
Parameters
- bytes System.Byte[]
- sourceName System.String
- options OfficeIMO.Reader.ReaderOptions
- cancellationToken System.Threading.CancellationToken
public static OfficeDocumentReadResult ReadDocument(String path, ReaderOptions options = null, CancellationToken cancellationToken = null) #OfficeDocumentReadResultReads a supported document file and returns the shared OfficeIMO read result envelope.
Parameters
- path System.String
- Source file path.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static OfficeDocumentReadResult ReadDocument(Byte[] bytes, String sourceName = null, ReaderOptions options = null, CancellationToken cancellationToken = null) #OfficeDocumentReadResultReads a supported document stream and returns the shared OfficeIMO read result envelope.
Parameters
- stream System.IO.Stream
- Source stream. This method does not close the stream.
- sourceName System.String = null
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
ReadDocument(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Threading.CancellationToken cancellationToken) #Reads a supported document from bytes and returns the shared OfficeIMO read result envelope.
Parameters
- bytes System.Byte[]
- Source bytes.
- sourceName System.String
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions
- Extraction options.
- cancellationToken System.Threading.CancellationToken
- Cancellation token.
public static async Task<OfficeDocumentReadResult> ReadDocumentAsync(String path, ReaderOptions options = null, CancellationToken cancellationToken = null) #Task<OfficeDocumentReadResult>Asynchronously reads a file into the shared rich document envelope.
Parameters
- path System.String
- options OfficeIMO.Reader.ReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static async Task<OfficeDocumentReadResult> ReadDocumentAsync(Byte[] bytes, String sourceName = null, ReaderOptions options = null, CancellationToken cancellationToken = null) #Task<OfficeDocumentReadResult>Asynchronously reads a stream into the shared rich document envelope. The caller retains ownership of the stream.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- options OfficeIMO.Reader.ReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
ReadDocumentAsync(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Threading.CancellationToken cancellationToken) #Asynchronously reads bytes into the shared rich document envelope.
Parameters
- bytes System.Byte[]
- sourceName System.String
- options OfficeIMO.Reader.ReaderOptions
- cancellationToken System.Threading.CancellationToken
public static String ReadDocumentJson(String path, ReaderOptions options = null, Boolean indented = false, CancellationToken cancellationToken = null) #StringReads a supported document file and returns the shared OfficeIMO read result JSON envelope.
Parameters
- path System.String
- options OfficeIMO.Reader.ReaderOptions = null
- indented System.Boolean = false
- cancellationToken System.Threading.CancellationToken = null
public static String ReadDocumentJson(Byte[] bytes, String sourceName = null, ReaderOptions options = null, Boolean indented = false, CancellationToken cancellationToken = null) #StringReads a supported document stream and returns the shared OfficeIMO read result JSON envelope.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- options OfficeIMO.Reader.ReaderOptions = null
- indented System.Boolean = false
- cancellationToken System.Threading.CancellationToken = null
ReadDocumentJson(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Boolean indented, System.Threading.CancellationToken cancellationToken) #Reads a supported document from bytes and returns the shared OfficeIMO read result JSON envelope.
Parameters
- bytes System.Byte[]
- sourceName System.String
- options OfficeIMO.Reader.ReaderOptions
- indented System.Boolean
- cancellationToken System.Threading.CancellationToken
public static Task<IReadOnlyList<OfficeDocumentReadResult>> ReadDocumentsAsync(IEnumerable<String> paths, ReaderOptions options = null, ReaderBatchOptions batchOptions = null, CancellationToken cancellationToken = null) #Task<IReadOnlyList<OfficeDocumentReadResult>>Asynchronously reads a bounded set of files with deterministic result ordering.
Parameters
- paths System.Collections.Generic.IEnumerable{System.String}
- options OfficeIMO.Reader.ReaderOptions = null
- batchOptions OfficeIMO.Reader.ReaderBatchOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static IEnumerable<ReaderChunk> ReadFolder(String folderPath, ReaderFolderOptions folderOptions = null, ReaderOptions options = null, CancellationToken cancellationToken = null) #IEnumerable<ReaderChunk>Enumerates a folder and ingests all supported files (best-effort), emitting warning chunks for skipped files.
Parameters
- folderPath System.String
- Folder path.
- folderOptions OfficeIMO.Reader.ReaderFolderOptions = null
- Folder enumeration options.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IEnumerable<ReaderChunk> ReadFolder(String folderPath, ReaderFolderOptions folderOptions, ReaderOptions options, Action<ReaderProgress> onProgress, CancellationToken cancellationToken = null) #IEnumerable<ReaderChunk>Enumerates a folder and ingests all supported files (best-effort), emitting warning chunks for skipped files.
Parameters
- folderPath System.String
- Folder path.
- folderOptions OfficeIMO.Reader.ReaderFolderOptions
- Folder enumeration options.
- options OfficeIMO.Reader.ReaderOptions
- Extraction options.
- onProgress System.Action{OfficeIMO.Reader.ReaderProgress}
- Optional progress callback for file-level lifecycle and aggregate counts.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static ReaderIngestResult ReadFolderDetailed(String folderPath, ReaderFolderOptions folderOptions = null, ReaderOptions options = null, Boolean includeChunks = true, Action<ReaderProgress> onProgress = null, CancellationToken cancellationToken = null) #ReaderIngestResultReads a folder and returns ingestion-ready summary/counts with optional chunk materialization.
Parameters
- folderPath System.String
- Folder path.
- folderOptions OfficeIMO.Reader.ReaderFolderOptions = null
- Folder enumeration options.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- includeChunks System.Boolean = true
- When true, materializes chunks in the result object.
- onProgress System.Action{OfficeIMO.Reader.ReaderProgress} = null
- Optional progress callback.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IEnumerable<ReaderSourceDocument> ReadFolderDocuments(String folderPath, ReaderFolderOptions folderOptions = null, ReaderOptions options = null, Action<ReaderProgress> onProgress = null, CancellationToken cancellationToken = null) #IEnumerable<ReaderSourceDocument>Enumerates a folder and emits one source-level payload per file, ready for direct DB upserts.
Parameters
- folderPath System.String
- Folder path.
- folderOptions OfficeIMO.Reader.ReaderFolderOptions = null
- Folder enumeration options.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- onProgress System.Action{OfficeIMO.Reader.ReaderProgress} = null
- Optional progress callback for file-level lifecycle and aggregate counts.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static ReaderChunkHierarchyResult ReadHierarchical(String path, ReaderOptions readerOptions = null, ReaderHierarchicalChunkingOptions chunkingOptions = null, CancellationToken cancellationToken = null) #ReaderChunkHierarchyResultReads a file and returns bounded token-aware hierarchical chunks.
Parameters
- path System.String
- readerOptions OfficeIMO.Reader.ReaderOptions = null
- chunkingOptions OfficeIMO.Reader.ReaderHierarchicalChunkingOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static ReaderChunkHierarchyResult ReadHierarchical(Byte[] bytes, String sourceName = null, ReaderOptions readerOptions = null, ReaderHierarchicalChunkingOptions chunkingOptions = null, CancellationToken cancellationToken = null) #ReaderChunkHierarchyResultReads a stream and returns bounded token-aware hierarchical chunks.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- readerOptions OfficeIMO.Reader.ReaderOptions = null
- chunkingOptions OfficeIMO.Reader.ReaderHierarchicalChunkingOptions = null
- cancellationToken System.Threading.CancellationToken = null
ReadHierarchical(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions readerOptions, OfficeIMO.Reader.ReaderHierarchicalChunkingOptions chunkingOptions, System.Threading.CancellationToken cancellationToken) #Reads bytes and returns bounded token-aware hierarchical chunks.
Parameters
- bytes System.Byte[]
- sourceName System.String
- readerOptions OfficeIMO.Reader.ReaderOptions
- chunkingOptions OfficeIMO.Reader.ReaderHierarchicalChunkingOptions
- cancellationToken System.Threading.CancellationToken
public static async Task<ReaderChunkHierarchyResult> ReadHierarchicalAsync(String path, ReaderOptions readerOptions = null, ReaderHierarchicalChunkingOptions chunkingOptions = null, CancellationToken cancellationToken = null) #Task<ReaderChunkHierarchyResult>Asynchronously reads a file and returns bounded token-aware hierarchical chunks.
Parameters
- path System.String
- readerOptions OfficeIMO.Reader.ReaderOptions = null
- chunkingOptions OfficeIMO.Reader.ReaderHierarchicalChunkingOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static async Task<ReaderChunkHierarchyResult> ReadHierarchicalAsync(Byte[] bytes, String sourceName = null, ReaderOptions readerOptions = null, ReaderHierarchicalChunkingOptions chunkingOptions = null, CancellationToken cancellationToken = null) #Task<ReaderChunkHierarchyResult>Asynchronously reads a stream and returns bounded token-aware hierarchical chunks.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- readerOptions OfficeIMO.Reader.ReaderOptions = null
- chunkingOptions OfficeIMO.Reader.ReaderHierarchicalChunkingOptions = null
- cancellationToken System.Threading.CancellationToken = null
ReadHierarchicalAsync(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions readerOptions, OfficeIMO.Reader.ReaderHierarchicalChunkingOptions chunkingOptions, System.Threading.CancellationToken cancellationToken) #Asynchronously reads bytes and returns bounded token-aware hierarchical chunks.
Parameters
- bytes System.Byte[]
- sourceName System.String
- readerOptions OfficeIMO.Reader.ReaderOptions
- chunkingOptions OfficeIMO.Reader.ReaderHierarchicalChunkingOptions
- cancellationToken System.Threading.CancellationToken
public static ReaderPathDocumentResult ReadPathDocumentsDetailed(String path, ReaderFolderOptions folderOptions = null, ReaderOptions options = null, Boolean includeDocumentChunks = true, Nullable<Int32> maxReturnedChunks = null, Action<ReaderProgress> onProgress = null, CancellationToken cancellationToken = null) #ReaderPathDocumentResultReads a supported file or folder path and returns source-level document payloads with optional chunk shaping.
Parameters
- path System.String
- Source file or folder path.
- folderOptions OfficeIMO.Reader.ReaderFolderOptions = null
- Folder enumeration options when path is a directory.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- includeDocumentChunks System.Boolean = true
- When true, includes chunk arrays in returned source documents.
- maxReturnedChunks System.Nullable{System.Int32} = null
- Optional cap across all returned document chunks.
- onProgress System.Action{OfficeIMO.Reader.ReaderProgress} = null
- Optional progress callback for folder reads.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static OfficeDocumentStructuredExtractionResult ReadStructured(String path, ReaderOptions readerOptions = null, OfficeDocumentStructuredExtractionOptions structuredOptions = null, CancellationToken cancellationToken = null) #OfficeDocumentStructuredExtractionResultReads a file and extracts a bounded structured view.
Parameters
- path System.String
- readerOptions OfficeIMO.Reader.ReaderOptions = null
- structuredOptions OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static OfficeDocumentStructuredExtractionResult ReadStructured(Byte[] bytes, String sourceName = null, ReaderOptions readerOptions = null, OfficeDocumentStructuredExtractionOptions structuredOptions = null, CancellationToken cancellationToken = null) #OfficeDocumentStructuredExtractionResultReads a stream and extracts a bounded structured view.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- readerOptions OfficeIMO.Reader.ReaderOptions = null
- structuredOptions OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions = null
- cancellationToken System.Threading.CancellationToken = null
ReadStructured(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions readerOptions, OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions structuredOptions, System.Threading.CancellationToken cancellationToken) #Reads bytes and extracts a bounded structured view.
Parameters
- bytes System.Byte[]
- sourceName System.String
- readerOptions OfficeIMO.Reader.ReaderOptions
- structuredOptions OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions
- cancellationToken System.Threading.CancellationToken
public static async Task<OfficeDocumentStructuredExtractionResult> ReadStructuredAsync(String path, ReaderOptions readerOptions = null, OfficeDocumentStructuredExtractionOptions structuredOptions = null, CancellationToken cancellationToken = null) #Task<OfficeDocumentStructuredExtractionResult>Asynchronously reads a file and extracts a bounded structured view.
Parameters
- path System.String
- readerOptions OfficeIMO.Reader.ReaderOptions = null
- structuredOptions OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static async Task<OfficeDocumentStructuredExtractionResult> ReadStructuredAsync(Byte[] bytes, String sourceName = null, ReaderOptions readerOptions = null, OfficeDocumentStructuredExtractionOptions structuredOptions = null, CancellationToken cancellationToken = null) #Task<OfficeDocumentStructuredExtractionResult>Asynchronously reads a stream and extracts a bounded structured view.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- readerOptions OfficeIMO.Reader.ReaderOptions = null
- structuredOptions OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions = null
- cancellationToken System.Threading.CancellationToken = null
ReadStructuredAsync(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions readerOptions, OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions structuredOptions, System.Threading.CancellationToken cancellationToken) #Asynchronously reads bytes and extracts a bounded structured view.
Parameters
- bytes System.Byte[]
- sourceName System.String
- readerOptions OfficeIMO.Reader.ReaderOptions
- structuredOptions OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions
- cancellationToken System.Threading.CancellationToken
public static IReadOnlyList<ReaderTableExportBundle> ReadTableExports(String path, ReaderOptions options = null, Boolean indentedJson = false, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderTableExportBundle>Reads a supported document file and returns discovered tables with deterministic CSV, Markdown, and JSON payloads.
Parameters
- path System.String
- Source file path.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options. MaxTableRows is honored.
- indentedJson System.Boolean = false
- When true, writes indented table JSON payloads.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<ReaderTableExportBundle> ReadTableExports(Byte[] bytes, String sourceName = null, ReaderOptions options = null, Boolean indentedJson = false, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderTableExportBundle>Reads a supported document stream and returns discovered tables with deterministic CSV, Markdown, and JSON payloads.
Parameters
- stream System.IO.Stream
- Source stream. This method does not close the stream.
- sourceName System.String = null
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options. MaxTableRows is honored.
- indentedJson System.Boolean = false
- When true, writes indented table JSON payloads.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
ReadTableExports(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Boolean indentedJson, System.Threading.CancellationToken cancellationToken) #Reads a supported document from bytes and returns discovered tables with deterministic CSV, Markdown, and JSON payloads.
Parameters
- bytes System.Byte[]
- Source bytes.
- sourceName System.String
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions
- Extraction options. MaxTableRows is honored.
- indentedJson System.Boolean
- When true, writes indented table JSON payloads.
- cancellationToken System.Threading.CancellationToken
- Cancellation token.
public static IReadOnlyList<ReaderTable> ReadTables(String path, ReaderOptions options = null, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderTable>Reads a supported document file and returns discovered tables in source order.
Parameters
- path System.String
- Source file path.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options. MaxTableRows is honored.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<ReaderTable> ReadTables(Byte[] bytes, String sourceName = null, ReaderOptions options = null, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderTable>Reads a supported document stream and returns discovered tables in source order.
Parameters
- stream System.IO.Stream
- Source stream. This method does not close the stream.
- sourceName System.String = null
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options. MaxTableRows is honored.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
ReadTables(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Threading.CancellationToken cancellationToken) #Reads a supported document from bytes and returns discovered tables in source order.
Parameters
- bytes System.Byte[]
- Source bytes.
- sourceName System.String
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions
- Extraction options. MaxTableRows is honored.
- cancellationToken System.Threading.CancellationToken
- Cancellation token.
public static IReadOnlyList<ReaderVisualExportBundle> ReadVisualExports(String path, ReaderOptions options = null, Boolean indentedJson = false, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderVisualExportBundle>Reads a supported document file and returns discovered visuals with deterministic payload and JSON sidecars.
Parameters
- path System.String
- Source file path.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- indentedJson System.Boolean = false
- When true, writes indented visual JSON payloads.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<ReaderVisualExportBundle> ReadVisualExports(Byte[] bytes, String sourceName = null, ReaderOptions options = null, Boolean indentedJson = false, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderVisualExportBundle>Reads a supported document stream and returns discovered visuals with deterministic payload and JSON sidecars.
Parameters
- stream System.IO.Stream
- Source stream. This method does not close the stream.
- sourceName System.String = null
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- indentedJson System.Boolean = false
- When true, writes indented visual JSON payloads.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
ReadVisualExports(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Boolean indentedJson, System.Threading.CancellationToken cancellationToken) #Reads a supported document from bytes and returns discovered visuals with deterministic payload and JSON sidecars.
Parameters
- bytes System.Byte[]
- Source bytes.
- sourceName System.String
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions
- Extraction options.
- indentedJson System.Boolean
- When true, writes indented visual JSON payloads.
- cancellationToken System.Threading.CancellationToken
- Cancellation token.
public static IReadOnlyList<ReaderVisual> ReadVisuals(String path, ReaderOptions options = null, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderVisual>Reads a supported document file and returns discovered visual payloads in source order.
Parameters
- path System.String
- Source file path.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IReadOnlyList<ReaderVisual> ReadVisuals(Byte[] bytes, String sourceName = null, ReaderOptions options = null, CancellationToken cancellationToken = null) #IReadOnlyList<ReaderVisual>Reads a supported document stream and returns discovered visual payloads in source order.
Parameters
- stream System.IO.Stream
- Source stream. This method does not close the stream.
- sourceName System.String = null
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions = null
- Extraction options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
ReadVisuals(System.Byte[] bytes, System.String sourceName, OfficeIMO.Reader.ReaderOptions options, System.Threading.CancellationToken cancellationToken) #Reads a supported document from bytes and returns discovered visual payloads in source order.
Parameters
- bytes System.Byte[]
- Source bytes.
- sourceName System.String
- Optional source name used for kind detection and citations.
- options OfficeIMO.Reader.ReaderOptions
- Extraction options.
- cancellationToken System.Threading.CancellationToken
- Cancellation token.
public static Void RegisterHandler(ReaderHandlerRegistration registration, Boolean replaceExisting = false) #VoidRegisters a custom handler for one or more file extensions.
Parameters
- registration OfficeIMO.Reader.ReaderHandlerRegistration
- Custom handler registration.
- replaceExisting System.Boolean = false
- When true, removes conflicting custom handlers and allows built-in extension overrides.
public static IReadOnlyList<String> RegisterHandlerPreservingExistingCustomExtensions(ReaderHandlerRegistration registration, Boolean replaceExisting = false) #IReadOnlyList<String>Registers a custom handler while leaving extensions already owned by other custom handlers untouched.
Parameters
- registration OfficeIMO.Reader.ReaderHandlerRegistration
- Custom handler registration.
- replaceExisting System.Boolean = false
- When true, allows built-in extension overrides and replaces an existing handler with the same identifier.
Returns
The normalized extensions that were registered for the handler.
public static IReadOnlyList<ReaderHandlerRegistrarDescriptor> RegisterHandlersFromAssemblies(Boolean replaceExisting = true, params Assembly[] assemblies) #IReadOnlyList<ReaderHandlerRegistrarDescriptor>Registers modular handlers discovered in the provided assemblies.
Parameters
- assemblies System.Collections.Generic.IEnumerable{System.Reflection.Assembly} = true
- Assemblies to scan for registrar methods.
- replaceExisting System.Boolean = true
- Passed to discovered registrar methods via their replaceExisting parameter when present.
RegisterHandlersFromAssemblies(System.Boolean replaceExisting, System.Reflection.Assembly[] assemblies) #Registers modular handlers discovered in the provided assemblies.
Parameters
- replaceExisting System.Boolean
- assemblies System.Reflection.Assembly[]
public static IReadOnlyList<ReaderHandlerRegistrarDescriptor> RegisterHandlersFromLoadedAssemblies(Boolean replaceExisting = true, String assemblyNamePrefix = "OfficeIMO.Reader.") #IReadOnlyList<ReaderHandlerRegistrarDescriptor>Registers modular handlers discovered from currently loaded assemblies whose simple name starts with assemblyNamePrefix.
Parameters
- replaceExisting System.Boolean = true
- Passed to discovered registrar methods via their replaceExisting parameter when present.
- assemblyNamePrefix System.String = "OfficeIMO.Reader."
- Simple assembly-name prefix filter. Default: OfficeIMO.Reader..
public static Boolean UnregisterHandler(String handlerId) #BooleanUnregisters a custom handler by identifier.
Parameters
- handlerId System.String
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object