Beispiel #1
0
        private async Task <bool> InvokeInternal(ListItemAction action, ListItem item)
        {
            try
            {
                var result = await action.ProcessAsync(item);

                if (_deferredAction?.DoesChangeWorkflow ?? false)
                {
                    IWorkflowManager workflowManager = ServiceRegistration.Get <IWorkflowManager>();
                    workflowManager.EndBatchUpdate();
                }

                return(result);
            }
            catch (Exception ex)
            {
                ServiceRegistration.Get <ILogger>().Error("Error executing MediaItemAction '{0}':", ex, action.GetType());
                return(false);
            }
        }
 private async Task InvokeInternal(ListItemAction action, ListItem item)
 {
     try
     {
         await action.ProcessAsync(item);
     }
     catch (Exception ex)
     {
         ServiceRegistration.Get <ILogger>().Error("Error executing MediaItemAction '{0}':", ex, action.GetType());
     }
 }