ASP.NET Core MvcJsonOptions dependency injection without modified closure?
问题 (This question is similar to ASP.NET Core MvcOptions dependency injection without modified closure? However, I struggle to apply the solution of that question to this one.) In my ASP.NET Core 1.1.3 project, I currently inject an ITraceWriter dependency into MvcJsonOptions in the ConfigureServices method in the following way: public override IServiceProvider ConfigureServices(IServiceCollection services) { services.AddProjectSpecificStuff(); ITraceWriter traceWriter = null; services.AddMvc()