Change onBeforeStartExternalProcess to a virtual method, so as to avoid expanding the set of constructor params in all hosting models

This commit is contained in:
SteveSandersonMS
2016-07-18 14:39:36 +01:00
parent 7119815d04
commit a14d9ba2df
3 changed files with 40 additions and 38 deletions

View File

@@ -32,15 +32,14 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
private bool _disposed;
private int _portNumber;
public HttpNodeInstance(string projectPath, string[] watchFileExtensions, int port = 0, Action<System.Diagnostics.ProcessStartInfo> onBeforeStartExternalProcess = null)
public HttpNodeInstance(string projectPath, string[] watchFileExtensions, int port = 0)
: base(
EmbeddedResourceReader.Read(
typeof(HttpNodeInstance),
"/Content/Node/entrypoint-http.js"),
projectPath,
watchFileExtensions,
MakeCommandLineOptions(port),
onBeforeStartExternalProcess)
MakeCommandLineOptions(port))
{
_client = new HttpClient();
}