/// <summary>
        /// Finishes configuring a projection creation handler for projections which do not exist yet
        /// for events of type <typeparamref name="TEvent"/>
        /// for projections of type <typeparamref name="TProjection"/> using context of type <typeparamref name="TContext"/>.
        /// </summary>
        /// <param name="eventActionBuilder">
        /// The <see cref="ICreateIfDoesNotExistEventActionBuilder{TEvent,TProjection,TContext}"/>.
        /// </param>
        /// <param name="projector">
        /// The asynchronous delegate that initializes the created projection.
        /// Takes the projection and the event as the parameters.
        /// </param>
        public static void Using <TEvent, TProjection, TContext>(
            this ICreateIfDoesNotExistEventActionBuilder <TEvent, TProjection, TContext> eventActionBuilder,
            Func <TProjection, TEvent, Task> projector)
        {
            if (eventActionBuilder == null)
            {
                throw new ArgumentNullException(nameof(eventActionBuilder));
            }

            if (projector == null)
            {
                throw new ArgumentNullException(nameof(projector));
            }

            eventActionBuilder.Using((projection, anEvent, context) => projector(projection, anEvent));
        }
        /// <summary>
        /// Finishes configuring a projection creation handler for projections which do not exist yet
        /// for events of type <typeparamref name="TEvent"/>
        /// for projections of type <typeparamref name="TProjection"/> using context of type <typeparamref name="TContext"/>.
        /// </summary>
        /// <param name="eventActionBuilder">
        /// The <see cref="ICreateIfDoesNotExistEventActionBuilder{TEvent,TProjection,TContext}"/>.
        /// </param>
        /// <param name="projector">
        /// The synchronous delegate that initializes the created projection.
        /// Takes the projection and the event as the parameters.
        /// </param>
        public static void Using <TEvent, TProjection, TContext>(
            this ICreateIfDoesNotExistEventActionBuilder <TEvent, TProjection, TContext> eventActionBuilder,
            Action <TProjection, TEvent> projector)
        {
            if (eventActionBuilder == null)
            {
                throw new ArgumentNullException(nameof(eventActionBuilder));
            }

            if (projector == null)
            {
                throw new ArgumentNullException(nameof(projector));
            }

            eventActionBuilder.Using((projection, anEvent, context) =>
            {
                projector(projection, anEvent);
                return(SpecializedTasks.FalseTask);
            });
        }