React to options
This commit is contained in:
parent
3ebdcc5f6f
commit
8e57fa5350
|
|
@ -83,7 +83,7 @@ namespace Microsoft.Framework.DependencyInjection
|
|||
services.TryAddSingleton<IJsonHelper, JsonHelper>();
|
||||
services.TryAdd(ServiceDescriptor.Singleton<JsonOutputFormatter>(serviceProvider =>
|
||||
{
|
||||
var options = serviceProvider.GetRequiredService<IOptions<MvcJsonOptions>>().Options;
|
||||
var options = serviceProvider.GetRequiredService<IOptions<MvcJsonOptions>>().Value;
|
||||
return new JsonOutputFormatter(options.SerializerSettings);
|
||||
}));
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ namespace Microsoft.AspNet.Mvc
|
|||
public TempDataMvcOptionsSetup()
|
||||
: base(ConfigureMvc)
|
||||
{
|
||||
Order = DefaultOrder.DefaultFrameworkSortOrder;
|
||||
}
|
||||
|
||||
public static void ConfigureMvc(MvcOptions options)
|
||||
|
|
|
|||
Loading…
Reference in New Issue