예제 #1
0
		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.");
			}
		}
예제 #2
0
		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.");
			}
		}
예제 #3
0
        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.");
            }
        }
예제 #4
0
파일: Program.cs 프로젝트: gcheney/Burrows
        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.");
            }
        }