CoreWebView2DownloadOperation Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a download operation. Gives access to a download's metadata and supports a user canceling, pausing, or resuming a download.
public class CoreWebView2DownloadOperation
type CoreWebView2DownloadOperation = class
Public Class CoreWebView2DownloadOperation
- Inheritance
-
CoreWebView2DownloadOperation
Bytes |
The number of bytes that have been written to the download file. |
Can |
Returns true if an interrupted download can be resumed. Downloads with the following interrupt reasons may automatically resume without you calling any methods: @CoreWebView2DownloadInterruptReason$.ServerNoRange, @CoreWebView2DownloadInterruptReason$.FileHashMismatch, @CoreWebView2DownloadInterruptReason$.FileTooShort. In these cases progress may be restarted with @CoreWebView2DownloadOperation.BytesReceived set to 0. |
Content |
The Content-Disposition header value from the download's HTTP response. If none, the value is an empty string. |
Estimated |
The estimated end time of the download. |
Interrupt |
The reason why connection with file host was broken. |
Mime |
MIME type of the downloaded content. |
Result |
The absolute path to the download file, including file name. |
State |
The state of the download. A download can be in progress, interrupted, or completed. |
Total |
The total bytes to receive count. |
Uri |
The URI of the download. |
Cancel() |
Cancels the download. |
Pause() |
Pauses the download. If paused, the default download dialog shows that the download is paused. No effect if download is already paused. Pausing a download changes the state from in progress to interrupted, with interrupt reason set to @CoreWebView2DownloadInterruptReason$.UserCanceled. |
Resume() |
Resumes a paused download. May also resume a download that was interrupted for another reason if CanResume returns true. |
Bytes |
Event raised when the bytes received count is updated. |
Estimated |
Event raised when the estimated end time changes. |
State |
Event raised when the state of the download changes. Use @CoreWebView2DownloadOperation$.State to get the current state, and @CoreWebView2DownloadOperation$.InterruptReason to get the reason if the download is interrupted. |