从资产中检索项目

private static void GetAllTheAssetsAndFiles(MediaServicesCredentials _medServCredentials)
       {
           try
           {
               string result = string.Empty;
               CloudMediaContext mediaContext;
               mediaContext = new CloudMediaContext(_medServCredentials);
               StringBuilder myBuilder = new StringBuilder();
               foreach (var item in mediaContext.Assets)
               {
                   myBuilder.AppendLine(Environment.NewLine);
                   myBuilder.AppendLine("--My Assets--");
                   myBuilder.AppendLine("Name: " + item.Name);
                   myBuilder.AppendLine("++++++++++++++++++++");
 
                   foreach (var subItem in item.AssetFiles)
                   {
                       myBuilder.AppendLine("File Name: "+subItem.Name);
                       myBuilder.AppendLine("Size: " + subItem.ContentFileSize);
                       myBuilder.AppendLine("++++++++++++++++++++++");
                   }
               }
               Console.WriteLine(myBuilder);
           }
           catch (Exception)
           {
               throw;
           }
       }