marten icon indicating copy to clipboard operation
marten copied to clipboard

[Feature Request] Projection-event applier lambda functions

Open malscent opened this issue 4 years ago • 1 comments

At times, when creating modular software, it would be useful to be able to add events and event appliers for existing projections from external libraries.

An example:

If i have ProjectionA in ClassLibA with methods to apply all events within ClassLibA, if I want to add an optional feature by including another library/module (ClassLibB), the events for the optional feature must reside in ClassLibA, and ProjectionA must contain Apply methods for them.

This would break the separation of concerns and remove the benefits of breaking optional feature into a module/library.

I propose that we allow registration of EventHandlers for specific Projections and Events. Here is a simplistic gist example

malscent avatar Mar 12 '20 13:03 malscent

This is actually technically possible today, just there's no documentation or sample to show you how.

jeremydmiller avatar Aug 22 '22 15:08 jeremydmiller

Moving this to discussion until we attempt to address the docs.

mysticmind avatar Nov 22 '23 17:11 mysticmind