Exemple #1
0
        /// <summary>
        /// Gets the hosts available in a domain
        /// </summary>
        /// <param name="domainId">Domain ID</param>
        /// <returns>Array of HostNode</returns>
        public static HostNode[] GetHosts(string domainId)
        {
            Domain    domain  = Store.GetStore().GetDomain(domainId);
            ICSList   snHosts = domain.GetNodesByType(HostNodeType);
            ArrayList hosts   = new ArrayList();

            foreach (ShallowNode sn in snHosts)
            {
                HostNode hn = new HostNode(domain.GetNodeByID(sn.ID));
                hosts.Add(hn);
            }
            return((HostNode[])hosts.ToArray(typeof(HostNode)));
        }