public async Task QueueCallAsync(Task apiCall, RequestType requestType)
{
// how do you forward the call to the generic implementation while omitting the result?
await QueueCallAsync<Void>(apiCall, requestType);
}
public async Task<T> QueueCallAsync<T>(Task<T> apiCall, RequestType requestType)
{
}
So far all i achieved was recursive calls or non compilable code. I would rather wrap the generic implementation instead of duplicating the code.
Does anyone know how to tell the c# compiler to use the generic method here?
Unlike other questions I am wondering if there is a built in, intended way, to solve this without the use of reflection.
I would rather copy paste code than reflect in this case.