Skip to content

Commit 9f202fe

Browse files
authored
Rename IHttpContextContainer to IDefaultHttpContextContainer (#7217)
- Renamed since the property has to be a DefaultHttpContext
1 parent 8564093 commit 9f202fe

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Http/Http/src/DefaultHttpContextFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public HttpContext Create(IFeatureCollection featureCollection)
4545

4646
private static DefaultHttpContext CreateHttpContext(IFeatureCollection featureCollection)
4747
{
48-
if (featureCollection is IHttpContextContainer container)
48+
if (featureCollection is IDefaultHttpContextContainer container)
4949
{
5050
return container.HttpContext;
5151
}

src/Http/Http/src/HttpContextFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public HttpContext Create(IFeatureCollection featureCollection)
6868

6969
private static DefaultHttpContext CreateHttpContext(IFeatureCollection featureCollection)
7070
{
71-
if (featureCollection is IHttpContextContainer container)
71+
if (featureCollection is IDefaultHttpContextContainer container)
7272
{
7373
return container.HttpContext;
7474
}

src/Http/Http/src/IHttpContextContainer.cs renamed to src/Http/Http/src/IDefaultHttpContextContainer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Microsoft.AspNetCore.Http
66
{
7-
public interface IHttpContextContainer
7+
public interface IDefaultHttpContextContainer
88
{
99
DefaultHttpContext HttpContext { get; }
1010
}

src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
2525
{
26-
public abstract partial class HttpProtocol : IHttpContextContainer, IHttpResponseControl
26+
public abstract partial class HttpProtocol : IDefaultHttpContextContainer, IHttpResponseControl
2727
{
2828
private static readonly byte[] _bytesConnectionClose = Encoding.ASCII.GetBytes("\r\nConnection: close");
2929
private static readonly byte[] _bytesConnectionKeepAlive = Encoding.ASCII.GetBytes("\r\nConnection: keep-alive");
@@ -274,7 +274,7 @@ public CancellationToken RequestAborted
274274

275275
protected HttpResponseHeaders HttpResponseHeaders { get; } = new HttpResponseHeaders();
276276

277-
DefaultHttpContext IHttpContextContainer.HttpContext
277+
DefaultHttpContext IDefaultHttpContextContainer.HttpContext
278278
{
279279
get
280280
{

0 commit comments

Comments
 (0)