From 06392be333666aefb730cd790201e52c343509c5 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 31 Aug 2015 09:35:08 -0700 Subject: [PATCH] Use new HttpContext.Features API. --- src/Microsoft.AspNet.Session/SessionMiddleware.cs | 4 ++-- test/Microsoft.AspNet.Session.Tests/SessionTests.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNet.Session/SessionMiddleware.cs b/src/Microsoft.AspNet.Session/SessionMiddleware.cs index 4eeb183bd2..84844648a1 100644 --- a/src/Microsoft.AspNet.Session/SessionMiddleware.cs +++ b/src/Microsoft.AspNet.Session/SessionMiddleware.cs @@ -69,7 +69,7 @@ namespace Microsoft.AspNet.Session var feature = new SessionFeature(); feature.Session = _sessionStore.Create(sessionKey, _options.IdleTimeout, tryEstablishSession, isNewSessionKey); - context.SetFeature(feature); + context.Features.Set(feature); try { @@ -77,7 +77,7 @@ namespace Microsoft.AspNet.Session } finally { - context.SetFeature(null); + context.Features.Set(null); if (feature.Session != null) { diff --git a/test/Microsoft.AspNet.Session.Tests/SessionTests.cs b/test/Microsoft.AspNet.Session.Tests/SessionTests.cs index 7e24138513..1b2550e0e3 100644 --- a/test/Microsoft.AspNet.Session.Tests/SessionTests.cs +++ b/test/Microsoft.AspNet.Session.Tests/SessionTests.cs @@ -362,7 +362,7 @@ namespace Microsoft.AspNet.Session { await next(); - Assert.Null(httpContext.GetFeature()); + Assert.Null(httpContext.Features.Get()); }); app.UseSession(); @@ -403,7 +403,7 @@ namespace Microsoft.AspNet.Session } Assert.True(exceptionThrown); - Assert.Null(httpContext.GetFeature()); + Assert.Null(httpContext.Features.Get()); }); app.UseSession();