Summary
Uses reflection to achieve the same as
System.Delegate.GetInvocationList
without allocating
garbage every time.
- If the delegate is null or , this method returns false and outputs null.
- If the underlying delegate field was not found, this method returns false and outputs null.
- If the delegate is not multicast, this method this method returns true and outputs null.
- If the delegate is multicast, this method this method returns true and outputs its invocation list.
Syntax
public static bool TryGetInvocationListNonAlloc(MulticastDelegate multicast, out Delegate[] delegates)
Parameters
Name |
Type |
Description |
multicast |
MulticastDelegate |
|
delegates |
Delegate[] |
|
Return Value