示例#1
0
        /// <summary>
        /// Invokes the <see cref="OnItemRunAsync(ExecutorItemRunArgs{TItem})"/>.
        /// </summary>
        /// <param name="args">The <see cref="ExecutorItemRunArgs{TItem}"/>.</param>
        internal async Task RunItemAsync(ExecutorItemRunArgs <TItem> args)
        {
            try
            {
                await OnItemRunAsync(args);

                OnPerRunType(args);
            }
            catch (Exception ex)
            {
                if (!args.HasException)
                {
                    args.SetException(ex);
                    OnPerRunType(args);
                }

                throw;
            }
        }
示例#2
0
 /// <summary>
 /// Runs the <b>item</b> unit of work.
 /// </summary>
 /// <param name="args">The <see cref="ExecutorItemRunArgs{TItem}"/>.</param>
 protected abstract Task OnItemRunAsync(ExecutorItemRunArgs <TItem> args);