public static void Using <TEvent, TProjection, TContext>( this ICreateAction <TEvent, TProjection, TContext> action, Func <TProjection, TEvent, Task> projector) { if (action == null) { throw new ArgumentNullException(nameof(action)); } if (projector == null) { throw new ArgumentNullException(nameof(projector)); } action.Using((projection, anEvent, context) => projector(projection, anEvent)); }
public static void Using <TEvent, TProjection, TContext>( this ICreateAction <TEvent, TProjection, TContext> action, Action <TProjection, TEvent> projector) { if (action == null) { throw new ArgumentNullException(nameof(action)); } if (projector == null) { throw new ArgumentNullException(nameof(projector)); } action.Using((projection, anEvent, context) => { projector(projection, anEvent); return(TaskConstants.FalseTask); }); }