System.Data.RiakClient.RiakManagementRepository.Ping C# (CSharp) Method

Ping() public method

public Ping ( ) : RiakResponse
return RiakResponse
        public RiakResponse<bool> Ping()
        {
            var response = Connection.WriteRequestWithoutBody(false, RequestMethod.Ping);
            if (response.ResponseCode == RiakResponseCode.Successful) response.Result = true;
            return response;
        }

Usage Example

 public void ShouldPing()
 {
     // Arrange.
     var connection = new RiakConnection { Host = "192.168.30.118", Port = 8087 };
     var repository = new RiakManagementRepository(connection);
     
     // Act.
     repository.Ping();
 }