From 3f1d6556ad17606cca24ad8e8bd16742e5d3c60a Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Mon, 13 Apr 2015 20:18:01 +0200 Subject: [PATCH] draft of GetMetdataForAllCultures --- src/OnePeek.Api/AppMetadataEndpoint.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/OnePeek.Api/AppMetadataEndpoint.cs b/src/OnePeek.Api/AppMetadataEndpoint.cs index 611725e..6433f36 100644 --- a/src/OnePeek.Api/AppMetadataEndpoint.cs +++ b/src/OnePeek.Api/AppMetadataEndpoint.cs @@ -8,6 +8,7 @@ using System.Xml.Linq; using System.Linq; using System.Collections.Generic; using System.Diagnostics; +using System.Threading; namespace OnePeek.Api { @@ -98,11 +99,19 @@ namespace OnePeek.Api - public async Task>> GetMetadataForAllCultures(string appId, StoreType store) + public async Task> GetMetadataForAllCultures(string appId, StoreType store, CancellationToken ct, IProgress progress) { IEnumerable cultures = Enum.GetValues(typeof(StoreCultureType)).Cast(); - throw new NotImplementedException(); + IEnumerable> tasks = cultures.Select(culture => + { + return GetMetadata(appId, store, culture); + }); + + return await Task.WhenAll(tasks).ConfigureAwait(false); } } + + + public class DownloadProgressChangedEventArgs : EventArgs { } }