Exemplo n.º 1
0
 private void OnExecutionFailed(JobInfo jobInfo)
 {
     ExecutionFailed?.Invoke(this,
                             new JobOperationEventArgs {
         Job = jobInfo
     });
 }
Exemplo n.º 2
0
        private async Task RunAction()
        {
            if (_inProgress)
            {
                ExecutionOmitted?.Invoke(this, new EventArgs());
                return;
            }

            try
            {
                _inProgress = true;
                await _action();
            }
            catch (Exception e)
            {
                ExecutionFailed?.Invoke(this, new TaskExecutionFailedEventArgs(e));
            }
            finally
            {
                _inProgress = false;
            }
        }
Exemplo n.º 3
0
 protected void OnExecutionFailed(IMethodCallMessage methodCallMessage, Exception ex)
 {
     ExecutionFailed?.Invoke(this, new ExecutionFailedEventArgs(methodCallMessage, ex));
 }