Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Commit 9ac0093

Browse files
committed
Added optional CancellationToken
1 parent 41990a0 commit 9ac0093

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Microsoft.AspNet.Http.Abstractions/HttpResponse.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,16 @@ public abstract class HttpResponse
111111
/// Sends the given file using the SendFile extension.
112112
/// </summary>
113113
/// <param name="file">The file to send.</param>
114+
/// <param name="cancellationToken"></param>
114115
/// <returns></returns>
115-
public virtual Task SendFileAsync(IFileInfo file)
116+
public virtual Task SendFileAsync(IFileInfo file, CancellationToken cancellationToken = default(CancellationToken))
116117
{
117118
if (file == null)
118119
{
119120
throw new ArgumentNullException(nameof(file));
120121
}
121122

122-
return SendFileAsync(file, 0, null, CancellationToken.None);
123+
return SendFileAsync(file, 0, null, cancellationToken);
123124
}
124125

125126
/// <summary>

0 commit comments

Comments
 (0)