public DTO_SmartLinkTransactionResponse PingTerminal(string ipAddress) { var response = new DTO_SmartLinkTransactionResponse(); try { using (var ping = new System.Net.NetworkInformation.Ping()) { System.Net.NetworkInformation.PingReply pingReply = ping.Send(ipAddress); response.Successful = (pingReply.Status == System.Net.NetworkInformation.IPStatus.Success); if (!response.Successful) { response.ErrorText = "Login Failed - " + Convert.ToString(pingReply.Status); } } } catch (Exception ex) { response.Successful = false; response.ErrorText = ex.Message; ServiceLogger.LogException("Exception in PingTerminal", ex); } return(response); }
private void Reset() { _response = new DTO_SmartLinkTransactionResponse(); _waitflag = true; }
public WCFServiceSmartLink() { _waitflag = false; _response = new DTO_SmartLinkTransactionResponse(); }