ContentPrefetcher.ContentUris 属性

定义

为应用执行预提取时要下载的 URI 数组。

public:
 static property IVector<Uri ^> ^ ContentUris { IVector<Uri ^> ^ get(); };
static IVector<Uri> ContentUris();
public static IList<System.Uri> ContentUris { get; }
var iVector = ContentPrefetcher.contentUris;
Public Shared ReadOnly Property ContentUris As IList(Of Uri)

属性值

Uri 对象的列表。

注解

以下示例演示了创建和分配用于预提取的 URI:

//First, create content URIs
var uris = [new Windows.Foundation.Uri("http://www.microsoft.com/logo.jpg"),
            new Windows.Foundation.Uri("http://www.microsoft.com/heroimage.jpg")];

//clear the old list
Windows.Networking.BackgroundTransfer.ContentPrefetcher.ContentUris.Clear();
Windows.Networking.BackgroundTransfer.ContentPrefetcher.IndirectContentUri = null; // Remove this if your app never uses IndirectContentUri

//next set these as the content URIs:
for(vari=0;i<uris.length;i++){
Windows.Networking.BackgroundTransfer.ContentPrefetcher.ContentUris.Append(uris[i]);
}

适用于

另请参阅