Interface IEventDescriptor
Definition
Namespace: StardewUI.Framework.Descriptors
Assembly: StardewUI.dll
Describes a single event on some type.
Implements
IMemberDescriptor
Members
Properties
Name | Description |
---|---|
ArgsTypeDescriptor | Descriptor for the type of event object (arguments), generally a subtype of EventArgs. |
DelegateParameterCount | Number of parameters that the Invoke method of the DelegateType accepts. |
DelegateType | The type (subtype of Delegate) that can be added/removed from the event handlers. |
Methods
Name | Description |
---|---|
Add(Object, Delegate) | Adds an event handler. |
Remove(Object, Delegate) | Removes an event handler. |
Details
Properties
ArgsTypeDescriptor
Descriptor for the type of event object (arguments), generally a subtype of EventArgs.
Property Value
DelegateParameterCount
Number of parameters that the Invoke
method of the DelegateType accepts.
Property Value
DelegateType
The type (subtype of Delegate) that can be added/removed from the event handlers.
Property Value
Methods
Add(Object, Delegate)
Adds an event handler.
Parameters
target
Object
The instance of the DeclaringType on which to subscribe to events.
handler
Delegate
The handler to run when the event is raised; must be assignable to the DelegateType.
Remove(Object, Delegate)
Removes an event handler.
Parameters
target
Object
The instance of the DeclaringType on which to unsubscribe from events.
handler
Delegate
The handler that was previously registered, i.e. via Add(Object, Delegate).