Mime |
public Task WriteToAsync( Stream stream, CancellationToken cancellationToken = default )
Exception | Condition |
---|---|
ArgumentNullException | stream is null. |
ObjectDisposedException | The MimeContent has been disposed. |
OperationCanceledException | The operation was canceled via the cancellation token. |
IOException | An I/O error occurred. |
This is equivalent to simply using CopyTo(Stream) to copy the content stream to the output stream except that this method is cancellable.
Note |
---|
If you want the decoded content, use DecodeTo(Stream, CancellationToken) instead. |