Windows.Networking.BackgroundTransfer Namespace

啟用應用程式內的進階下載和上傳傳輸能力。 如需背景傳輸能力的概觀,請參閱在背景傳輸資料。下載背景傳輸範例,以取得其中使用 JavaScript、C# 和 C++ 所撰寫的範例。

注意事項  背景傳輸主要設計用來執行視訊、音樂和大型影像等資源的長期傳輸作業。對於有關傳輸較小型資源 (例如 2 KB) 的短期作業,建議使用 HTTP 應用程式開發介面。 HttpClient 是慣用,可用於 Windows 市集應用程式支援的所有語言。XHR 可以在 JavaScript 中使用。IXHR2 可以用於 C++。

成員

Windows.Networking.BackgroundTransfer命名空間 具有下列類型的成員:

類別

Windows.Networking.BackgroundTransfer命名空間 具有這些類別。

類別描述
BackgroundDownloader Used to configure downloads prior to the actual creation of the download operation using CreateDownload.
BackgroundTransferContentPart Represents a content part of a multi-part transfer request. Each BackgroundTransferContentPart object can represent either a single string of text content or a single file payload, but not both.
BackgroundTransferError Used to provide errors encountered during a transfer operation.
BackgroundTransferGroup A named group used to associate multiple download or upload operations. This class makes it easy for your app to create these groups and to complete downloads and uploads simultaneously, in serial, or based on priority.
BackgroundUploader Used to configure upload prior to the actual creation of the upload operation using CreateUpload.
ContentPrefetcher Provides properties for specifying web resources to be prefetched. Windows will use heuristics to attempt to download the specified resources in advance of your app being launched by the user.
DownloadOperation Performs an asynchronous download operation. The Background Transfer sample demonstrates this functionality.
ResponseInformation Represents data that is returned by a server response.
UnconstrainedTransferRequestResult Represents the result a request for unconstrained transfers from a BackgroundDownloader or BackgroundUploader object.
UploadOperation Performs an asynchronous upload operation.

 

列舉

Windows.Networking.BackgroundTransfer命名空間 具有這些列舉。

列舉描述
BackgroundTransferBehavior Defines values used to indicate if downloads and uploads within a BackgroundTransferGroup run in simultaneously or in serial.
BackgroundTransferCostPolicy Defines values used to specify whether transfers can occur on metered networks.
BackgroundTransferPriority Defines the values used to indicate the priority of a download or upload operation when within a BackgroundTransferGroup.
BackgroundTransferStatus Defines transfer operation status values.

 

介面

Windows.Networking.BackgroundTransfer命名空間 會定義這些介面。

介面描述
IBackgroundTransferBase Represents a background transfer operation.
IBackgroundTransferContentPartFactory Creates a BackgroundTransferContentPart object.
IBackgroundTransferOperation Represents a background transfer operation.
IBackgroundTransferOperationPriority Use this interface to determine the priority of a downloads or uploads within a BackgroundTransferGroup. Possible values are defined by the BackgroundTransferPriority enumeration.

 

結構

Windows.Networking.BackgroundTransfer命名空間 具有這些結構。

結構描述
BackgroundDownloadProgress Contains status information about the download operation.
BackgroundUploadProgress Contains status information about the upload operation.

 

備註

需求

支援的最小用戶端

Windows 8

支援的最小伺服器

Windows Server 2012

命名空間

Windows.Networking.BackgroundTransfer
Windows::Networking::BackgroundTransfer [C++]

Metadata

Windows.winmd

請參閱

其他資源
加入網路的支援
如何設定網路隔離功能
快速入門:下載檔案
快速入門:上傳檔案
傳輸網路資源中的檔案
在背景中傳輸資料
參考
HttpClient
IXHR2
Windows.Storage
XHR
範例
背景傳輸範例

 

 

顯示:
© 2015 Microsoft