Class EventInfo<T>
- Namespace
- WebDriverBiDi
- Assembly
- WebDriverBiDi.dll
Class containing information used in the invocation of an event invoker.
public class EventInfo<T>
Type Parameters
TThe type of data describing the event.
- Inheritance
-
EventInfo<T>
- Inherited Members
Constructors
EventInfo(T, ReceivedDataDictionary, ReceivedDataDictionary?)
Initializes a new instance of the EventInfo<T> class.
public EventInfo(T eventData, ReceivedDataDictionary additionalData, ReceivedDataDictionary? additionalEventProperties = null)
Parameters
eventDataTThe data of the event.
additionalDataReceivedDataDictionaryThe extension properties received inside the event's
paramsobject.additionalEventPropertiesReceivedDataDictionaryThe extension properties received on the event envelope. If omitted or null, will set to EmptyDictionary.
Properties
AdditionalData
Gets the extension properties received inside the event's params object.
public ReceivedDataDictionary AdditionalData { get; }
Property Value
AdditionalEventProperties
Gets the extension properties received on the event envelope.
public ReceivedDataDictionary AdditionalEventProperties { get; }
Property Value
EventData
Gets the data for the event invocation.
public T EventData { get; }
Property Value
- T
Methods
ToEventArgs<TEventArgs>()
Creates an object derived from WebDriverBiDiEventArgs which contains information about an event.
public TEventArgs ToEventArgs<TEventArgs>() where TEventArgs : WebDriverBiDiEventArgs
Returns
- TEventArgs
The object containing the information about the event.
Type Parameters
TEventArgsA type derived from WebDriverBiDiEventArgs. The type must be the same as type T of this class.
Exceptions
- WebDriverBiDiException
Thrown when the type of TEventArgs is not the same type as T.
ToEventArgs<TEventArgs>(Func<T, TEventArgs>)
Creates an object derived from WebDriverBiDiEventArgs using a factory function. This overload avoids reflection and is safe for use in AOT and trimmed applications.
public TEventArgs ToEventArgs<TEventArgs>(Func<T, TEventArgs> factory) where TEventArgs : WebDriverBiDiEventArgs
Parameters
factoryFunc<T, TEventArgs>A function that creates a TEventArgs instance from the event data.
Returns
- TEventArgs
The object containing the information about the event.
Type Parameters
TEventArgsA type derived from WebDriverBiDiEventArgs.