Conversation
|
This is neat! Would it be worth including events with other arities? (Maybe like zero through three params?) |
|
@wlsnmrk I was thinking of these two options.
Maybe both? From what I've seen with the .NET RX library they have FromEvent which can be overloaded with a conversion parameter and FromEventHandlerPattern, which is just the classic (object sender, TEventArgs args) |
I'd personally like this best, because it is the most .NET-like (no need to relearn anything). But the way I'd do it is write a text template to generate all the relevant AutoEvents for 0-16 arguments and keep them in lockstep should they ever change. Perfect for this are Design-time T4 templates. Also: what about Func? 🪩 |
Figured since we're using this as a reactive library that maybe we should have a way to convert C# events into sync subjects. Should help if someone wants to use this with DisposableCollections!