public async Task PingTask_PingIpAddressAsync_DefaultNetworkGateway() { var ipAddressSubnet = _commonServices.NetworkingSystem.GetDefaultGatewayAddress(); var pingReply = await _pingTask.PingIpAddressAsync(ipAddressSubnet); pingReply.Should().NotBeNull(); pingReply.Status.Should().Match <IPStatus>(ips => ips == IPStatus.Success || ips == IPStatus.TimedOut); }
/// <summary> /// Pings the ip address asynchronous. /// </summary> /// <param name="ipAddress">The ip address.</param> /// <param name="timeout">The timeout.</param> /// <returns>Task<PingReply>.</returns> /// <autogeneratedoc /> public Task <PingReply> PingIpAddressAsync(IPAddress ipAddress, int timeout) { return(_pingTask.PingIpAddressAsync(ipAddress, timeout)); }
/// <summary> /// Pings the request asynchronous. /// </summary> /// <param name="ipAddress">The ip address.</param> /// <returns>IObservable<PingReply>.</returns> /// <autogeneratedoc /> public IObservable <PingReply> PingRequestAsync(IPAddress ipAddress) { return(_pingTask.PingIpAddressAsync(ipAddress).ToObservable()); }