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; }
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); } }
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); }