/// <summary>
 /// This method populates the ClassNavigator treeview with all the WMI classes belonging to the specified namespace.
 /// </summary>
 /// <param name="nameSpace">The namespace to retrieve the classes from.</param>
 private void PopulateClassNavigator(string nameSpace)
 {
     try {
         service = locator.ConnectServer(".", nameSpace);
         IEnumerable <WbemObject> objects = service.GetAllObjects();
         ClassNavigator.PopulateTreeView(objects);
     } catch (ManagementException me) {
         TextBlockErrors.Text = me.Message;
     } catch (ArgumentException ae) {
         TextBlockErrors.Text = ae.Message;
     }
 }
Exemple #2
0
        public void CorrectNamespaceReturnsSWbemServiceObject()
        {
            WbemService service = locator.ConnectServer(localServer, rootcimv2);

            Assert.IsNotNull(service);
        }