string DetermineTransportPackage()
        {
            var transportAppSetting = AppConfig.Read(SettingsList.TransportType, "NServiceBus.MsmqTransport").Split(",".ToCharArray())[0].Trim();
            var transport           = Transports.All.FirstOrDefault(p => transportAppSetting.StartsWith(p.MatchOn, StringComparison.OrdinalIgnoreCase));

            if (transport != null)
            {
                return(transport.Name);
            }
            return(Transports.All.First(p => p.Default).Name);
        }
 public void Reload()
 {
     Service.Refresh();
     HostName         = AppConfig.Read(SettingsList.HostName, "localhost");
     Port             = AppConfig.Read(SettingsList.Port, 1234);
     LogPath          = AppConfig.Read(SettingsList.LogPath, DefaultLogPath());
     ErrorQueue       = AppConfig.Read(SettingsList.ErrorQueue, "error");
     TransportPackage = DetermineTransportPackage();
     ConnectionString = ReadConnectionString();
     Description      = GetDescription();
     ServiceAccount   = Service.Account;
 }