From 4f8ec86b54f90bac2e576708e627ec4e0e6418e0 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Thu, 31 Dec 2015 14:04:47 -0800 Subject: [PATCH] React to HttpAbstractions changes --- .../Http/Frame.FeatureCollection.cs | 10 ++++++++++ .../Microsoft.AspNet.Server.KestrelTests/FrameFacts.cs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.FeatureCollection.cs b/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.FeatureCollection.cs index 2de39f8aee..22e320e72f 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.FeatureCollection.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.FeatureCollection.cs @@ -280,6 +280,16 @@ namespace Microsoft.AspNet.Server.Kestrel.Http set { FastFeatureSet(key, value); } } + TFeature IFeatureCollection.Get() + { + return (TFeature)FastFeatureGet(typeof(TFeature)); + } + + void IFeatureCollection.Set(TFeature instance) + { + FastFeatureSet(typeof(TFeature), instance); + } + void IHttpResponseFeature.OnStarting(Func callback, object state) { OnStarting(callback, state); diff --git a/test/Microsoft.AspNet.Server.KestrelTests/FrameFacts.cs b/test/Microsoft.AspNet.Server.KestrelTests/FrameFacts.cs index da1bc9058e..400b6ac42d 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/FrameFacts.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/FrameFacts.cs @@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Server.KestrelTests frame.Reset(); // Assert - Assert.Equal("http", frame.Get().Scheme); + Assert.Equal("http", ((IFeatureCollection)frame).Get().Scheme); } } }