From c3290a029fc5e36eea1db445b7a081c3b61353a0 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 31 Aug 2015 11:25:59 -0700 Subject: [PATCH] Change IApplicationBuilder.Server to IFeatureCollection ServerFeatures. --- .../IApplicationBuilder.cs | 3 ++- src/Microsoft.AspNet.Http/ApplicationBuilder.cs | 7 ++++--- src/Microsoft.AspNet.Http/Constants.cs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.AspNet.Http.Abstractions/IApplicationBuilder.cs b/src/Microsoft.AspNet.Http.Abstractions/IApplicationBuilder.cs index 77fa4f20e1..e74bdec015 100644 --- a/src/Microsoft.AspNet.Http.Abstractions/IApplicationBuilder.cs +++ b/src/Microsoft.AspNet.Http.Abstractions/IApplicationBuilder.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using Microsoft.AspNet.Http.Features; namespace Microsoft.AspNet.Builder { @@ -10,7 +11,7 @@ namespace Microsoft.AspNet.Builder { IServiceProvider ApplicationServices { get; set; } - object Server { get; } + IFeatureCollection ServerFeatures { get; } IDictionary Properties { get; } diff --git a/src/Microsoft.AspNet.Http/ApplicationBuilder.cs b/src/Microsoft.AspNet.Http/ApplicationBuilder.cs index 80041077c3..49ed18f3f0 100644 --- a/src/Microsoft.AspNet.Http/ApplicationBuilder.cs +++ b/src/Microsoft.AspNet.Http/ApplicationBuilder.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNet.Http.Features; using Microsoft.AspNet.Http.Internal; namespace Microsoft.AspNet.Builder.Internal @@ -22,7 +23,7 @@ namespace Microsoft.AspNet.Builder.Internal public ApplicationBuilder(IServiceProvider serviceProvider, object server) : this(serviceProvider) { - SetProperty(Constants.BuilderProperties.ServerInformation, server); + SetProperty(Constants.BuilderProperties.ServerFeatures, server); } private ApplicationBuilder(ApplicationBuilder builder) @@ -42,11 +43,11 @@ namespace Microsoft.AspNet.Builder.Internal } } - public object Server + public IFeatureCollection ServerFeatures { get { - return GetProperty(Constants.BuilderProperties.ServerInformation); + return GetProperty(Constants.BuilderProperties.ServerFeatures); } } diff --git a/src/Microsoft.AspNet.Http/Constants.cs b/src/Microsoft.AspNet.Http/Constants.cs index d01466f549..9ae305ddf4 100644 --- a/src/Microsoft.AspNet.Http/Constants.cs +++ b/src/Microsoft.AspNet.Http/Constants.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Http.Internal internal static class BuilderProperties { - internal static string ServerInformation = "server.Information"; + internal static string ServerFeatures = "server.Features"; internal static string ApplicationServices = "application.Services"; } }