Skip to content

Instantly share code, notes, and snippets.

@andreabalducci
Created December 23, 2013 14:58
Show Gist options
  • Select an option

  • Save andreabalducci/8098479 to your computer and use it in GitHub Desktop.

Select an option

Save andreabalducci/8098479 to your computer and use it in GitHub Desktop.
NEvenstore Null Commit Dispatcher
public static class NullDispatchSchedulerWireupExtensions
{
public static NullDispatchSchedulerWireup DoNotDispatchCommits(this Wireup wireup)
{
return new NullDispatchSchedulerWireup(wireup);
}
}
public class NullDispatchSchedulerWireup : Wireup
{
public NullDispatchSchedulerWireup(Wireup wireup)
: base(wireup)
{
Container.Register<IScheduleDispatches>(c=> new NullDispatchScheduler());
}
}
public class NullDispatchScheduler : IScheduleDispatches
{
public void Dispose()
{
}
public void ScheduleDispatch(ICommit commit)
{
}
public void Start()
{
}
}
@damianh

damianh commented Dec 24, 2013

Copy link
Copy Markdown

This is in NES now, as NoopDispatchScheduler :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment