Airship.Net
AirshipDotNet.Events.AirshipEvent< T > Class Template Reference

Generic typed event for specific event data types. More...

Inheritance diagram for AirshipDotNet.Events.AirshipEvent< T >:
Collaboration diagram for AirshipDotNet.Events.AirshipEvent< T >:

Public Member Functions

 AirshipEvent (AirshipEventType eventType, T data)
 Initializes a new instance of the AirshipEvent class with typed data.
override EventArgs ToEventArgs ()
 Converts the event data to EventArgs.
Public Member Functions inherited from AirshipDotNet.Events.AirshipEvent
 AirshipEvent (AirshipEventType eventType, object? data=null)
 Initializes a new instance of the AirshipEvent class.

Properties

new T Data [get]
 Gets the strongly-typed event data.
Properties inherited from AirshipDotNet.Events.AirshipEvent
AirshipEventType EventType [get]
 Gets the event type.
DateTime Timestamp [get]
 Gets the timestamp when the event was created.
object? Data [get]
 Gets the event data.

Detailed Description

Generic typed event for specific event data types.

Type Constraints
T :EventArgs 

Member Function Documentation

◆ AirshipEvent()

AirshipDotNet.Events.AirshipEvent< T >.AirshipEvent ( AirshipEventType eventType,
T data )
inline

Initializes a new instance of the AirshipEvent class with typed data.

◆ ToEventArgs()

override EventArgs AirshipDotNet.Events.AirshipEvent< T >.ToEventArgs ( )
inlinevirtual

Converts the event data to EventArgs.

Reimplemented from AirshipDotNet.Events.AirshipEvent.

Property Documentation

◆ Data

new T AirshipDotNet.Events.AirshipEvent< T >.Data
get

Gets the strongly-typed event data.