ReaderHandlerRegistration
OfficeIMO.Reader
Custom handler registration model for configuring an OfficeDocumentReaderBuilder without hard dependencies.
Inheritance
- object
- ReaderHandlerRegistration
Usage
Explore 1 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 1
Constructors
public ReaderHandlerRegistration() #Inherited Methods
Properties
public bool SupportsTextAndMetadata { get; set; } #Whether the handler prevents secondary rich projections when TextAndMetadata is requested. Default false: Core rejects an unsupported projection rather than silently performing a full read.
public IReadOnlyList<string> TextAndMetadataExtensions { get; set; } #Exact registered source extensions supporting TextAndMetadata. Empty means every source form accepted by a supporting handler; a nonempty list excludes its other legacy or specialized formats.
public IReadOnlyList<ReaderFormatQualification> FormatQualifications { get; set; } #Per-extension extraction declarations. Omitted extensions remain explicitly unqualified.
public string Id { get; set; } #Stable unique identifier for this handler (for example: "officeimo.reader.epub").
public string? DisplayName { get; set; } #Optional display name shown in capability listings.
public string? Description { get; set; } #Optional handler description shown in capability listings.
public ReaderHandlerOrigin Origin { get; set; } #Identifies whether the handler is supplied by OfficeIMO or by an application/integration. Custom is the safe default for registrations created by consumers.
public ReaderInputKind Kind { get; set; } #Kind advertised by this handler for detect/capability workflows.
public bool UseDetectedKindFallback { get; set; } #Gets or sets whether this handler may be selected as the sole custom fallback for a detected ReaderHandlerRegistration.Kind when no registered extension matches. Default: true. Set false for extension-specific formats that share a broader detected kind.
public IReadOnlyList<string> Extensions { get; set; } #File extensions handled by this registration (for example: ".epub", ".zip").
public Func<string, ReaderOptions, CancellationToken, IEnumerable<ReaderChunk>>? ReadPath { get; set; } #Path-based reader delegate.
public Func<Stream, string?, ReaderOptions, CancellationToken, IEnumerable<ReaderChunk>>? ReadStream { get; set; } #Stream-based reader delegate.
public bool SupportsIncrementalPath { get; set; } #Whether ReadPath yields chunks before the complete document is materialized. Default: false.
public bool SupportsIncrementalStream { get; set; } #Whether ReadStream yields chunks without making a complete input snapshot. Default: false.
public Func<string, ReaderOptions, CancellationToken, OfficeDocumentReadResult>? ReadDocumentPath { get; set; } #Optional path-based rich document reader delegate. When present, OfficeDocumentReader.ReadDocument dispatches directly to this delegate instead of rebuilding a generic result from chunks.
public Func<string, ReaderOptions, CancellationToken, OfficeDocumentReadResult>? ReadDirectoryBundle { get; set; } #Optional reader for directory packages identified by this handler's exact registered extensions.
public Func<Stream, string?, ReaderOptions, CancellationToken, OfficeDocumentReadResult>? ReadDocumentStream { get; set; } #Optional stream-based rich document reader delegate. The delegate must not close the caller-owned stream. When present, OfficeDocumentReader.ReadDocument dispatches directly to this delegate instead of rebuilding a generic result from chunks.
public Func<string, ReaderOptions, CancellationToken, Task<OfficeDocumentReadResult>>? ReadDocumentPathAsync { get; set; } #Optional native asynchronous path-based rich document reader delegate.
public Func<Stream, string?, ReaderOptions, CancellationToken, Task<OfficeDocumentReadResult>>? ReadDocumentStreamAsync { get; set; } #Optional native asynchronous stream-based rich document reader delegate. The delegate must not close the caller-owned stream.
public Func<Stream, string?, ReaderOptions, CancellationToken, bool>? ProbeStream { get; set; } #Optional bounded content probe used when structural detection finds a container but cannot determine the inner format. The probe must restore caller-visible stream position and return false for non-matches.
public Func<Stream, string?, ReaderOptions, CancellationToken, bool>? ExtensionValidationProbeStream { get; set; } #Optional bounded validator used only when this handler owns the exact source extension but ReaderDetectionMode.PreferContent reports a content mismatch. Return true to retain extension routing for a source that the handler recognizes. The delegate must not close the caller-owned stream; Core restores caller-visible stream position after validation.
public long? DefaultMaxInputBytes { get; set; } #Optional advertised default max input bytes for this handler. Null means "no handler-specific default advertised".
public IReadOnlyDictionary<string, long> DefaultMaxInputBytesByExtension { get; set; } #Optional per-extension default input limits. Keys are normalized like ReaderHandlerRegistration.Extensions and must name extensions claimed by this handler. A matching value overrides ReaderHandlerRegistration.DefaultMaxInputBytes before Reader buffers or opens the source.
public long? MaxInputBytesCeiling { get; set; } #Optional absolute handler ceiling. Unlike ReaderHandlerRegistration.DefaultMaxInputBytes, callers cannot raise this value through ReaderOptions.MaxInputBytes; Core combines both by taking the minimum before it creates a stream snapshot.
public int InputLimitProbeBytes { get; set; } #Optional number of leading bytes required by ReaderHandlerRegistration.ResolveMaxInputBytesFromPrefix. Core reads this bounded prefix before completing a stream snapshot so a shared extension can select a stricter limit from content without lowering the normal format's advertised ceiling.
public Func<ReadOnlyMemory<byte>, long?>? ResolveMaxInputBytesFromPrefix { get; set; } #Optional deterministic resolver for a stricter content-specific input limit. Return null to retain the handler or per-extension default. A returned value is combined with that default and any caller limit by taking the minimum.
public ReaderSourceHashBehavior SourceHashBehavior { get; set; } #Defines whether Core derives the source hash from ReaderOptions.ComputeHashes or leaves source-hash ownership to the format handler.
public ReaderWarningBehavior WarningBehavior { get; set; } #Advertised warning model for this handler.
public bool DeterministicOutput { get; set; } #True when this handler advertises deterministic chunk ordering/output for identical input.