/// <summary> /// Discovers Computer nodes by an ip enumerable. /// </summary> /// <returns>A List of booleans for each discovered node</returns> /// <param name="netmap">The NetworkMap</param> /// <param name="ips">The Computer ips to discover</param> /// <param name="flashTime">The flash time length for the discovery</param> /// <seealso cref="DiscoverNodeByIp"/> public static List <bool> DiscoverNodesByIps(this Hacknet.NetworkMap netmap, IEnumerable <string> ips, float flashTime = 1f) => netmap.DiscoverNodes(ips.Select(s => netmap.GetComputerByIp(s)), flashTime);
/// <summary> /// Discovers a Computer node by ip if it exists. /// </summary> /// <returns><c>true</c>, if node exists and was discovered, <c>false</c> otherwise.</returns> /// <param name="netmap">The NetworkMap</param> /// <param name="ip">The Computer ip to discover</param> /// <param name="flashTime">The flash time length for the discovery</param> public static bool DiscoverNodeByIp(this Hacknet.NetworkMap netmap, string ip, float flashTime = 1f) => netmap.DiscoverNode(netmap.GetComputerByIp(ip), flashTime);