C#C
C#3y ago
SWEETPONY

✅ How to get arguments from one method and pass them to another extension?

I have following:
var subjects = await _subjectServiceClient
    .QueryQl(filter,fieldSet)
    .WithChunks();


What I want:
  1. if user don't use WithChunks extension than I just need to run all logic inside QueryQl
  2. if user use WithChunks than I need to run logic inside WithChunks
now it looks simple:
static public async Task<List<T>> WithChunks<T>(this Task<MqttResult<T>> task)
{
    return null;
}


WithChunks is smth generic so I don't need to pass filter, fieldSet, I want to get it from task but how can I do it?
Was this page helpful?