예제 #1
0
 public async Task <IDirectory[]> GetDirectories()
 {
     return((await Task.WhenAll(ContentDirectories.Select(async a => await a.GetDirectories()))).SelectMany(a => a)
            .GroupBy(a => a.Name).Select(a =>
     {
         var list = a.ToArray();
         if (a.Count() == 1)
         {
             return list[0];
         }
         else if (a.Count() == 0)
         {
             return null;
         }
         else
         {
             return new DirectoryCombined(list, a.Key);
         }
     }).Where(a => a != null).ToArray());
 }
예제 #2
0
 public async Task <IFile[]> GetFiles()
 {
     return((await Task.WhenAll(ContentDirectories.Select(async a => await a.GetFiles()))).SelectMany(a => a).ToArray());
 }