Beispiel #1
0
 public void Validate()
 {
     if (V6Transports.FindByName(details.TransportPackage) == null)
     {
         throw new Exception($"Invalid Transport - Must be one of: {string.Join(",", V6Transports.All.Select(p => p.Name))}");
     }
 }
Beispiel #2
0
        public void Save()
        {
            Config.ConnectionStrings.ConnectionStrings.Set("NServiceBus/Transport", details.ConnectionString);
            var settings = Config.AppSettings.Settings;
            var version  = details.Version;

            settings.Set(SettingsList.Port, details.Port.ToString());
            settings.Set(SettingsList.HostName, details.HostName);
            settings.Set(SettingsList.LogPath, details.LogPath);
            settings.Set(SettingsList.TransportType, V6Transports.FindByName(details.TransportPackage).TypeName, version);
            settings.Set(SettingsList.ErrorQueue, details.ErrorQueue);
            Config.Save();
        }