Benfoster Flo Versions Save

Lightweight library for composing chain of responsibility pipelines

0.3.0

5 years ago

This release includes support for asynchronous When predicates, for example:

await Pipeline.Build<TestContext>(cfg =>
    cfg
        .When(async ctx => await ValidateAccessAsync(ctx["id"]), builder =>
            builder.Add((ctx, next) =>
            {
                using (LogContext.PushProperty("id", ctx["id"]))
                {
                    return next.Invoke(ctx);
                }
            })
        )
        .Final(async (ctx) =>
        {
            await Execute(ctx);
            return ctx;
        })
)
.Invoke(new TestContext());

Thanks to @andreas-antoniou-cko for contributing this feature.

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago