EventContext

open class EventContext<T : Event>(val eventHandler: EventHandler<T>, val event: T, val cache: MutableStringKeyedMap<Any>) : KordExKoinComponent, TranslatableContext

Light wrapper representing the context for an event handler's action.

This is what this refers to in an event handler action body. You shouldn't need to instantiate this yourself.

Parameters

eventHandler

Respective event handler for this context object.

event

Event that triggered this event handler.

cache

Data cache map shared with the defined checks.

Constructors

Link copied to clipboard
constructor(eventHandler: EventHandler<T>, event: T, cache: MutableStringKeyedMap<Any>)

Properties

Link copied to clipboard
Link copied to clipboard
open val event: T
Link copied to clipboard
Link copied to clipboard
open override var resolvedLocale: Locale?

Cached locale variable, stored and retrieved by getLocale.

Link copied to clipboard

Current Sentry context, containing breadcrumbs and other goodies.

Functions

Link copied to clipboard
open override fun getKoin(): Koin

Get the associated Koin instance.

Link copied to clipboard
open suspend override fun getLocale(): Locale

Resolve the locale for this context, storing it in resolvedLocale.