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. The API is thread-safe as it does not use shared mutable state.
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 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 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 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 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 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 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 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