Exposes the service provided by a native WebDriver server executable.
public abstract class DriverService : ICommandServer, IDisposable
DriverService
Initializes a new instance of the DriverService class.
protected DriverService(string? servicePath, int port, string? driverServiceExecutableName)
Parameters
servicePath
string
The full path to the directory containing the executable providing the service to drive the browser.
port
int
The port on which the driver executable should listen.
driverServiceExecutableName
string
The file name of the driver service executable.
If the path specified is null or an empty string.
If the specified driver service executable does not exist in the specified directory.
Gets the command-line arguments for the driver service.
protected virtual string CommandLineArguments { get; }
Property Value
Gets or sets the executable file name of the driver service.
public string? DriverServiceExecutableName { get; set; }
Property Value
Gets or sets the path of the driver service.
public string? DriverServicePath { get; set; }
Property Value
Gets a value indicating whether the service has a shutdown API that can be called to terminate it gracefully before forcing a termination.
protected virtual bool HasShutdown { get; }
Property Value
Gets or sets a value indicating whether the command prompt window of the service should be hidden.
public bool HideCommandPromptWindow { get; set; }
Property Value
Gets or sets the host name of the service. Defaults to "localhost."
public string HostName { get; set; }
Property Value
Gets or sets a value indicating the time to wait for an initial connection before timing out.
public TimeSpan InitializationTimeout { get; set; }
Property Value
Gets a value indicating whether the service is responding to HTTP requests.
protected virtual bool IsInitialized { get; }
Property Value
Gets a value indicating whether the service is running.
public bool IsRunning { get; }
Property Value
Gets or sets the port of the service.
public int Port { get; set; }
Property Value
Gets the process ID of the running driver service executable. Returns 0 if the process is not running.
public int ProcessId { get; }
Property Value
Gets the Uri of the service.
public Uri ServiceUrl { get; }
Property Value
Gets or sets a value indicating whether the initial diagnostic information is suppressed when starting the driver server executable. Defaults to false, meaning diagnostic information should be shown by the driver server executable.
public bool SuppressInitialDiagnosticInformation { get; set; }
Property Value
Gets a value indicating the time to wait for the service to terminate before forcing it to terminate.
protected virtual TimeSpan TerminationTimeout { get; }
Property Value
Releases all resources associated with this DriverService.
Dispose(bool)Releases all resources associated with this DriverService.
protected virtual void Dispose(bool disposing)
Parameters
GetDefaultDriverOptions()
The browser options instance that corresponds to the driver service
protected abstract DriverOptions GetDefaultDriverOptions()
Returns
Raises the DriverProcessStarted event.
protected void OnDriverProcessStarted(DriverProcessStartedEventArgs eventArgs)
Parameters
eventArgs
DriverProcessStartedEventArgs
A DriverProcessStartedEventArgs that contains the event data.
Raises the DriverProcessStarting event.
protected void OnDriverProcessStarting(DriverProcessStartingEventArgs eventArgs)
Parameters
eventArgs
DriverProcessStartingEventArgs
A DriverProcessStartingEventArgs that contains the event data.
Starts the DriverService if it is not already running.
Events DriverProcessStartedOccurs when the driver process has completely started.
public event EventHandler<DriverProcessStartedEventArgs>? DriverProcessStarted
Event Type
Occurs when the driver process is starting.
public event EventHandler<DriverProcessStartingEventArgs>? DriverProcessStarting
Event Type
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4