Class Type<T>.Event<H>
Provides typed access to instance event declared in type T
.
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Event<H> : object where H : MulticastDelegate
Type Parameters
Name | Description |
---|---|
H | Type of event handler. |
Methods
| Improve this Doc View SourceGet(String, Boolean)
Gets instance event.
Declaration
public static Event<T, H> Get(string eventName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | eventName | Name of event. |
Boolean | nonPublic | true to reflect non-public event. |
Returns
Type | Description |
---|---|
Event<T, H> | Instance event; or null, if event doesn't exist. |
GetStatic(String, Boolean)
Gets static event.
Declaration
public static Event<H> GetStatic(string eventName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | eventName | Name of event. |
Boolean | nonPublic | true to reflect non-public event. |
Returns
Type | Description |
---|---|
Event<H> | Static event; or null, if event doesn't exist. |
Require(String, Boolean)
Gets instance event.
Declaration
public static Event<T, H> Require(string eventName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | eventName | Name of event. |
Boolean | nonPublic | true to reflect non-public event. |
Returns
Type | Description |
---|---|
Event<T, H> | Instance event. |
Exceptions
Type | Condition |
---|---|
MissingEventException | Event doesn't exist. |
RequireStatic(String, Boolean)
Gets static event.
Declaration
public static Event<H> RequireStatic(string eventName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | eventName | Name of event. |
Boolean | nonPublic | true to reflect non-public event. |
Returns
Type | Description |
---|---|
Event<H> | Static event. |
Exceptions
Type | Condition |
---|---|
MissingEventException | Event doesn't exist. |