React to options
This commit is contained in:
parent
f4a86f5511
commit
4e004c22ba
|
|
@ -67,7 +67,7 @@ namespace System.Web.Http
|
|||
|
||||
private static IServiceProvider CreateServices()
|
||||
{
|
||||
var options = new OptionsManager<MvcOptions>(new IConfigureOptions<MvcOptions>[] { });
|
||||
var options = new TestOptionsManager<MvcOptions>();
|
||||
options.Value.OutputFormatters.Add(new StringOutputFormatter());
|
||||
options.Value.OutputFormatters.Add(new JsonOutputFormatter(
|
||||
new JsonSerializerSettings(),
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace System.Web.Http
|
|||
|
||||
private static IServiceProvider CreateServices()
|
||||
{
|
||||
var options = new OptionsManager<MvcOptions>(new IConfigureOptions<MvcOptions>[] { });
|
||||
var options = new TestOptionsManager<MvcOptions>();
|
||||
options.Value.OutputFormatters.Add(new StringOutputFormatter());
|
||||
options.Value.OutputFormatters.Add(new JsonOutputFormatter(
|
||||
new JsonSerializerSettings(),
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ namespace System.Web.Http
|
|||
|
||||
private static IServiceProvider CreateServices()
|
||||
{
|
||||
var options = new OptionsManager<MvcOptions>(new IConfigureOptions<MvcOptions>[] { });
|
||||
var options = new TestOptionsManager<MvcOptions>();
|
||||
options.Value.OutputFormatters.Add(new StringOutputFormatter());
|
||||
options.Value.OutputFormatters.Add(new JsonOutputFormatter(
|
||||
new JsonSerializerSettings(),
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Mvc.TestCommon\Microsoft.AspNetCore.Mvc.TestCommon.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Mvc.WebApiCompatShim\Microsoft.AspNetCore.Mvc.WebApiCompatShim.csproj" />
|
||||
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http" Version="$(AspNetCoreVersion)" />
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace System.Web.Http
|
|||
|
||||
private static IServiceProvider CreateServices()
|
||||
{
|
||||
var options = new OptionsManager<MvcOptions>(new IConfigureOptions<MvcOptions>[] { });
|
||||
var options = new TestOptionsManager<MvcOptions>();
|
||||
options.Value.OutputFormatters.Add(new StringOutputFormatter());
|
||||
options.Value.OutputFormatters.Add(new JsonOutputFormatter(
|
||||
new JsonSerializerSettings(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue