Should I await or just return task? Given following example of wrapper, what are consequences of using either async/await or returning a task?
class IFoo{
Task BarAsync();
}
class FooWrapper{
private IFoo _foo;
public Task BarAsync1()
{
Trace.WriteLine("BarAsync1 called");
return _foo.BarAsync();
}
public async Task BarAsync2(){
Trace.WriteLine("BarAsync2 called");
await _foo.BarAsync();
}
}
Is there a guidline for simmilar scenarios?