Table of Contents

Method MboxToMarkdownAsync

Namespace
LMKit.Document.Conversion
Assembly
LM-Kit.NET.dll

MboxToMarkdownAsync(byte[], bool, CancellationToken)

Asynchronously converts an MBOX file (as a byte array) to Markdown.

public static Task<string> MboxToMarkdownAsync(byte[] mboxData, bool stripQuotes = false, CancellationToken cancellation = default)

Parameters

mboxData byte[]

The MBOX file content as a byte array.

stripQuotes bool

When true, quoted and reply content is removed from each email body.

cancellation CancellationToken

A cancellation token used to cancel the conversion operation.

Returns

Task<string>

A task whose result is a Markdown string representing all email messages.

Exceptions

ArgumentNullException

Thrown when mboxData is null.

MboxToMarkdownAsync(string, bool, CancellationToken)

Asynchronously converts an MBOX file at the specified path to Markdown.

public static Task<string> MboxToMarkdownAsync(string inputPath, bool stripQuotes = false, CancellationToken cancellation = default)

Parameters

inputPath string

The file system path to the MBOX file.

stripQuotes bool

When true, quoted and reply content is removed from each email body.

cancellation CancellationToken

A cancellation token used to cancel the conversion operation.

Returns

Task<string>

A task whose result is a Markdown string representing all email messages.

Exceptions

ArgumentException

Thrown when inputPath is null or whitespace.

FileNotFoundException

Thrown when the specified file does not exist.