Add support for delegate parameters
Example:
public class MethodWithDelegate
{
public void Test()
{
Read(() => SimpleFile.Read());
}
public void Read(Action action)
{
action();
SimpleFile.Read();
}
}
Desired result
public partial class MethodWithDelegate
{
public Task TestAsync()
{
return ReadAsync(() => SimpleFile.ReadAsync());
}
public async Task ReadAsync(Func<Task> action)
{
await action();
await SimpleFile.ReadAsync();
}
}
I think the title needs to be refined:)
Hmm what do you suggest? :)
The idea of this issue is about parameter transformation e.g. from Action to Func<Task>, once the parameter would be marked to be asyncable then the argument would be also converted. The logic for converting the argument is already implemented.
I don't know. It's just you've had "Add better support for delegate arguments" now "Add support for delegate parameters". Or is it in the difference between "arguments" and "parameters"?
Or is it difference between "arguments" and "parameters"?
Yes. I know that the titles are almost the same but main difference is argument vs parameter. Transforming an argument is different from transforming a parameter. I'm open to suggestions for a better title name :)