Rename IHttpContextContainer to IDefaultHttpContextContainer (#7217)

- Renamed since the property has to be a DefaultHttpContext
This commit is contained in:
David Fowler 2019-02-02 22:31:49 -08:00 committed by GitHub
parent 8564093627
commit 9f202feafc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ namespace Microsoft.AspNetCore.Http
private static DefaultHttpContext CreateHttpContext(IFeatureCollection featureCollection) private static DefaultHttpContext CreateHttpContext(IFeatureCollection featureCollection)
{ {
if (featureCollection is IHttpContextContainer container) if (featureCollection is IDefaultHttpContextContainer container)
{ {
return container.HttpContext; return container.HttpContext;
} }

View File

@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.Http
private static DefaultHttpContext CreateHttpContext(IFeatureCollection featureCollection) private static DefaultHttpContext CreateHttpContext(IFeatureCollection featureCollection)
{ {
if (featureCollection is IHttpContextContainer container) if (featureCollection is IDefaultHttpContextContainer container)
{ {
return container.HttpContext; return container.HttpContext;
} }

View File

@ -4,7 +4,7 @@ using System.Text;
namespace Microsoft.AspNetCore.Http namespace Microsoft.AspNetCore.Http
{ {
public interface IHttpContextContainer public interface IDefaultHttpContextContainer
{ {
DefaultHttpContext HttpContext { get; } DefaultHttpContext HttpContext { get; }
} }

View File

@ -23,7 +23,7 @@ using Microsoft.Extensions.Primitives;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{ {
public abstract partial class HttpProtocol : IHttpContextContainer, IHttpResponseControl public abstract partial class HttpProtocol : IDefaultHttpContextContainer, IHttpResponseControl
{ {
private static readonly byte[] _bytesConnectionClose = Encoding.ASCII.GetBytes("\r\nConnection: close"); private static readonly byte[] _bytesConnectionClose = Encoding.ASCII.GetBytes("\r\nConnection: close");
private static readonly byte[] _bytesConnectionKeepAlive = Encoding.ASCII.GetBytes("\r\nConnection: keep-alive"); private static readonly byte[] _bytesConnectionKeepAlive = Encoding.ASCII.GetBytes("\r\nConnection: keep-alive");
@ -274,7 +274,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
protected HttpResponseHeaders HttpResponseHeaders { get; } = new HttpResponseHeaders(); protected HttpResponseHeaders HttpResponseHeaders { get; } = new HttpResponseHeaders();
DefaultHttpContext IHttpContextContainer.HttpContext DefaultHttpContext IDefaultHttpContextContainer.HttpContext
{ {
get get
{ {