public static void Using <TEvent, TProjection, TContext>( this IUpsertActionBuilder <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)); }
public static void Using <TEvent, TProjection, TContext>( this IUpsertActionBuilder <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(TaskConstants.FalseTask); }); }