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); } }
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"); } }
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"); } }
public void IsInstallationGood() { Debug.WriteLine(MsmqSetup.IsInstallationGood()); }
public void IsMsmqInstalled() { Debug.WriteLine(MsmqSetup.IsMsmqInstalled()); }