Reputation: 5314
I'm looking to override BeginRead
on a custom stream. ReadAsync
would be much easier to implement because it can use await
. Can I reuse that code to override BeginRead
as well? What's a good way to do that?
Upvotes: 0
Views: 160
Reputation: 14846
It's just tedious code.
But you can find several TaskToApm
on source.dot.net.
Just choose the one that best fits your needs.
Upvotes: 1