Open
Description
What is the usecase for this plug
In order to support events, an implementation of multicast delegates is needed. Currently, it seems like the plugs for this class are missing.
Complexity of plug
As a multicast delegate is an invocation list, this should be trivial to implement.
Describe alternatives you've considered
A possible alternative is using a List<T>
, where T
is the delegate type.
Additional context
Currently, using events results in the following method being unplugged:
1> Need plug for: System.MulticastDelegate System.Delegate.InternalAllocLike(System.Delegate)(Plug Signature: System_MulticastDelegate__System_Delegate_InternalAllocLike_System_Delegate_ ).
1> Static: True
1> Assembly: System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
1> Called from:
1>System.MulticastDelegate::System.MulticastDelegate NewMulticastDelegate(System.Object[], Int32, Boolean)
1>System.MulticastDelegate::System.Delegate CombineImpl(System.Delegate)
1>System.Delegate::System.Delegate CombineImpl(System.Delegate)
Interestingly enough, Cosmos seems to have a plug related to multicast delegates: https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.Core_Plugs/System/DelegateImpl.cs#L35
This is possibly a software regression.