Add constructor overload to .NET DriverServiceCommandExecutor
This new constructor overload allows the user to supply their own
HttpCommandExecutor (or a subclass) for local execution where the
driver service executable exists locally, and the user wants the
driver instance to own the process life cycle of the executable.
@@ -52,6 +52,18 @@ public DriverServiceCommandExecutor(DriverService driverService, TimeSpan comman
this.internalExecutor = new HttpCommandExecutor(driverService.ServiceUrl, commandTimeout, enableKeepAlive);
}
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DriverServiceCommandExecutor"/> class.
+ /// </summary>
+ /// <param name="driverService">The <see cref="DriverService"/> that drives the browser.</param>
+ /// <param name="commandExecutor">The <see cref="HttpCommandExecutor"/> object used to execute commands,
+ /// communicating with the service via HTTP.</param>
+ public DriverServiceCommandExecutor(DriverService service, HttpCommandExecutor commandExecutor)
+ {
+ this.service = service;
+ this.internalExecutor = commandExecutor;
+ }
+
/// <summary>
/// Gets the <see cref="CommandInfoRepository"/> object associated with this executor.
/// </summary>
