Generator no longer needs to know about the Input or Output inner classes of a logic block — it'll just infer the existence of an input or output based on usage, potentially allowing for a less generic and more versatile API in a future release.
Removed WeakEvent for the sake of performance and API usage. Looked like it was allocating a list on every invocation. Would rather just use .NET's underlying Multicast delegates that power vanilla C# events.
Bindings now unsubscribe input and error event channels — was a small oversight.
Added a public API method Start() to LogicBlock and LogicBlockAsync so that you can trigger OnEnter callbacks to run on the initial state. There's a lot of times you want to get those side effects after you've setup bindings so that you don't have to write a lot of redundant glue code to configure whatever is binding to the logic block.
Added test case showing that structs can be used for inputs and outputs. Using structs for outputs should prevent them from ever having to hit the heap, meaning you could spam producing struct outputs as much as you want. 😀
A number of small improvements:
Start()
toLogicBlock
andLogicBlockAsync
so that you can triggerOnEnter
callbacks to run on the initial state. There's a lot of times you want to get those side effects after you've setup bindings so that you don't have to write a lot of redundant glue code to configure whatever is binding to the logic block.