Design review: Always instantiate via DI

This commit is contained in:
SteveSandersonMS
2016-09-01 15:51:53 +01:00
parent 61fd900974
commit f04fb8c421
9 changed files with 97 additions and 91 deletions

View File

@@ -33,10 +33,9 @@ namespace Microsoft.AspNetCore.SpaServices.Prerendering
// in your startup file, but then again it might be confusing that you don't need to.
if (_nodeServices == null)
{
_nodeServices = _fallbackNodeServices = Configuration.CreateNodeServices(new NodeServicesOptions
{
ProjectPath = _applicationBasePath
}.AddDefaultEnvironmentVariables(hostEnv.IsDevelopment()));
_nodeServices = _fallbackNodeServices = Configuration.CreateNodeServices(
serviceProvider,
new NodeServicesOptions());
}
}