private async void RetrieveAppContentHelper(GetQueryDelegate getQuery) { var indexedFolder = await Windows.Storage.ApplicationData.Current.LocalFolder.CreateFolderAsync("Indexed", Windows.Storage.CreationCollisionOption.OpenIfExists); var query = getQuery(indexedFolder); var files = await query.GetFilesAsync(); string[] propertyKeys = { Windows.Storage.SystemProperties.ItemNameDisplay, Windows.Storage.SystemProperties.Keywords, Windows.Storage.SystemProperties.Comment, Windows.Storage.SystemProperties.Title }; var outputString = ""; foreach (var file in files) { var retrievedProperties = await file.Properties.RetrievePropertiesAsync(propertyKeys); outputString += "Name: " + Helpers.StringifyProperty(retrievedProperties[Windows.Storage.SystemProperties.ItemNameDisplay]) + "\n"; outputString += "Keywords: " + Helpers.StringifyProperty(retrievedProperties[Windows.Storage.SystemProperties.Keywords]) + "\n"; outputString += "Comment: " + Helpers.StringifyProperty(retrievedProperties[Windows.Storage.SystemProperties.Comment]) + "\n"; outputString += "Title: " + Helpers.StringifyProperty(retrievedProperties[Windows.Storage.SystemProperties.Title]) + "\n\n"; } rootPage.NotifyUser(outputString, NotifyType.StatusMessage); }
private async void RetrieveAppContentHelper(GetQueryDelegate getQuery) { var indexedFolder = await Windows.Storage.ApplicationData.Current.LocalFolder.CreateFolderAsync("Indexed", Windows.Storage.CreationCollisionOption.OpenIfExists); var query = getQuery(indexedFolder); var files = await query.GetFilesAsync(); string[] propertyKeys = { Windows.Storage.SystemProperties.ItemNameDisplay, Windows.Storage.SystemProperties.Keywords, Windows.Storage.SystemProperties.Comment, Windows.Storage.SystemProperties.Title }; var outputString = ""; foreach (var file in files) { var retrievedProperties = await file.Properties.RetrievePropertiesAsync(propertyKeys); outputString += "Name: " + Helpers.StringifyProperty(retrievedProperties[Windows.Storage.SystemProperties.ItemNameDisplay]) + "\n"; outputString += "Keywords: " + Helpers.StringifyProperty(retrievedProperties[Windows.Storage.SystemProperties.Keywords]) + "\n"; outputString += "Comment: " + Helpers.StringifyProperty(retrievedProperties[Windows.Storage.SystemProperties.Comment]) + "\n"; outputString += "Title: " + Helpers.StringifyProperty(retrievedProperties[Windows.Storage.SystemProperties.Title]) + "\n\n"; } rootPage.NotifyUser(outputString, NotifyType.StatusMessage); }