static void Main() { BootstrapLogger(); _pending = new List<IPendingCommand>(); try { Transports = new TransportCache(); Transports.AddTransportFactory(new LoopbackTransportFactory()); Transports.AddTransportFactory(new MsmqTransportFactory()); Transports.AddTransportFactory(new RabbitMqTransportFactory()); string line = CommandLine.GetUnparsedCommandLine(); if (line.IsNotEmpty()) { ProcessLine(line); } else { _appender.Threshold = Level.All; RunInteractiveConsole(); } } finally { WaitForPendingCommands(); if (_bus != null) { _log.Debug("Disposing of service bus instance"); _bus.Dispose(); _bus = null; } Transports.Dispose(); Transports = null; _log.Debug("End of Line."); } }
static void Main() { BootstrapLogger(); _pending = new List<IPendingCommand>(); try { Transports = new TransportCache(); Transports.AddTransportFactory(new LoopbackTransportFactory()); Transports.AddTransportFactory(new MsmqTransportFactory()); Transports.AddTransportFactory(new RabbitMqTransportFactory()); string line = CommandLine.GetUnparsedCommandLine().Trim(); if (line.IsNotEmpty()) { ProcessLine(line); } else { _appender.Threshold = Level.All; RunInteractiveConsole(); } } finally { WaitForPendingCommands(); foreach (var bus in _buses) { _log.DebugFormat("Disposing of service bus instance: {0}", bus.Endpoint.Address.Uri); bus.Dispose(); } _buses.Clear(); Transports.Dispose(); Transports = null; _log.Debug("End of Line."); } }
static void Main() { BootstrapLogger(); _pending = new List <IPendingCommand>(); try { Transports = new TransportCache(); Transports.AddTransportFactory(new LoopbackTransportFactory()); Transports.AddTransportFactory(new MsmqTransportFactory()); Transports.AddTransportFactory(new RabbitMqTransportFactory()); string line = CommandLine.GetUnparsedCommandLine().Trim(); if (line.IsNotEmpty()) { ProcessLine(line); } else { _appender.Threshold = Level.All; RunInteractiveConsole(); } } finally { WaitForPendingCommands(); if (_bus != null) { _log.Debug("Disposing of service bus instance"); _bus.Dispose(); _bus = null; } Transports.Dispose(); Transports = null; _log.Debug("End of Line."); } }
static void Main() { BootstrapLogger(); _pending = new List <IPendingCommand>(); try { Transports = new TransportCache(); Transports.AddTransportFactory(new LoopbackTransportFactory()); Transports.AddTransportFactory(new RabbitTransportFactory()); string line = CommandLine.GetUnparsedCommandLine().Trim(); if (line.IsNotEmpty()) { ProcessLine(line); } else { _appender.Threshold = Level.All; RunInteractiveConsole(); } } finally { WaitForPendingCommands(); foreach (var bus in _buses) { _log.DebugFormat("Disposing of service bus instance: {0}", bus.Endpoint.Address.Uri); bus.Dispose(); } _buses.Clear(); Transports.Dispose(); Transports = null; _log.Debug("End of Line."); } }