Class Type<T>.Event<THandler>
Provides typed access to instance event declared in type T.
Inherited Members
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Event<THandler>
where THandler : MulticastDelegate
Type Parameters
| Name | Description |
|---|---|
| THandler | Type of event handler. |
Methods
| Improve this Doc View SourceGet(String, Boolean)
Gets instance event.
Declaration
public static Event<T, THandler> 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, THandler> | Instance event; or null, if event doesn't exist. |
GetStatic(String, Boolean)
Gets static event.
Declaration
public static Event<THandler> 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<THandler> | Static event; or null, if event doesn't exist. |
Require(String, Boolean)
Gets instance event.
Declaration
public static Event<T, THandler> 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, THandler> | Instance event. |
Exceptions
| Type | Condition |
|---|---|
| MissingEventException | Event doesn't exist. |
RequireStatic(String, Boolean)
Gets static event.
Declaration
public static Event<THandler> 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<THandler> | Static event. |
Exceptions
| Type | Condition |
|---|---|
| MissingEventException | Event doesn't exist. |