Skip to content

Instantly share code, notes, and snippets.

@jbogard
Created December 20, 2013 14:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbogard/8055910 to your computer and use it in GitHub Desktop.
Save jbogard/8055910 to your computer and use it in GitHub Desktop.
public sealed class UnitType
{
public static readonly UnitType Default = new UnitType();
private UnitType() {}
}
public abstract class CommandHandler<TMessage>
: ICommandHandler<TMessage, UnitType>
where TMessage : ICommand
{
public UnitType Handle(TMessage message)
{
HandleCore(message);
return UnitType.Default;
}
protected abstract void HandleCore(TMessage message);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment