Hosting#359 Remove IDisposable from HttpContext and IFeatureCollection.

This commit is contained in:
Chris R 2015-09-30 14:31:03 -07:00
parent 147574247c
commit 894c8dbe2b
4 changed files with 2 additions and 15 deletions

View File

@ -10,7 +10,7 @@ using Microsoft.AspNet.Http.Features;
namespace Microsoft.AspNet.Http namespace Microsoft.AspNet.Http
{ {
public abstract class HttpContext : IDisposable public abstract class HttpContext
{ {
public abstract IFeatureCollection Features { get; } public abstract IFeatureCollection Features { get; }
@ -37,7 +37,5 @@ namespace Microsoft.AspNet.Http
public abstract ISession Session { get; set; } public abstract ISession Session { get; set; }
public abstract void Abort(); public abstract void Abort();
public abstract void Dispose();
} }
} }

View File

@ -93,11 +93,6 @@ namespace Microsoft.AspNet.Http.Features
} }
} }
public virtual void Dispose()
{
_defaults?.Dispose();
}
private class KeyComparer : IEqualityComparer<KeyValuePair<Type, object>> private class KeyComparer : IEqualityComparer<KeyValuePair<Type, object>>
{ {
public bool Equals(KeyValuePair<Type, object> x, KeyValuePair<Type, object> y) public bool Equals(KeyValuePair<Type, object> x, KeyValuePair<Type, object> y)

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
namespace Microsoft.AspNet.Http.Features namespace Microsoft.AspNet.Http.Features
{ {
public interface IFeatureCollection : IEnumerable<KeyValuePair<Type, object>>, IDisposable public interface IFeatureCollection : IEnumerable<KeyValuePair<Type, object>>
{ {
/// <summary> /// <summary>
/// Indicates if the collection can be modified. /// Indicates if the collection can be modified.

View File

@ -165,11 +165,5 @@ namespace Microsoft.AspNet.Http.Internal
{ {
LifetimeFeature.Abort(); LifetimeFeature.Abort();
} }
public override void Dispose()
{
// REVIEW: is this necessary? is the environment "owned" by the context?
_features.Dispose();
}
} }
} }