当前位置: 首页>>代码示例>>C#>>正文


C# CloudBlobContainer.GetDirectoryReference方法代码示例

本文整理汇总了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");
        }
开发者ID:nickchal,项目名称:pash,代码行数:46,代码来源:CloudBlobClient.cs

示例2: MsgSetBlobPack

 public MsgSetBlobPack(CloudBlobContainer container, string path)
 {
     dir = container.GetDirectoryReference(path);
 }
开发者ID:ismaelbelghiti,项目名称:Tigwi,代码行数:4,代码来源:MsgSetBlobPack.cs

示例3: PrefixTreeBlob

 public PrefixTreeBlob(CloudBlobContainer container, string path)
 {
     dir = container.GetDirectoryReference(path);
 }
开发者ID:ismaelbelghiti,项目名称:Tigwi,代码行数:4,代码来源:PrefixTreeBlob.cs


注:本文中的Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.GetDirectoryReference方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。