The docs have this example:
Func<long, bool> isZero = Lambda<Func<long, bool>>(fun =>
{
var arg = fun[0];
If((Expression)(arg.AsDynamic() != 0L))
.Then(() => Return(true))
.Else(() => Return(false))
.End();
}).Compile();
Is this doing what it's supposed to be doing? Trying this locally, .Then(() => ...) binds to ConditionalBuilder.Then(Expression), not CodeGenerator.Then(ConditionalBuilder, Action). This also makes the API a bit unwieldy in general, since I have to write code with casts like this:
If(...)
.Then((Action)(() =>
{
// ...
}))
.End()
Not sure if I'm misunderstanding something or if this is unintended. 🤔
The docs have this example:
Is this doing what it's supposed to be doing? Trying this locally,
.Then(() => ...)binds toConditionalBuilder.Then(Expression), notCodeGenerator.Then(ConditionalBuilder, Action). This also makes the API a bit unwieldy in general, since I have to write code with casts like this:Not sure if I'm misunderstanding something or if this is unintended. 🤔