Skip to content

Class ReflectionEventDescriptor

Definition

Namespace: StardewUI.Framework.Descriptors
Assembly: StardewUI.dll

Helper for creating IEventDescriptor instances using reflection.

public static class ReflectionEventDescriptor

Inheritance
Object ⇦ ReflectionEventDescriptor

Members

Methods

Name Description
FromEventInfo(EventInfo) Creates or retrieves a descriptor for a given event.
IsSupported(EventInfo) Checks if an event is supported for view binding.

Details

Methods

FromEventInfo(EventInfo)

Creates or retrieves a descriptor for a given event.

public static StardewUI.Framework.Descriptors.IEventDescriptor FromEventInfo(System.Reflection.EventInfo eventInfo);
Parameters

eventInfo   EventInfo
The event info.

Returns

IEventDescriptor

The descriptor for the specified eventInfo.


IsSupported(EventInfo)

Checks if an event is supported for view binding.

public static bool IsSupported(System.Reflection.EventInfo eventInfo);
Parameters

eventInfo   EventInfo
The event info.

Returns

Boolean

true if a ReflectionEventDescriptor<TTarget, THandler> can be created for the specified eventInfo, otherwise false.