QueryOptions.SetPropertyPrefetch 方法

定義

指定系統應該在查詢結果集中執行時,針對查詢結果集中的所有專案預先載入的屬性 (,而不是依大小寫的方式擷取它們) 。 如果指定許多屬性,查詢可能需要較長的時間才能執行,但查詢結果的後續屬性擷取速度會更快。

public:
 virtual void SetPropertyPrefetch(PropertyPrefetchOptions options, IIterable<Platform::String ^> ^ propertiesToRetrieve) = SetPropertyPrefetch;
void SetPropertyPrefetch(PropertyPrefetchOptions const& options, IIterable<winrt::hstring> const& propertiesToRetrieve);
public void SetPropertyPrefetch(PropertyPrefetchOptions options, IEnumerable<string> propertiesToRetrieve);
function setPropertyPrefetch(options, propertiesToRetrieve)
Public Sub SetPropertyPrefetch (options As PropertyPrefetchOptions, propertiesToRetrieve As IEnumerable(Of String))

參數

options
PropertyPrefetchOptions

值,指定要事先擷取的屬性集。

可能的屬性集符合 StorageFile 類別中可用的屬性集。 例如, PropertyPrefetchOptions.BasicProperties 會事先透過 StorageFile.GetBasicPropertiesAsync 擷取所有可用的屬性。

propertiesToRetrieve

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

預先擷取為屬性名稱陣列的屬性自訂清單。 使用系統屬性名稱來指定屬性,例如 System.CopyrightSystem.Image.ColorSpace

要擷取的其他屬性清單。

適用於

另請參閱