-
StackOverflow 文件
-
azure 教程
-
Azure 媒體服務帳戶
-
從資產中檢索專案
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;
}
}