Пример #1
0
        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);
        }
Пример #2
0
 private void Reset()
 {
     _response = new DTO_SmartLinkTransactionResponse();
     _waitflag = true;
 }
Пример #3
0
 public WCFServiceSmartLink()
 {
     _waitflag = false;
     _response = new DTO_SmartLinkTransactionResponse();
 }