Click or drag to resize
MimeKit

HeaderListLoadAsync(Stream, CancellationToken) Method

Asynchronously load a HeaderList from the specified stream.

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public static Task<HeaderList> LoadAsync(
	Stream stream,
	CancellationToken cancellationToken = default
)

Parameters

stream  Stream
The stream.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

TaskHeaderList
The parsed list of headers.
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
OperationCanceledException The operation was canceled via the cancellation token.
FormatException There was an error parsing the entity.
IOException An I/O error occurred.
Remarks
Loads a HeaderList from the given stream, using the default ParserOptions.
See Also