Class Module
- Namespace
- WebDriverBiDi
- Assembly
- WebDriverBiDi.dll
Base class representing a module in the WebDriver BiDi protocol.
public abstract class Module
- Inheritance
-
Module
- Derived
- Inherited Members
Constructors
Module(IBiDiModuleHost)
Initializes a new instance of the Module class.
protected Module(IBiDiModuleHost driver)
Parameters
driverIBiDiModuleHostThe driver used for communication by the module.
Properties
Driver
Gets the driver used for communication by the module.
protected IBiDiModuleHost Driver { get; }
Property Value
ModuleName
Gets the module name.
public abstract string ModuleName { get; }
Property Value
Methods
RegisterObservableEvent<T>(ObservableEventInvocable<T>)
Registers an event so that when it is received, the deserialized data is forwarded
directly to the given ObservableEvent<T>. Use this overload when the
deserialized type T is the same as the event args type.
protected void RegisterObservableEvent<T>(ObservableEventInvocable<T> observableEvent) where T : WebDriverBiDiEventArgs
Parameters
observableEventObservableEventInvocable<T>The ObservableEvent<T> to notify when the event is received.
Type Parameters
TThe type of event args, which must also be the deserialized event data type.
RegisterObservableEvent<T, TEventArgs>(ObservableEventInvocable<TEventArgs>, Func<T, TEventArgs>)
Registers an event so that when it is received, the deserialized data is converted
using the provided factory and forwarded to the given ObservableEvent<T>.
Use this overload when the deserialized type T differs from the
event args type TEventArgs.
protected void RegisterObservableEvent<T, TEventArgs>(ObservableEventInvocable<TEventArgs> observableEvent, Func<T, TEventArgs> eventArgsConverter) where TEventArgs : WebDriverBiDiEventArgs
Parameters
observableEventObservableEventInvocable<TEventArgs>The ObservableEventInvocable<T> to notify when the event is received.
eventArgsConverterFunc<T, TEventArgs>A function that creates a
TEventArgsfrom the deserialized data.
Type Parameters
TThe deserialized event data type.
TEventArgsThe event args type to produce and forward.