Skip to content

Support abstract event registrations within an Aggregate #127

@dealproc

Description

@dealproc

I am unsure if this is desirable or not, but I'd like to have an ability to do this, if it makes sense:

public class MyAggregate : AggregateRoot {

  private void RegisterEvents() { 
     Register<SomeAbstractClass>(Apply)
  }

  private void Apply(SomeAbstractClass msg) {
    ....
  }
}

public abstract class SomeAbstractClass : Event {
}

And have the router route any concrete types from SomeAbstractClass to an Apply(SomeAbstractClass msg) {...} handler. As it stands now, I have an abstract Apply(SomeAbstractClass msg) { }, then do registrations per concrete class to the abstract class handler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions