mischief

Untitled

Feb 17th, 2014
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.09 KB | None | 0 0
  1.   public class ambrExchange
  2.     {
  3.         private string message;
  4.         private string response;
  5.         private int state;
  6.         private int failed_count;
  7.  
  8.         public void count_failed()
  9.         {
  10.             this.failed_count++;
  11.         }
  12.         public void clear_failed_count()
  13.         {
  14.             failed_count = 0;
  15.         }
  16.         public int get_failed_count()
  17.         {
  18.             return failed_count;
  19.         }
  20.         public ambrExchange(string msg,string resp)
  21.         {
  22.             this.message = msg;
  23.             this.response = resp;
  24.             this.failed_count = 0;
  25.         }
  26.         public string getMessage()
  27.         {
  28.             return this.message;
  29.         }
  30.  
  31.         public string getResponse()
  32.         {
  33.             return this.response;
  34.         }
  35.         public bool CheckResponse(string rx_response)
  36.         {
  37.             if(this.response.ToLower().Contains(rx_response.toLower())
  38.             {
  39.                 return true;
  40.             }
  41.             else
  42.             {
  43.                 return false;
  44.             }
  45.         }
  46.  
  47.  
  48.     }
Advertisement
Add Comment
Please, Sign In to add comment