public void AsyncFill(PanelItemBase parent, ICollection <PanelItemBase> result) { // get domain list via OS api foreach (var item in NetApiHelper.NetServerEnum(null, SV_101_TYPES.SV_TYPE_DOMAIN_ENUM)) { result.Add(new DomainPanelItem(parent, ServerInfo.FromNetApi32(item))); } }
public void TestNetServerEnumDomains() { IEnumerable <SERVER_INFO_101> list = NetApiHelper.NetServerEnum(null, SV_101_TYPES.SV_TYPE_DOMAIN_ENUM); IEnumerator <SERVER_INFO_101> enumerator = list.GetEnumerator(); Assert.IsTrue(enumerator.MoveNext()); Assert.IsNotEmpty(enumerator.Current.name); }
public void TestNetServerEnumComps() { string domain = WorkstationInfo.FromComputer(null).LanGroup; IEnumerable <SERVER_INFO_101> list = NetApiHelper.NetServerEnum(domain, SV_101_TYPES.SV_TYPE_DOMAIN_ENUM); int count = 0; foreach (SERVER_INFO_101 item in list) { count++; } Assert.Greater(count, 0); }
public void AsyncFill(PanelItemBase parent, ICollection <PanelItemBase> result) { if (parent == null) { throw new ArgumentNullException("parent"); } //Thread.Sleep(5000); //result.Add(new PanelItemDoubleDot(parent)); // get server list via OS api foreach (var item in NetApiHelper.NetServerEnum(parent.Name, SV_101_TYPES.SV_TYPE_ALL)) { var si = ServerInfo.FromNetApi32(item); si.ResetUtcUpdated(); result.Add(new ComputerPanelItem(parent, si)); } }