Exemplo n.º 1
0
        public IEnumerable <ITreeNode> GetChildren(bool refresh)
        {
            var manClass = new ManagementClass(_scope.Path);
            var objects  = manClass.GetSubclasses();
            var list     = new List <ITreeNode>();

            foreach (ManagementClass subClass in objects)
            {
                ITreeNode treeNode = new WmiClass(subClass);
                list.Add(treeNode);
            }

            return(list.OrderBy(n => n.Name));
        }
Exemplo n.º 2
0
        public IEnumerable <ITreeNode> GetChildren(bool refresh)
        {
            var objects = manClass.GetSubclasses();
            var list    = new ArrayList();

            foreach (ManagementClass subClass in objects)
            {
                ITreeNode treeNode = new WmiClass(subClass);
                list.Add(treeNode);
            }

            var array = new ITreeNode[list.Count];

            list.CopyTo(array);

            return(array);
        }