本文整理汇总了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)