pjvds / ncqrs

Ncqrs Framework - The CQRS Framework for .NET
Other
539 stars 164 forks source link

Development #32

Closed jasondentler closed 13 years ago

jasondentler commented 13 years ago

For "bus.RegisterAllHandlersInAssembly(myDenormalizerAssembly);" if an event handler interface is on an abstract base class, the abstract base class is registered with the bus as well as the concrete implementation.

For example, this doesn't work:

public abstract class Denormalizer<T> : IEventHandler<T> 
{ 
    // Do some common infrastructure-y stuff here

    // Handle the event
    public abstract void Handle(T evnt);
}

public class SomethingDenormalizer : Denormalizer<SomethingCreatedEvent> 
{
    public override void Handle(SomethingCreatedEvent evnt)
    {
        var session = base.GetSession();
    }
} 

Yes, it's a wacky way to structure things.

SzymonPobiega commented 13 years ago

Thanks man:)