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

Commit

Permalink
IFeatureManager
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams committed Dec 8, 2015
1 parent 67cc6bf commit 66ccc94
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Microsoft.AspNet.Http.Authentication.Internal
{
public class DefaultAuthenticationManager : AuthenticationManager, IFeatureCache
public class DefaultAuthenticationManager : AuthenticationManager, IFeatureCache, IFeatureManager
{
private IFeatureCollection _features;
private int _cachedFeaturesRevision = -1;
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.Http/DefaultConnectionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Microsoft.AspNet.Http.Internal
{
public class DefaultConnectionInfo : ConnectionInfo, IFeatureCache
public class DefaultConnectionInfo : ConnectionInfo, IFeatureCache, IFeatureManager
{
private IFeatureCollection _features;
private int _cachedFeaturesRevision = -1;
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.Http/DefaultHttpContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Microsoft.AspNet.Http.Internal
{
public class DefaultHttpContext : HttpContext, IFeatureCache
public class DefaultHttpContext : HttpContext, IFeatureCache, IFeatureManager
{
private readonly DefaultHttpRequest _request;
private readonly DefaultHttpResponse _response;
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.Http/DefaultHttpRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Microsoft.AspNet.Http.Internal
{
public class DefaultHttpRequest : HttpRequest, IFeatureCache
public class DefaultHttpRequest : HttpRequest, IFeatureCache, IFeatureManager
{
private readonly DefaultHttpContext _context;
private IFeatureCollection _features;
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.Http/DefaultHttpResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Microsoft.AspNet.Http.Internal
{
public class DefaultHttpResponse : HttpResponse, IFeatureCache
public class DefaultHttpResponse : HttpResponse, IFeatureCache, IFeatureManager
{
private readonly DefaultHttpContext _context;
private IFeatureCollection _features;
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.Http/DefaultWebSocketManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Microsoft.AspNet.Http.Internal
{
public class DefaultWebSocketManager : WebSocketManager, IFeatureCache
public class DefaultWebSocketManager : WebSocketManager, IFeatureCache, IFeatureManager
{
private IFeatureCollection _features;
private int _cachedFeaturesRevision = -1;
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft.AspNet.Http/Features/IFeatureCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ namespace Microsoft.AspNet.Http.Features
public interface IFeatureCache
{
void CheckFeaturesRevision();
void UpdateFeatures(IFeatureCollection features);
}
}
10 changes: 10 additions & 0 deletions src/Microsoft.AspNet.Http/Features/IFeatureManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

namespace Microsoft.AspNet.Http.Features
{
public interface IFeatureManager
{
void UpdateFeatures(IFeatureCollection features);
}
}
6 changes: 0 additions & 6 deletions src/Microsoft.AspNet.Http/Features/QueryFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ void IFeatureCache.CheckFeaturesRevision()
}
}

public void UpdateFeatures(IFeatureCollection features)
{
_features = features;
ResetFeatures();
}

private void ResetFeatures()
{
_request = null;
Expand Down
6 changes: 0 additions & 6 deletions src/Microsoft.AspNet.Http/Features/RequestCookiesFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ void IFeatureCache.CheckFeaturesRevision()
}
}

public void UpdateFeatures(IFeatureCollection features)
{
_features = features;
ResetFeatures();
}

private void ResetFeatures()
{
_request = null;
Expand Down
6 changes: 0 additions & 6 deletions src/Microsoft.AspNet.Http/Features/ResponseCookiesFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ void IFeatureCache.CheckFeaturesRevision()
}
}

public void UpdateFeatures(IFeatureCollection features)
{
_features = features;
ResetFeatures();
}

private void ResetFeatures()
{
_response = null;
Expand Down

0 comments on commit 66ccc94

Please sign in to comment.