本文整理汇总了C#中Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.GetDirectoryReference方法的典型用法代码示例。如果您正苦于以下问题:C# CloudBlobContainer.GetDirectoryReference方法的具体用法?C# CloudBlobContainer.GetDirectoryReference怎么用?C# CloudBlobContainer.GetDirectoryReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.WindowsAzure.StorageClient.CloudBlobContainer
的用法示例。
在下文中一共展示了CloudBlobContainer.GetDirectoryReference方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SelectProtocolResponse
/// <summary>
/// Selects the protocol response.
/// </summary>
/// <param name="protocolItem">The protocol item.</param>
/// <param name="service">The service.</param>
/// <param name="container">The container.</param>
/// <returns>The parsed <see cref="IListBlobItem"/>.</returns>
internal static IListBlobItem SelectProtocolResponse(IListBlobEntry protocolItem, CloudBlobClient service, CloudBlobContainer container)
{
BlobEntry blob = protocolItem as BlobEntry;
if (blob != null)
{
var attributes = blob.Attributes;
CloudBlob cloudBlob;
if (attributes.Properties.BlobType == BlobType.BlockBlob)
{
cloudBlob = new CloudBlockBlob(attributes, service, ConvertDateTimeToSnapshotString(attributes.Snapshot));
}
else if (attributes.Properties.BlobType == BlobType.PageBlob)
{
cloudBlob = new CloudPageBlob(attributes, service, ConvertDateTimeToSnapshotString(attributes.Snapshot));
}
else
{
cloudBlob = new CloudBlob(attributes, service, ConvertDateTimeToSnapshotString(attributes.Snapshot));
}
return cloudBlob;
}
BlobPrefixEntry blobPrefix = protocolItem as BlobPrefixEntry;
if (blobPrefix != null)
{
if (container != null)
{
return container.GetDirectoryReference(blobPrefix.Name);
}
else
{
return new CloudBlobDirectory(blobPrefix.Name, service);
}
}
throw new InvalidOperationException("Invalid blob list item returned");
}
示例2: MsgSetBlobPack
public MsgSetBlobPack(CloudBlobContainer container, string path)
{
dir = container.GetDirectoryReference(path);
}
示例3: PrefixTreeBlob
public PrefixTreeBlob(CloudBlobContainer container, string path)
{
dir = container.GetDirectoryReference(path);
}