Exemple #1
0
 private static JObject SerializeAction(ServiceAction action)
 {
     var jAction = new JObject
     {
         ["Name"] = action.Name,
         ["Body"] = action.Body,
         ["MediaType"] = action.MediaType,
         ["Method"] = action.Method,
         ["UriPath"] = action.UriPath
     };
     return jAction;
 }
 private async Task InvokeRestActionAsync(ServiceAction action)
 {
     try
     {
         var response = await _invokerFactory.CreateInvoker(action).InvokeRestActionAsync();
         Messenger.Default.Send(new NotificationMessage<HttpResponse>(response,
             "Service Action Result"));
     }
     catch (Exception ex)
     {
         //TODO: Move dialog call to somewhere else
         await new MessageDialog($"Something bad happended: {ex.Message}").ShowAsync();
     }
 }
Exemple #3
0
 public ActionInvokerActionInvoker(ServiceAction action)
 {
     _action = action;
 }
Exemple #4
0
 public IActionInvoker CreateInvoker(ServiceAction action)
 {
     return new ActionInvokerActionInvoker(action);
 }