Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeDocumentWebReader

OfficeIMO.Reader.Web

Namespace
OfficeIMO.Reader.Web
Assembly
OfficeIMO.Reader.Web
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

Bounded, thread-safe HTTP transport over a caller-configured OfficeDocumentReader.

Inheritance

  • object
  • OfficeDocumentWebReader

Remarks

The caller owns the Reader lifetime. A web reader created without an HttpClient uses a shared transport that refuses loopback, private, link-local and other non-public addresses after name resolution and on every redirect, unless ReaderWebOptions.AllowPrivateNetworkAddresses is set. A caller-supplied client stays caller-owned; its handler resolves names, connects and may follow redirects itself, so Reader Web screens only IP literals and localhost names for it.

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.

Constructors

OfficeDocumentWebReader 2 overloads
public OfficeDocumentWebReader(OfficeDocumentReader reader, ReaderWebOptions? options = null) #

Creates a bounded web reader over an existing Reader that downloads through OfficeIMO's address-checked transport.

Parameters

reader OfficeIMO.Reader.OfficeDocumentReader required
options OfficeIMO.Reader.Web.ReaderWebOptions? = null optional
public OfficeDocumentWebReader(OfficeDocumentReader reader, HttpClient httpClient, ReaderWebOptions? options = null) #

Creates a bounded web reader over existing Reader and HTTP client instances.

Parameters

reader OfficeIMO.Reader.OfficeDocumentReader required
httpClient System.Net.Http.HttpClient required
options OfficeIMO.Reader.Web.ReaderWebOptions? = null optional

Methods

public async Task<string> ConvertToMarkdownAsync(Uri uri, string? sourceName = null, ReaderOptions? readerOptions = null, CancellationToken cancellationToken = default) #

Downloads one bounded HTTP(S) response and returns the Markdown emitted by the same rich Reader pipeline.

Parameters

uri System.Uri required
sourceName string? = null optional
readerOptions OfficeIMO.Reader.ReaderOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<string>
public async Task<OfficeDocumentReadResult> ReadDocumentAsync(Uri uri, string? sourceName = null, ReaderOptions? readerOptions = null, CancellationToken cancellationToken = default) #

Downloads one bounded HTTP(S) response and routes its body through the configured Reader instance.

Parameters

uri System.Uri required
sourceName string? = null optional
readerOptions OfficeIMO.Reader.ReaderOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeDocumentReadResult>