/// <summary>
        /// Invokes <see cref="OnCompletionRunAsync"/>.
        /// </summary>
        /// <param name="args">The <see cref="ExecutorCompletionRunArgs"/>.</param>
        internal async Task CompletionRunAsync(ExecutorCompletionRunArgs args)
        {
            try
            {
                await OnCompletionRunAsync(args);

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

                throw;
            }
        }
 /// <summary>
 /// Runs after all the items for the collection have run to enable any final completion activities to be performed.
 /// </summary>
 /// <param name="args">The <see cref="ExecutorCompletionRunArgs"/>.</param>
 protected virtual Task OnCompletionRunAsync(ExecutorCompletionRunArgs args)
 {
     return(Task.CompletedTask);
 }