Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

New Post: Method overloads with a CancellationToken parameter

$
0
0
Right now some of TAP-based methods in System.Net.Http.Formatting library does not have overloads with a CancellationToken parameter. For instance next classes:
HttpContent
HttpContentExtensions
HttpContentMessageExtensions
HttpContentMultipartExtensions
which methods actually can be executed for a long time period. In addition if we're trying to create custom MediaTypeFormatter we unable to cancel ReadFromStreamAsync and WriteToStreamAsync methods.

I suppose that it will be great if such methods will contain an overloads with a CancellationToken parameter, which should be integrated into Web API message handling pipeline.

What do you think about it? Is it possible to do that in the v5 release?

Viewing all articles
Browse latest Browse all 7925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>