/// <summary> /// Runs the collection work. /// </summary> /// <param name="args">The <see cref="ExecutorCollectionRunArgs{TArgs}"/>.</param> /// <returns>The collection.</returns> internal async Task <TColl> RunCollectionAsync(ExecutorCollectionRunArgs args) { try { var coll = await OnRunCollectionAsync(args).ConfigureAwait(false); OnPerRunType(args); return(coll); } catch (Exception ex) { if (!args.HasException) { args.SetException(ex); OnPerRunType(args); } throw; } }