22 lines
618 B
C#
22 lines
618 B
C#
namespace Bts.BooleanExpressions.Arguments;
|
|
|
|
class Argument : IArgument {
|
|
readonly Func<IDictionary<string, object?>, object?> getValue;
|
|
|
|
public Argument(Func<IDictionary<string, object?>, object?> getValue) =>
|
|
this.getValue = getValue;
|
|
|
|
public object? GetValue(IDictionary<string, object?> env) =>
|
|
getValue(env);
|
|
}
|
|
|
|
class Argument<T> : IArgument<T> {
|
|
readonly Func<IDictionary<string, object?>, T> getValue;
|
|
|
|
public Argument(Func<IDictionary<string, object?>, T> getValue) =>
|
|
this.getValue = getValue;
|
|
|
|
public T GetValue(IDictionary<string, object?> env) =>
|
|
getValue(env);
|
|
}
|