public static IResourcePipelineBuilder <TResource> Task <TResource>(this IResourcePipelineBuilder <TResource> builder, Action action) where TResource : IResource { if (action == null) { throw new ArgumentNullException(nameof(action)); } if (builder == null) { throw new ArgumentNullException(nameof(builder)); } return(builder.Task(next => { action(); return ctx => next(ctx); })); }
public static IResourcePipelineBuilder <TResource> Task <TResource, TPipelineTask>(this IResourcePipelineBuilder <TResource> builder) where TResource : IResource where TPipelineTask : IPipelineTask <TResource> => builder.Task(typeof(TPipelineTask));