Skip to content

Instantly share code, notes, and snippets.

View codescribler's full-sized avatar

Daniel Whittaker codescribler

View GitHub Profile
@codescribler
codescribler / MakeEvent from Command
Created June 20, 2012 08:44
Makes an event from the provided command - see gregory young's stuff on CQRS
protected TE MakeEvent<TE>(Command command)
where TE : Event
{
return MakeEvent<TE>(command, new List<object>());
}
private TE MakeEvent<TE>(Command command, IEnumerable<object> additionalParams)
where TE : Event
{
var type = typeof(TE);