static void Main(string[] args) { LogManager.Configuration = LoggingConfiguration(); var bus = RabbitHutch.CreateBus("host=localhost"); bus.Subscribe<PaymentSucceeded>("Consumer", message => log.Info(message)); bus.Subscribe<PaymentFailed>("Consumer", message => log.Info(message)); var trialStartedHandler = new TrialStartedHandler(); bus.Subscribe<TrialStarted>("Consumer", trialStartedHandler.Handle); Console.WriteLine("Press ENTER to exit"); Console.ReadLine(); }
static void Main(string[] args) { LogManager.Configuration = LoggingConfiguration(); var bus = RabbitHutch.CreateBus("host=localhost"); bus.Subscribe <PaymentSucceeded>("Consumer", message => log.Info(message)); bus.Subscribe <PaymentFailed>("Consumer", message => log.Info(message)); var trialStartedHandler = new TrialStartedHandler(); bus.Subscribe <TrialStarted>("Consumer", trialStartedHandler.Handle); Console.WriteLine("Press ENTER to exit"); Console.ReadLine(); }