Change IApplicationBuilder.Server to IFeatureCollection ServerFeatures.
This commit is contained in:
parent
e45e70da01
commit
c3290a029f
|
|
@ -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<string, object> Properties { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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<object>(Constants.BuilderProperties.ServerInformation);
|
||||
return GetProperty<IFeatureCollection>(Constants.BuilderProperties.ServerFeatures);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue