#265 Remove setters for IApplcationBuilder.Properties and Server.
This commit is contained in:
parent
f5267fc145
commit
43c3913b86
|
|
@ -10,9 +10,9 @@ namespace Microsoft.AspNet.Builder
|
||||||
{
|
{
|
||||||
IServiceProvider ApplicationServices { get; set; }
|
IServiceProvider ApplicationServices { get; set; }
|
||||||
|
|
||||||
object Server { get; set; }
|
object Server { get; }
|
||||||
|
|
||||||
IDictionary<string, object> Properties { get; set; }
|
IDictionary<string, object> Properties { get; }
|
||||||
|
|
||||||
IApplicationBuilder Use(Func<RequestDelegate, RequestDelegate> middleware);
|
IApplicationBuilder Use(Func<RequestDelegate, RequestDelegate> middleware);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,12 @@ namespace Microsoft.AspNet.Builder
|
||||||
ApplicationServices = serviceProvider;
|
ApplicationServices = serviceProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ApplicationBuilder(IServiceProvider serviceProvider, object server)
|
||||||
|
: this(serviceProvider)
|
||||||
|
{
|
||||||
|
SetProperty(Constants.BuilderProperties.ServerInformation, server);
|
||||||
|
}
|
||||||
|
|
||||||
private ApplicationBuilder(ApplicationBuilder builder)
|
private ApplicationBuilder(ApplicationBuilder builder)
|
||||||
{
|
{
|
||||||
Properties = builder.Properties;
|
Properties = builder.Properties;
|
||||||
|
|
@ -42,13 +48,9 @@ namespace Microsoft.AspNet.Builder
|
||||||
{
|
{
|
||||||
return GetProperty<object>(Constants.BuilderProperties.ServerInformation);
|
return GetProperty<object>(Constants.BuilderProperties.ServerInformation);
|
||||||
}
|
}
|
||||||
set
|
|
||||||
{
|
|
||||||
SetProperty<object>(Constants.BuilderProperties.ServerInformation, value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IDictionary<string, object> Properties { get; set; }
|
public IDictionary<string, object> Properties { get; }
|
||||||
|
|
||||||
private T GetProperty<T>(string key)
|
private T GetProperty<T>(string key)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue