共用方式為


ContentPrefetchTrigger 類別

定義

提供在預先擷取 Web 資源時執行自訂處理常式的能力。

public ref class ContentPrefetchTrigger sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IContentPrefetchTriggerFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class ContentPrefetchTrigger final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IContentPrefetchTriggerFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class ContentPrefetchTrigger final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IContentPrefetchTriggerFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public sealed class ContentPrefetchTrigger
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IContentPrefetchTriggerFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class ContentPrefetchTrigger
function ContentPrefetchTrigger(waitInterval)
Public NotInheritable Class ContentPrefetchTrigger
繼承
Object Platform::Object IInspectable ContentPrefetchTrigger
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

開發人員可以附加處理常式來預先載入和快取 Web 內容,讓應用程式可以啟動並讓其內容重新整理並更新為最新狀態。 存取快取的內容有助於減少應用程式啟用時間,因為不需要將昂貴的 Web 要求排入佇列。

除了自訂工作之外,現有的 ContentPrefetcher API 仍然可用,而且可以在必要工作只涉及預先載入和快取固定或動態 URI 的內容集時使用,而不是自訂工作。

建構函式

ContentPrefetchTrigger()

初始化 ContentPrefetchTrigger 類別的新實例。

ContentPrefetchTrigger(TimeSpan)

使用指定的時間間隔,初始化 ContentPrefetchTrigger 類別的新實例。

屬性

WaitInterval

擷取預先擷取 Web 內容的時間間隔。

適用於

另請參閱