API Reference
EmailDocumentReader
Reads bounded email and Outlook artifacts into the shared EmailDocument model.
Inheritance
- Object
- EmailDocumentReader
Constructors
Methods
public static EmailFileFormat DetectFormat(Byte[] data) #EmailFileFormatDetects the artifact format from content rather than the filename.
Parameters
- data System.Byte[]
public static EmailFileFormat DetectFormat(Stream stream, EmailReaderOptions options = null) #EmailFileFormatDetects an artifact from the beginning of a seekable stream and restores its original position. Non-seekable streams are inspected forward from their current position.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.EmailReaderOptions = null
public EmailReadResult Read(String filePath, CancellationToken cancellationToken = null) #EmailReadResultReads an artifact from a file.
Parameters
- filePath System.String
- cancellationToken System.Threading.CancellationToken = null
public EmailReadResult Read(Byte[] data, CancellationToken cancellationToken = null) #EmailReadResultReads an artifact from memory.
Parameters
- data System.Byte[]
- cancellationToken System.Threading.CancellationToken = null
public EmailReadResult Read(Byte[] data, String sourceName, CancellationToken cancellationToken = null) #EmailReadResultReads an artifact from memory and uses the logical source name to distinguish extension-defined formats such as an Outlook template (.oft) from an Outlook message (.msg).
Parameters
- data System.Byte[]
- sourceName System.String
- cancellationToken System.Threading.CancellationToken = null
public EmailReadResult Read(Stream stream, CancellationToken cancellationToken = null) #EmailReadResultReads a complete artifact 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
- cancellationToken System.Threading.CancellationToken = null
public EmailReadResult Read(Stream stream, String sourceName, CancellationToken cancellationToken = null) #EmailReadResultReads an artifact without closing the stream and uses the logical source name to distinguish extension-defined formats such as .oft.
Parameters
- stream System.IO.Stream
- sourceName System.String
- cancellationToken System.Threading.CancellationToken = null
public async Task<EmailReadResult> ReadAsync(String filePath, CancellationToken cancellationToken = null) #Task<EmailReadResult>Asynchronously reads an artifact from a file.
Parameters
- filePath System.String
- cancellationToken System.Threading.CancellationToken = null
public async Task<EmailReadResult> ReadAsync(Stream stream, CancellationToken cancellationToken = null) #Task<EmailReadResult>Asynchronously reads a complete artifact 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
- cancellationToken System.Threading.CancellationToken = null
public async Task<EmailReadResult> ReadAsync(Stream stream, String sourceName, CancellationToken cancellationToken = null) #Task<EmailReadResult>Asynchronously reads an artifact without closing the stream and applies extension-defined source semantics.
Parameters
- stream System.IO.Stream
- sourceName System.String
- cancellationToken System.Threading.CancellationToken = null
public EmailReadResult ReadStreaming(Stream stream, String sourceName = null, CancellationToken cancellationToken = null) #EmailReadResultReads an artifact with large payloads retained as reopenable temporary-file sources. Dispose the returned result when those sources are no longer needed.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- cancellationToken System.Threading.CancellationToken = null
public EmailReadResult ReadStreaming(String filePath, CancellationToken cancellationToken = null) #EmailReadResultReads a file through the streaming payload path.
Parameters
- filePath System.String
- cancellationToken System.Threading.CancellationToken = null
public async Task<EmailReadResult> ReadStreamingAsync(Stream stream, String sourceName = null, CancellationToken cancellationToken = null) #Task<EmailReadResult>Asynchronously stages source I/O and reads large payloads into reopenable temporary-file sources. Dispose the returned result when those sources are no longer needed.
Parameters
- stream System.IO.Stream
- sourceName System.String = null
- cancellationToken System.Threading.CancellationToken = null
public async Task<EmailReadResult> ReadStreamingAsync(String filePath, CancellationToken cancellationToken = null) #Task<EmailReadResult>Asynchronously reads a file through the streaming payload path.
Parameters
- filePath System.String
- cancellationToken System.Threading.CancellationToken = null
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public EmailReaderOptions Options { get; } #Reader policy used by this instance.