ContentPrefetchTrigger Kelas
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menyediakan kemampuan untuk menjalankan handler kustom saat melakukan prefetching sumber daya 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
- Warisan
- Atribut
- Penerapan
Persyaratan Windows
Rangkaian perangkat |
Windows 10 (diperkenalkan dalam 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v1.0)
|
Keterangan
Pengembang dapat melampirkan handler ke konten web pramuat dan cache sehingga aplikasi dapat diluncurkan dan kontennya di-refresh dan diperbarui. Mengakses konten yang di-cache membantu mengurangi waktu aktivasi aplikasi dengan tidak harus mengantre permintaan web yang mahal.
Selain tugas kustom, ContentPrefetcher API yang ada masih tersedia dan dapat digunakan alih-alih tugas kustom ketika pekerjaan prasyarat hanya melibatkan pramuat dan penembolokan konten dari sekumpulan URI tetap atau dinamis.
Konstruktor
ContentPrefetchTrigger() |
Menginisialisasi instans baru kelas ContentPrefetchTrigger . |
ContentPrefetchTrigger(TimeSpan) |
Menginisialisasi instans baru kelas ContentPrefetchTrigger menggunakan interval waktu tertentu. |
Properti
WaitInterval |
Mengambil interval waktu untuk mengambil konten web sebelumnya. |