Hosting#359 Remove IDisposable from HttpContext and IFeatureCollection.
This commit is contained in:
parent
147574247c
commit
894c8dbe2b
|
|
@ -10,7 +10,7 @@ using Microsoft.AspNet.Http.Features;
|
|||
|
||||
namespace Microsoft.AspNet.Http
|
||||
{
|
||||
public abstract class HttpContext : IDisposable
|
||||
public abstract class HttpContext
|
||||
{
|
||||
public abstract IFeatureCollection Features { get; }
|
||||
|
||||
|
|
@ -37,7 +37,5 @@ namespace Microsoft.AspNet.Http
|
|||
public abstract ISession Session { get; set; }
|
||||
|
||||
public abstract void Abort();
|
||||
|
||||
public abstract void Dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,11 +93,6 @@ namespace Microsoft.AspNet.Http.Features
|
|||
}
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
_defaults?.Dispose();
|
||||
}
|
||||
|
||||
private class KeyComparer : IEqualityComparer<KeyValuePair<Type, object>>
|
||||
{
|
||||
public bool Equals(KeyValuePair<Type, object> x, KeyValuePair<Type, object> y)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using System.Collections.Generic;
|
|||
|
||||
namespace Microsoft.AspNet.Http.Features
|
||||
{
|
||||
public interface IFeatureCollection : IEnumerable<KeyValuePair<Type, object>>, IDisposable
|
||||
public interface IFeatureCollection : IEnumerable<KeyValuePair<Type, object>>
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates if the collection can be modified.
|
||||
|
|
|
|||
|
|
@ -165,11 +165,5 @@ namespace Microsoft.AspNet.Http.Internal
|
|||
{
|
||||
LifetimeFeature.Abort();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
// REVIEW: is this necessary? is the environment "owned" by the context?
|
||||
_features.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue