protected DriverService(string servicePath, int port, string driverServiceExecutableName, Uri driverServiceDownloadUrl)
{
if (string.IsNullOrEmpty(servicePath))
{
throw new ArgumentException("Path to locate driver executable cannot be null or empty.", "servicePath");
}
string executablePath = Path.Combine(servicePath, driverServiceExecutableName);
if (!File.Exists(executablePath))
{
throw new DriverServiceNotFoundException(string.Format(CultureInfo.InvariantCulture, "The file {0} does not exist. The driver can be downloaded at {1}", executablePath, driverServiceDownloadUrl));
}
this.driverServicePath = servicePath;
this.driverServiceExecutableName = driverServiceExecutableName;
this.driverServicePort = port;
}