Table of Contents

Method Create

Namespace
RuleWright.Extensions.Functions
Assembly
RuleWright.Extensions.Functions.dll

Create(Func<DateTime>?)

Creates the built-in functions with a custom clock for the date-relativity predicates (IsInPast, IsInFuture) — useful for deterministic tests.

public static IReadOnlyList<IRuleFunction> Create(Func<DateTime>? clock = null)

Parameters

clock Func<DateTime>

Supplies "now"; defaults to UtcNow when null.

Returns

IReadOnlyList<IRuleFunction>