/// <summary> /// Import bizTalk Hosts settings /// </summary> /// <param name="settingsWorker">SettingsWorker</param> /// <param name="filePath">Settings file path</param> private void ImportBizTalkHostsSettings(SettingsWorker settingsWorker, string filePath, string hostToImport) { HostSettings hostSettings = BizTalkSettings.LoadBiztalkHostsSettings(filePath); foreach (var host in Host) { if (hostToImport.Equals(host.Name.ToString())) { host.ImportHostSettings(settingsWorker, hostSettings); } } }
/// <summary> /// ImportBiztalkGroupSettings /// </summary> /// <param name="settingsWorker"></param> /// <param name="filePath"></param> private void ImportBizTalkGroupSettings(SettingsWorker settingsWorker, string filePath) { SettingsRoot groupSettings = BizTalkSettings.LoadBiztalkGroupSettings(filePath); try { ExportedSettings exportedSettings = new ExportedSettings(); exportedSettings.ExportedGroup = String.Format("{0}:{1}", databaseName, databaseName); exportedSettings.GroupSettings = groupSettings; settingsWorker.ImportGroupSettings(exportedSettings); } catch (Exception exception) { throw exception; } }