yreynhout / AggregateSource

Lightweight infrastructure for doing eventsourcing using aggregates
BSD 3-Clause "New" or "Revised" License
257 stars 60 forks source link

[DESIGN] Enable support for Up/Down casting of events #14

Open yreynhout opened 11 years ago

yreynhout commented 11 years ago

Meet a new citizen

    public interface IEventConverter<in TEvent> 
    {
        IEnumerable<object> Convert(TEvent @event);
    }

Requires that the IEventDeserializer relaxes a bit as well

    public interface IEventDeserializer
    {
        IEnumerable<object> Deserialize(ResolvedEvent resolvedEvent);
    }