コード例 #1
0
        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);
        }
コード例 #2
0
 /// <summary>
 /// Pings the ip address asynchronous.
 /// </summary>
 /// <param name="ipAddress">The ip address.</param>
 /// <param name="timeout">The timeout.</param>
 /// <returns>Task&lt;PingReply&gt;.</returns>
 /// <autogeneratedoc />
 public Task <PingReply> PingIpAddressAsync(IPAddress ipAddress, int timeout)
 {
     return(_pingTask.PingIpAddressAsync(ipAddress, timeout));
 }
コード例 #3
0
ファイル: PingServiceRx.cs プロジェクト: Kiphaz/PureActive
 /// <summary>
 /// Pings the request asynchronous.
 /// </summary>
 /// <param name="ipAddress">The ip address.</param>
 /// <returns>IObservable&lt;PingReply&gt;.</returns>
 /// <autogeneratedoc />
 public IObservable <PingReply> PingRequestAsync(IPAddress ipAddress)
 {
     return(_pingTask.PingIpAddressAsync(ipAddress).ToObservable());
 }