/// <summary>
        /// Registers a <see cref="ValidationPipeline"/>.
        /// </summary>
        /// <param name="options">The mediator registration options</param>
        /// <param name="config">Configures the pipeline options</param>
        /// <param name="lifetime">The pipeline lifetime</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException"></exception>
        public static MediatorOptions AddPipelineForValidation(
            this MediatorOptions options, Action <ValidationPipelineOptions> config = null, ServiceLifetime lifetime = ServiceLifetime.Transient)
        {
            if (config != null)
            {
                options.Services.Configure(config);
            }

            options.AddPipeline <ValidationPipeline>(lifetime);

            return(options);
        }
        /// <summary>
        /// Registers a <see cref="EFCoreTransactionPipeline{TDbContext}"/>.
        /// </summary>
        /// <param name="options">The mediator registration options</param>
        /// <param name="config">Configures the pipeline options</param>
        /// <param name="lifetime">The pipeline lifetime</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException"></exception>
        public static MediatorOptions AddPipelineForEFCoreTransaction <TDbContext>(
            this MediatorOptions options, Action <EFCoreTransactionPipelineOptions> config = null, ServiceLifetime lifetime = ServiceLifetime.Transient)
            where TDbContext : DbContext
        {
            if (config != null)
            {
                options.Services.Configure(config);
            }

            options.AddPipeline <EFCoreTransactionPipeline <TDbContext> >(lifetime);

            return(options);
        }