Table of Contents

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

T

The 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

eventData T

The data of the event.

additionalData ReceivedDataDictionary

The extension properties received inside the event's params object.

additionalEventProperties ReceivedDataDictionary

The 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

ReceivedDataDictionary

AdditionalEventProperties

Gets the extension properties received on the event envelope.

public ReceivedDataDictionary AdditionalEventProperties { get; }

Property Value

ReceivedDataDictionary

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

TEventArgs

A 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

factory Func<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

TEventArgs

A type derived from WebDriverBiDiEventArgs.