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

Commit bc31b50

Browse files
committed
Incorporate name changes from HttpAbstractions
1 parent 89b958b commit bc31b50

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ public SendFileMiddleware(RequestDelegate next)
5151
public Task Invoke(HttpContext context)
5252
{
5353
// Check if there is a SendFile feature already present
54-
if (context.GetFeature<IHttpSendFile>() == null)
54+
if (context.GetFeature<IHttpSendFileFeature>() == null)
5555
{
56-
context.SetFeature<IHttpSendFile>(new SendFileWrapper(context.Response.Body));
56+
context.SetFeature<IHttpSendFileFeature>(new SendFileWrapper(context.Response.Body));
5757
}
5858

5959
return _next(context);
6060
}
6161

62-
private class SendFileWrapper : IHttpSendFile
62+
private class SendFileWrapper : IHttpSendFileFeature
6363
{
6464
private readonly Stream _output;
6565

src/Microsoft.AspNet.StaticFiles/SendFileResponseExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static bool SupportsSendFile(this HttpResponse response)
3939
{
4040
throw new ArgumentNullException("response");
4141
}
42-
return response.HttpContext.GetFeature<IHttpSendFile>() != null;
42+
return response.HttpContext.GetFeature<IHttpSendFileFeature>() != null;
4343
}
4444

4545
/// <summary>
@@ -72,7 +72,7 @@ public static Task SendFileAsync(this HttpResponse response, string fileName, lo
7272
{
7373
throw new ArgumentNullException("response");
7474
}
75-
IHttpSendFile sendFile = response.HttpContext.GetFeature<IHttpSendFile>();
75+
var sendFile = response.HttpContext.GetFeature<IHttpSendFileFeature>();
7676
if (sendFile == null)
7777
{
7878
throw new NotSupportedException(Resources.Exception_SendFileNotSupported);

src/Microsoft.AspNet.StaticFiles/StaticFileContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ public async Task SendAsync()
331331
ApplyResponseHeaders(Constants.Status200Ok);
332332

333333
string physicalPath = _fileInfo.PhysicalPath;
334-
IHttpSendFile sendFile = _context.GetFeature<IHttpSendFile>();
334+
var sendFile = _context.GetFeature<IHttpSendFileFeature>();
335335
if (sendFile != null && !string.IsNullOrEmpty(physicalPath))
336336
{
337337
await sendFile.SendFileAsync(physicalPath, 0, _length, _request.CallCanceled);
@@ -377,7 +377,7 @@ internal async Task SendRangeAsync()
377377
ApplyResponseHeaders(Constants.Status206PartialContent);
378378

379379
string physicalPath = _fileInfo.PhysicalPath;
380-
IHttpSendFile sendFile = _context.GetFeature<IHttpSendFile>();
380+
var sendFile = _context.GetFeature<IHttpSendFileFeature>();
381381
if (sendFile != null && !string.IsNullOrEmpty(physicalPath))
382382
{
383383
await sendFile.SendFileAsync(physicalPath, start, length, _request.CallCanceled);

0 commit comments

Comments
 (0)