示例#1
0
        public CimInstanceList EnumerateInstances(EnumerateInstancesOpSettings settings)
        {
            SingleResponse response = MakeSingleRequest("EnumerateInstances", settings);

            if (response.Value == null)
            {
                return new CimInstanceList();  // return an empty list
            }

            CheckSingleResponse(response, typeof(CimInstanceList));

            return (CimInstanceList)response.Value;
        }
示例#2
0
        private void EnumerateInstances(string className)
        {
            EnumerateInstancesOpSettings ei = new EnumerateInstancesOpSettings(className);

            ei.DeepInheritance = false;
            ei.IncludeClassOrigin = false;
            //ei.
            //ei.IncludeQualifiers = false;
            //ei.LocalOnly = true;

            try
            {
                progress = new ProgressForm();
                progress.Show();
                progress.Refresh();
                CimInstanceList list = mainWbemClient.EnumerateInstances(ei);
                progress.Status = ProgressForm.Updating;
                progress.Refresh();

                DisplayList(list);
                progress.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
示例#3
0
        public void EnumerateInstances(EnumerateInstancesOpSettings settings, CimDataTypeHandler callBack)
        {
            string reqXml = Wbem.CimXml.CreateRequest.ToXml(settings, this.DefaultNamespace);
            string respXml = ExecuteRequest("EnumerateInstances", reqXml);

            ParseResponse pr = new ParseResponse();

            pr.ParseXml(respXml, callBack);
        }