本文整理匯總了C#中Microsoft.WindowsAzure.Storage.Queue.CloudQueueClient.ListQueues方法的典型用法代碼示例。如果您正苦於以下問題:C# CloudQueueClient.ListQueues方法的具體用法?C# CloudQueueClient.ListQueues怎麽用?C# CloudQueueClient.ListQueues使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Microsoft.WindowsAzure.Storage.Queue.CloudQueueClient
的用法示例。
在下文中一共展示了CloudQueueClient.ListQueues方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CreateMissingQueues
private void CreateMissingQueues(CloudQueueClient cloudQueueClient)
{
var shards = cloudQueueClient.ListQueues()
.Where(q => q.Name.StartsWith(queueName, StringComparison.InvariantCulture))
.Select(q => q.Name);
var queueNames = Enumerable.Range(0, queueCount)
.Select(i => queueName + i)
.Where(n => !shards.Contains(n))
.ToList();
foreach (var name in queueNames)
{
var q = cloudQueueClient.GetQueueReference(name);
q.CreateIfNotExists();
}
}
示例2: LoadLeftPane
//.........這裏部分代碼省略.........
}
}
}
blobSection.Header = "Blob Containers (" + containers.Count().ToString() + ")";
switch(LastItemType)
{
case ItemType.BLOB_SERVICE:
case ItemType.BLOB_CONTAINER:
blobSection.IsExpanded = true;
break;
case ItemType.QUEUE_SERVICE:
case ItemType.QUEUE_CONTAINER:
queueSection.IsExpanded = true;
break;
case ItemType.TABLE_SERVICE:
case ItemType.TABLE_CONTAINER:
tableSection.IsExpanded = true;
break;
default:
blobSection.IsExpanded = true;
break;
}
}
catch (Exception ex)
{
ShowError("Error enumering blob containers in the storage account: " + ex.Message);
}
try
{
IEnumerable<CloudQueue> queues = queueClient.ListQueues();
if (queues != null)
{
foreach (CloudQueue queue in queues)
{
StackPanel stack = new StackPanel();
stack.Orientation = Orientation.Horizontal;
Image cloudFolderImage = new Image();
cloudFolderImage.Source = new BitmapImage(new Uri("pack://application:,,/Images/cloud_queue.png"));
cloudFolderImage.Height = 24;
Label label = new Label();
label.Content = queue.Name;
stack.Children.Add(cloudFolderImage);
stack.Children.Add(label);
queueSection.Items.Add(new TreeViewItem()
{
Header = stack,
Tag = new OutlineItem()
{
ItemType = ItemType.QUEUE_CONTAINER,
Container = queue.Name
}
});
}
}
queueSection.Header = "Queues (" + queues.Count().ToString() + ")";
}
catch (Exception ex)