Nach dem Upgrade von .net RC2 auf RTM muss ich einen Parameter an einen Konstruktor von JsonOutputFormatter übergeben, der von ArrayPool abgeleitet wird. Wie bekomme ich dieses Objekt? Ich ändere JsonOutputFormatter manuell, weil ich ReferenceLoopHandling konfigurieren muss.ArrayPool-Objekt für den JsonOutputFormatter-Konstruktor bereitstellen
Nur andere ähnliche Informationen, die ich ist dies finden könnte: https://github.com/aspnet/Mvc/issues/4562
public IServiceProvider ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddMemoryCache();
services.AddSession();
services.AddMvc();
var formatterSettings = JsonSerializerSettingsProvider.CreateSerializerSettings();
formatterSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
JsonOutputFormatter formatter = new JsonOutputFormatter(formatterSettings, ???);
services.Configure<MvcOptions>(options =>
{
options.OutputFormatters.RemoveType<JsonOutputFormatter>();
options.OutputFormatters.Insert(0, formatter);
});
//etc...
}