Class WebDriverCreationConfigureOptions
- Namespace
- CSF.Extensions.WebDriver.Factories
- Assembly
- CSF.Extensions.WebDriver.dll
A service which configures an IOptions<TOptions> of WebDriverCreationOptionsCollection within dependency injection.
public sealed class WebDriverCreationConfigureOptions : IConfigureOptions<WebDriverCreationOptionsCollection>
- Inheritance
-
WebDriverCreationConfigureOptions
- Implements
- Inherited Members
Remarks
By design, the Configure(WebDriverCreationOptionsCollection) method of this class will avoid throwing exceptions. Instead, if the configuration is unsuitable or not valid then this class will log an error and omit the troublesome driver configuration.
Constructors
WebDriverCreationConfigureOptions(IGetsWebDriverAndOptionsTypes, IConfiguration, ILogger<WebDriverCreationConfigureOptions>)
Initialises a new instance of WebDriverCreationConfigureOptions.
public WebDriverCreationConfigureOptions(IGetsWebDriverAndOptionsTypes typeProvider, IConfiguration configuration, ILogger<WebDriverCreationConfigureOptions> logger)
Parameters
typeProvider
IGetsWebDriverAndOptionsTypesA type-loading utility class.
configuration
IConfigurationThe app configuration.
logger
ILogger<WebDriverCreationConfigureOptions>A logging implementation.
Exceptions
- ArgumentNullException
If either parameter is null.
Methods
Configure(WebDriverCreationOptionsCollection)
Invoked to configure a WebDriverCreationOptionsCollection instance.
public void Configure(WebDriverCreationOptionsCollection options)
Parameters
options
WebDriverCreationOptionsCollectionThe options instance to configure.