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

Commit 894c8db

Browse files
committed
Hosting#359 Remove IDisposable from HttpContext and IFeatureCollection.
1 parent 1475742 commit 894c8db

File tree

4 files changed

+2
-15
lines changed

4 files changed

+2
-15
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Microsoft.AspNet.Http
1212
{
13-
public abstract class HttpContext : IDisposable
13+
public abstract class HttpContext
1414
{
1515
public abstract IFeatureCollection Features { get; }
1616

@@ -37,7 +37,5 @@ public abstract class HttpContext : IDisposable
3737
public abstract ISession Session { get; set; }
3838

3939
public abstract void Abort();
40-
41-
public abstract void Dispose();
4240
}
4341
}

src/Microsoft.AspNet.Http.Features/FeatureCollection.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ public IEnumerator<KeyValuePair<Type, object>> GetEnumerator()
9393
}
9494
}
9595

96-
public virtual void Dispose()
97-
{
98-
_defaults?.Dispose();
99-
}
100-
10196
private class KeyComparer : IEqualityComparer<KeyValuePair<Type, object>>
10297
{
10398
public bool Equals(KeyValuePair<Type, object> x, KeyValuePair<Type, object> y)

src/Microsoft.AspNet.Http.Features/IFeatureCollection.cs

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

77
namespace Microsoft.AspNet.Http.Features
88
{
9-
public interface IFeatureCollection : IEnumerable<KeyValuePair<Type, object>>, IDisposable
9+
public interface IFeatureCollection : IEnumerable<KeyValuePair<Type, object>>
1010
{
1111
/// <summary>
1212
/// Indicates if the collection can be modified.

src/Microsoft.AspNet.Http/DefaultHttpContext.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,5 @@ public override void Abort()
165165
{
166166
LifetimeFeature.Abort();
167167
}
168-
169-
public override void Dispose()
170-
{
171-
// REVIEW: is this necessary? is the environment "owned" by the context?
172-
_features.Dispose();
173-
}
174168
}
175169
}

0 commit comments

Comments
 (0)