Make CancellationToken a default param.
This commit is contained in:
parent
ff31b958fe
commit
55e491e354
|
|
@ -66,16 +66,7 @@ namespace Microsoft.AspNet.Http
|
|||
/// Gets the form collection.
|
||||
/// </summary>
|
||||
/// <returns>The form collection parsed from the request body.</returns>
|
||||
public virtual Task<IReadableStringCollection> GetFormAsync()
|
||||
{
|
||||
return GetFormAsync(CancellationToken.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the form collection.
|
||||
/// </summary>
|
||||
/// <returns>The form collection parsed from the request body.</returns>
|
||||
public abstract Task<IReadableStringCollection> GetFormAsync(CancellationToken cancel);
|
||||
public abstract Task<IReadableStringCollection> GetFormAsync(CancellationToken cancel = default(CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or set the owin.RequestProtocol.
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ namespace Microsoft.AspNet.PipelineCore
|
|||
get { return QueryFeature.Query; }
|
||||
}
|
||||
|
||||
public override Task<IReadableStringCollection> GetFormAsync(CancellationToken cancel)
|
||||
public override Task<IReadableStringCollection> GetFormAsync(CancellationToken cancel = default(CancellationToken))
|
||||
{
|
||||
return FormFeature.GetFormAsync(cancel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace Microsoft.AspNet.PipelineCore
|
|||
_bodyStream = body;
|
||||
if (!_bodyStream.CanSeek)
|
||||
{
|
||||
MemoryStream buffer = new MemoryStream();
|
||||
var buffer = new MemoryStream();
|
||||
await _bodyStream.CopyToAsync(buffer, 4096, cancel);
|
||||
_bodyStream = buffer;
|
||||
_request.Fetch(_features).Body = _bodyStream;
|
||||
|
|
|
|||
Loading…
Reference in New Issue