
I want to get all the folder name under a container using new SDK - Azure.Storage.Blobs
如何将此方法转换为通用形式。由于对象的属性,我无法这样做。
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)