Header ListLoad Async(Parser Options, Stream, Cancellation Token) Method
Asynchronously load a HeaderList from the specified stream.
Definition
Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The parsed list of headers.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public static Task<HeaderList> LoadAsync(
ParserOptions options,
Stream stream,
CancellationToken cancellationToken = default
)Parameters
- options ParserOptions
- The parser options.
- stream Stream
- The stream.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskHeaderListThe parsed list of headers.
Remarks
Loads a HeaderList from the given stream, using the
specified ParserOptions.
Exceptions
| ArgumentNullException |
options is . -or- stream is . |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| FormatException | There was an error parsing the headers. |
| IOException | An I/O error occurred. |