|
static IEnumerable< MethodInfo > | ResolveHookMethods (this Type type, Enum hook, Enum scope=null) |
| Finds all methods with properly defined hook and scope on it Ordered from base class up More...
|
|
static IEnumerable< MethodInfo > | ResolveHookMethods (object obj, Enum hook, Enum scope=null) |
| Resolve all methods from an object with defined hook and scope Ordered from base class up More...
|
|
◆ ResolveHookMethods() [1/2]
static IEnumerable<MethodInfo> pluginbase.Helpers.Attributes.Hooks.ResolveHookMethods |
( |
this Type |
type, |
|
|
Enum |
hook, |
|
|
Enum |
scope = null |
|
) |
| |
|
static |
Finds all methods with properly defined hook and scope on it Ordered from base class up
- Returns
- The hook methods.
- Parameters
-
type | Type. |
hook | Hook. |
scope | Scope. |
22 foreach(var method
in type.GetAllMethods(x => Attribute.IsDefined(x, typeof(HookAttribute))).
Reverse() )
24 foreach(var attr
in method.GetCustomAttributes(typeof(HookAttribute),
true).OfType<HookAttribute>())
26 if (attr.HasScope(scope) && attr.IsHookedTo(hook))
Run this animation in reverse
◆ ResolveHookMethods() [2/2]
static IEnumerable<MethodInfo> pluginbase.Helpers.Attributes.Hooks.ResolveHookMethods |
( |
object |
obj, |
|
|
Enum |
hook, |
|
|
Enum |
scope = null |
|
) |
| |
|
static |
Resolve all methods from an object with defined hook and scope Ordered from base class up
- Returns
- The hook methods.
- Parameters
-
obj | Object. |
hook | Hook. |
scope | Scope. |
45 return Hooks.ResolveHookMethods(obj.GetType(), hook, scope);
The documentation for this class was generated from the following file: