public string Execute(ExecuteAction action, string param = "")
 {
     RestRequest restRequest = null;
     switch (action)
     {
         case ExecuteAction.Get:
         case ExecuteAction.GetCache:
             restRequest = new RestRequest(this.a_restUrl + action.ToString(), param, "GET");
             break;
         case ExecuteAction.AwakeThread:
         case ExecuteAction.Clear:
         case ExecuteAction.GetByGuid:
         case ExecuteAction.GetByFilter:
             restRequest = new RestRequest(this.a_restUrl + action.ToString(), param, "POST");
             break;
         default:
             break;
     }
     return restRequest.Execute();
 }
Example #2
0
 private void UpdateListView()
 {
     if (ListViewItem == null)
     {
         return;
     }
     _invoke.Invoke(new MethodInvoker(() =>
     {
         ListViewItem.SubItems[3].Text = _ExecuteAction.ToString();
         ListViewItem.SubItems[4].Text = _ExecuteCount.ToString();
     }));
 }
Example #3
0
        public string Execute(ExecuteAction action, string param = "")
        {
            RestRequest restRequest = null;

            switch (action)
            {
            case ExecuteAction.Get:
            case ExecuteAction.GetCache:
                restRequest = new RestRequest(this.a_restUrl + action.ToString(), param, "GET");
                break;

            case ExecuteAction.AwakeThread:
            case ExecuteAction.Clear:
            case ExecuteAction.GetByGuid:
            case ExecuteAction.GetByFilter:
                restRequest = new RestRequest(this.a_restUrl + action.ToString(), param, "POST");
                break;

            default:
                break;
            }
            return(restRequest.Execute());
        }