public async Task <AsyncActionExecutionResult> TryExecuteAsync(Func <Task> code)
        {
            AsyncActionExecutionResult result;

            try
            {
                await code.Invoke();

                result = AsyncActionExecutionResult.SuccessResult(executedBy: this, executedCode: code);
            }
            catch (Exception ex)
            {
                this.HandleException(ex);
                result = AsyncActionExecutionResult.FailedResult(executedBy: this, executedCode: code, exception: ex);
            }

            this.OnResult(result);
            return(result);
        }