【问题标题】:How to list all the containers in an azure storage account (in C#, azure version 12.x)如何列出 azure 存储帐户中的所有容器(在 C# 中,azure 版本 12.x)
【发布时间】:2020-06-23 00:37:44
【问题描述】:

我只能使用 CloudBlobClient 找到已弃用的版本。我有如下代码,

                DataLakeServiceClient datalakeServiceClient = GetDSClient(connectionString);
                AsyncPageable<FileSystemItem> fsItems = datalakeServiceClient.GetFileSystemAsync(FileSystemTraits.Metadata);
                // how to deal with it now? for some reason, I cannot use await foreach yet

谢谢, 鹰派

【问题讨论】:

    标签: list azure asynchronous containers


    【解决方案1】:

    由于某种原因,我还不能使用 await foreach

    await foreach 在 C# 8.0 中,因此请检查您的项目文件。你应该可以 enable it 这样做

    <PropertyGroup>
      <LangVersion>latest</LangVersion>
    </PropertyGroup>
    

    【讨论】:

      猜你喜欢
      • 2022-01-22
      • 2021-04-16
      • 2014-05-02
      • 1970-01-01
      • 2016-05-24
      • 2021-01-07
      • 2021-06-03
      • 2022-11-11
      • 2018-11-12
      相关资源
      最近更新 更多