예제 #1
0
        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); }));
        }
예제 #2
0
 public static IResourcePipelineBuilder <TResource> Task <TResource, TPipelineTask>(this IResourcePipelineBuilder <TResource> builder)
     where TResource : IResource
     where TPipelineTask : IPipelineTask <TResource>
 => builder.Task(typeof(TPipelineTask));