I'm creating a service layer for my WPF app that will wrap a web API client that uses Action<T>
callbacks for it's asynchronous methods. Since I'm going to need to wrap the methods anyway, I was considering making my wrapper methods of my service layer conform to the new Task
-based async pattern of .NET 4.5, rather than expose Action<T>
callbacks.
I don't currently have a pressing need for Task
-based async, but I also don't have any reason that I necessarily have to stay with the callbacks and wrapping seems easy enough (as described here) Backwards compatibility isn't an issue. That said, if there are any pitfalls to such Action<T>
callbacks to Tasks wrapping, I'll just maintain the status quo.