小编Ami*_*han的帖子

How to get only folder name in blob using new Azure.Storage.Blobs namespace

快照

I want to get all the folder name under a container using new SDK - Azure.Storage.Blobs

c# azure azure-blob-storage

5
推荐指数
1
解决办法
5344
查看次数

将方法转换为 C# 中的泛型方法

如何将此方法转换为通用形式。由于对象的属性,我无法这样做。

private async Task<T> GetSalesforceMachineData<T>()
{
    T machineData = await CallSalesforceApi<T>();
    while (!machineData.done)
    {
        var encodedUrl = HttpUtility.UrlEncode(machineData.nextRecordsUrl);
        T nextData = await GetNextData<T>(encodedUrl);
        machineData.done = nextData.done; //not able to convert because of these properties
        machineData.nextRecordsUrl = nextData.nextRecordsUrl;//not able to convert because of these properties
        machineData.records.AddRange(nextData.records);//not able to convert because of these properties
    }
    return machineData;
}
Run Code Online (Sandbox Code Playgroud)

像这样的东西

private async Task<T> GetSalesforceMachineData<T>()
{
    T machineData = await CallSalesforceApi<T>();
    while (!machineData.done)
    {
        var encodedUrl = HttpUtility.UrlEncode(machineData.nextRecordsUrl);
        T nextData = await GetNextData<T>(encodedUrl);
        machineData.done …
Run Code Online (Sandbox Code Playgroud)

.net c# asp.net

0
推荐指数
1
解决办法
64
查看次数

标签 统计

c# ×2

.net ×1

asp.net ×1

azure ×1

azure-blob-storage ×1