static int Main(string[] args) { BlobHelper blobHelper = new BlobHelper(); foreach (CloudBlobContainer container in blobHelper.ListContainers()) { Console.WriteLine(BlobHelper.Display(container.Uri)); } return(Settings.SUCCESS); }
static int Main(string[] args) { string containerName = Settings.Container(); if (args.Length == 1) { containerName = args[0]; BlobHelper blobHelper = new BlobHelper(); foreach (IListBlobItem blob in blobHelper.ListBlobs(containerName)) { ICloudBlob cloudBlob = blob as ICloudBlob; if (cloudBlob != null) { Console.WriteLine(String.Format("{0} {1}", BlobHelper.Display(blob.Uri), cloudBlob.Properties.LastModified)); } else { Console.WriteLine(BlobHelper.Display(blob.Uri)); } } } else { BlobHelper blobHelper = new BlobHelper(); foreach (CloudBlobContainer container in blobHelper.ListContainers()) { foreach (IListBlobItem blob in container.ListBlobs()) { ICloudBlob cloudBlob = blob as ICloudBlob; if (cloudBlob != null) { Console.WriteLine(String.Format("{0} {1}", BlobHelper.Display(blob.Uri), cloudBlob.Properties.LastModified)); } else { Console.WriteLine(BlobHelper.Display(blob.Uri)); } } } } return(Settings.SUCCESS); }