Example #1
0
        public static ActionResult InstallMsmq(Session session)
        {
            session.Log("Installing/Starting MSMQ if necessary.");

            try
            {
                CaptureOut(() =>
                {
                    if (MsmqSetup.StartMsmqIfNecessary(true))
                    {
                        session.Log("MSMQ installed and configured.");
                    }
                    else
                    {
                        session.Log("MSMQ already properly configured.");
                    }
                }, session);

                return(ActionResult.Success);
            }
            catch (Exception)
            {
                return(ActionResult.Failure);
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Press 'Enter' to install MSMQ.To exit, Ctrl + C");

            while (Console.ReadLine() != null)
            {
                var result = MsmqSetup.StartMsmqIfNecessary(true);

                Console.WriteLine("install result was: {0}", result);
            }
        }
        public void Install(WindowsIdentity identity)
        {
            if (!Enabled)
            {
                return;
            }

            if (!MsmqSetup.StartMsmqIfNecessary(false))
            {
                throw new Exception("Failed to setup MSMQ since it needs to be reinstalled. A reinstall will remove any local queues. Please go to http://nservicebus.com/RequiredInfrastructure/Windows for instructions on how to remedy the situation");
            }
        }
Example #4
0
        public void Install(WindowsIdentity identity)
        {
            if (!Enabled)
            {
                return;
            }

            if (!MsmqSetup.StartMsmqIfNecessary(false))
            {
                throw new Exception("Failed to setup MSMQ since it needs to be reinstalled. A reinstall will remove any local queues. Please go to http://particular.net/articles/running-nservicebus-on-windows for instructions on how to remedy the situation");
            }
        }
Example #5
0
 public void IsInstallationGood()
 {
     Debug.WriteLine(MsmqSetup.IsInstallationGood());
 }
Example #6
0
 public void IsMsmqInstalled()
 {
     Debug.WriteLine(MsmqSetup.IsMsmqInstalled());
 }