Example:
public class ArrayOfDelegates
{
public void Test()
{
var array = new List<Action>()
{
() =>
{
Read();
},
() =>
{
Write();
}
};
}
public void Read()
{
SimpleFile.Read();
}
public void Write()
{
SimpleFile.Write("");
}
}
Expected result
When transforming the class into a new type, the Read and Write method shall only be converted to async and not also copied.
public class ArrayOfDelegatesAsync
{
public Task ReadAsync()
{
return SimpleFile.ReadAsync();
}
public Task WriteAsync()
{
return SimpleFile.WriteAsync("");
}
}
Example:
Expected result
When transforming the class into a new type, the
ReadandWritemethod shall only be converted to async and not also copied.