.net RC2 से आरटीएम मुझे लगता है मैं JsonOutputFormatter के एक निर्माता है कि ArrayPool से निकला है के लिए एक पैरामीटर आपूर्ति की जरूरत को अपग्रेड करने के बाद। मैं इस वस्तु कैसे मिलता है? मैं Newing JsonOutputFormatter मैन्युअल हूँ क्योंकि मैं ReferenceLoopHandling विन्यस्त करने की जरूरत। https://github.com/aspnet/Mvc/issues/4562JsonOutputFormatter निर्माता को ArrayPool वस्तु प्रदान करें
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...
}