Extension methods for System.Delegate
.
More...
Static Public Member Functions | |
static object | Notify (this Delegate method, params object[] args) |
Invoke the specified delegate event if exists, to notify the receiving handlers. More... | |
Extension methods for System.Delegate
.
|
static |
Invoke the specified delegate event if exists, to notify the receiving handlers.
Note, the best is to call the explicit Delegate.Invoke()
directly instead of this. Also, you may not need this for callback usage, since it usually has only one handler.
Use this only if you need to read the Unity Profiler hierarchy when deep profiling. While the Profiler indents every single invocation, and quickly make the hierarchy unreadable. This makes a little GC to flatten the delegate, to make the hierarchy not so deep and more readable.
Comparisons:
Delegate.Invoke()
: unreadable, fastest and no GC.Delegate.DynamicInvoke()
: unreadable, very slow.method | Delegate instance. |
args | Arguments. |