MhtmlRenderingOptions Class

MhtmlRenderingOptions class

Represents options for rendering MHTML documents with attachment selection.

public class MhtmlRenderingOptions

Constructors

NameDescription
MhtmlRenderingOptions()Initializes a new instance of the MhtmlRenderingOptions class.

Properties

NameDescription
ExcludedAttachments { get; }Gets the set of attachment URLs to exclude from rendering. Only used when RenderAllAttachments is true.
RenderAllAttachments { get; set; }Gets or sets a value indicating whether to render all attachments found in the MHTML document. When true (default), all attachments are rendered. When false, only explicitly selected attachments are rendered.
SelectedAttachments { get; }Gets the set of attachment URLs to include for rendering. Only used when RenderAllAttachments is false.

Methods

NameDescription
ExcludeAttachment(string)Excludes a specific attachment from rendering by its URL. Only used when RenderAllAttachments is true.
ExcludeAttachments(IEnumerable<string>)Excludes multiple attachments from rendering by their URLs. Only used when RenderAllAttachments is true.
Reset()Clears all attachment selection/exclusion settings and restores default behavior.
SelectAttachment(string)Selects a specific attachment for rendering by its URL.
SelectAttachments(IEnumerable<string>)Selects multiple attachments for rendering by their URLs.
ShouldRenderAttachment(string)Determines whether a specific attachment should be rendered based on the current options.

See Also