Skip to content

Conversation

@vasmann
Copy link

@vasmann vasmann commented Sep 15, 2023

  • changed concept: all global contexts share same EventManager
  • EventManager supports WeakReferences + ConditionalWeakTable (CWT)
  • EventManager supports AOT generic event handlers which to increase performance. You can still use events without AOT which will produce overhead during event execution + possible boxing for value type events
  • EventManager supports ValueType events (consider using AOT through DeclareEvent call to avoid boxing and performance hit)
  • EventManager supports event inheritance and filtering. Please note, you can not handle ValueType events with void Handle(object @event) handlers. ValueTypes handlers are invariant
  • removed commands concept
  • refactored context: renamed methods to more apropriate

Vasily Moiseev and others added 3 commits September 15, 2023 17:03
- changed concept: all global contexts share same EventManager
- EventManager supports WeakReferences + ConditionalWeakTable (CWT)
- EventManager supports AOT generic event handlers which to increase performance. You can still use events without AOT which will produce overhead during event execution + possible boxing for value type events
- EventManager supports ValueType events (consider using AOT through DeclareEvent call to avoid boxing and performance hit)
- EventManager supports event inheritance and filtering. Please note, you can not handle ValueType events with void Handle(object @event) handlers. ValueTypes handlers are invariant
- removed commands concept
- refactored context: renamed methods to more apropriate
*
- now you can trigger event like manager.DispatchEvent<Base>(new Derived()) or manager.DispatchEvent<object>(new SomeStruct()) - so if Derived, SomeStruct events were declared they will be called by fast branch.
- manager.DispatchEvent<object>(new SomeStruct()) - SomeStruct will be unboxed once and all handlers will receive unboxed value
*
- added fix to intercept events if interceptor is registered after derived events were declared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant