API Reference

Class

MhtmlRemoteResourcePolicy

Namespace OfficeIMO.Mhtml
Assembly OfficeIMO.Mhtml
Modifiers sealed

Explicit policy for resources absent from an MHTML archive and delegated to a caller resolver. Embedded MIME resources are not network resources and remain governed by the shared HTML byte/count limits.

Inheritance

  • Object
  • MhtmlRemoteResourcePolicy

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Constructors

public MhtmlRemoteResourcePolicy() #

Methods

public static MhtmlRemoteResourcePolicy CreateEmbeddedOnlyProfile() #
Returns: MhtmlRemoteResourcePolicy

Creates the default offline profile. No remote fallback resolver is invoked.

public static MhtmlRemoteResourcePolicy CreateSameOriginProfile(Int32 maximumRedirects = 3) #
Returns: MhtmlRemoteResourcePolicy

Creates a bounded same-origin remote profile. Additional origins can be added through AllowedOrigins using absolute HTTP or HTTPS origins.

Parameters

maximumRedirects System.Int32 = 3 optionalposition: 0

Properties

public Boolean AllowRemoteResources { get; set; } #

Whether a caller-supplied resolver may be invoked for HTTP or HTTPS resources.

public Boolean AllowSameOrigin { get; set; } #

Whether the archive root origin is allowed. Defaults to false in the offline profile.

public Int32 MaximumRedirects { get; set; } #

Maximum redirects a resolver may follow. Defaults to zero.

public MhtmlRemoteResourceFetcher ResourceFetcher { get; set; } #

Optional one-hop remote fetcher. It must return redirects without following them; OfficeIMO validates each next URI before invoking the fetcher again.

public ISet<String> AllowedOrigins { get; } #

Additional allowed origins, expressed as absolute HTTP or HTTPS URI strings.

public Int64 MaximumResourceBytes { get; set; } #

Maximum bytes accepted from one resource while remote fallback is enabled.

public Int64 MaximumTotalResourceBytes { get; set; } #

Maximum total resource bytes accepted during one render while remote fallback is enabled.

public Int32 MaximumResourceCount { get; set; } #

Maximum resources accepted during one render while remote fallback is enabled.

public Int32 MaximumResourceRequests { get; set; } #

Maximum resolver invocations attempted during one render while remote fallback is enabled.

public TimeSpan ResourceTimeout { get; set; } #

Maximum duration of one resolver invocation while remote fallback is enabled.