예제 #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;
 }
예제 #2
0
 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();
     }
 }
예제 #3
0
 public ActionInvokerActionInvoker(ServiceAction action)
 {
     _action = action;
 }
예제 #4
0
 public IActionInvoker CreateInvoker(ServiceAction action)
 {
     return new ActionInvokerActionInvoker(action);
 }