コード例 #1
0
 public BtsHostInstanceCollection(BizTalkCatalog catalog)
     : base(
         catalog
         , HostInstance.GetInstances(
             ManagementHelper.GetScope(typeof(HostInstance), catalog.Instance, catalog.Database), null, null))
 {
 }
コード例 #2
0
ファイル: BizTalkCatalog.cs プロジェクト: radtek/DevOps
        /// <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;
            }
        }
コード例 #3
0
        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;
            }
        }