public BtsHostInstanceCollection(BizTalkCatalog catalog) : base( catalog , HostInstance.GetInstances( ManagementHelper.GetScope(typeof(HostInstance), catalog.Instance, catalog.Database), null, null)) { }
/// <summary> /// Reetrieve the first WMI MSBTS_GroupSetting object in the collection /// </summary> private void RetrieveGroupSettings() { try { GroupSetting.StaticScope = ManagementHelper.GetScope(typeof(GroupSetting), sqlInstanceName, databaseName); foreach (GroupSetting setting in GroupSetting.GetInstances()) { groupSettings = setting; break; } } finally { GroupSetting.StaticScope = null; } }
private void RetrieveHostSetting(string hostName) { try { HostSetting.StaticScope = ManagementHelper.GetScope(typeof(HostSetting), Catalog.Instance, Catalog.Database); foreach (HostSetting setting in HostSetting.GetInstances()) { if (hostName == setting.Name) { hostSetting = setting; } } } finally { HostSetting.StaticScope = null; } }