Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

EmailMailboxReader

OfficeIMO.Email

Namespace
OfficeIMO.Email
Assembly
OfficeIMO.Email
Source revision
551365f138da with working tree changes
Modifiers
sealed

Reads mboxo and mboxrd mailbox aggregates.

Inheritance

  • object
  • EmailMailboxReader

Constructors

EmailMailboxReader 2 overloads
public EmailMailboxReader() #

Creates a reader with the default policy.

public EmailMailboxReader(EmailMailboxReaderOptions options) #

Creates a reader with an immutable policy.

Parameters

options OfficeIMO.Email.EmailMailboxReaderOptions required

Methods

Read 3 overloads
public EmailMailboxReadResult Read(string filePath, CancellationToken cancellationToken = default) #

Reads a mailbox file.

Parameters

filePath string required
cancellationToken System.Threading.CancellationToken = default optional
public EmailMailboxReadResult Read(byte[] data, CancellationToken cancellationToken = default) #

Reads mailbox bytes.

Parameters

data byte[] required
cancellationToken System.Threading.CancellationToken = default optional
public EmailMailboxReadResult Read(Stream stream, CancellationToken cancellationToken = default) #

Reads without closing the stream. Seekable streams are read from the beginning and restored to their original position; non-seekable streams are read forward from their current position.

Parameters

stream System.IO.Stream required
cancellationToken System.Threading.CancellationToken = default optional
ReadAsync 2 overloads
public async Task<EmailMailboxReadResult> ReadAsync(string filePath, CancellationToken cancellationToken = default) #

Asynchronously reads a mailbox file.

Parameters

filePath string required
cancellationToken System.Threading.CancellationToken = default optional
public async Task<EmailMailboxReadResult> ReadAsync(Stream stream, CancellationToken cancellationToken = default) #

Asynchronously reads without closing the stream. Seekable streams are read from the beginning and restored to their original position; non-seekable streams are read forward.

Parameters

stream System.IO.Stream required
cancellationToken System.Threading.CancellationToken = default optional
ReadEntries 2 overloads
public IEnumerable<EmailMailboxEntryReadResult> ReadEntries(string filePath, CancellationToken cancellationToken = default) #

Enumerates a mailbox file while retaining at most one decoded message in memory.

Parameters

filePath string required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IEnumerable<EmailMailboxEntryReadResult>
public IEnumerable<EmailMailboxEntryReadResult> ReadEntries(Stream stream, CancellationToken cancellationToken = default) #

Enumerates a caller-owned mailbox stream while retaining at most one decoded message in memory. Seekable streams are restored to their original position when enumeration ends or is disposed.

Parameters

stream System.IO.Stream required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IEnumerable<EmailMailboxEntryReadResult>

Properties

public EmailMailboxReaderOptions Options { get; } #

Reader policy used by this instance.