public static CompareNode <T, TProperty> Compare <T, TProperty>(this RuntimeConfigurator configurator, Comparator <TProperty, TProperty> comparator, TProperty value) where T : class { Value <TProperty> rightValue = Conditional.Constant(value); TokenValueFactory <T, TProperty> tokenValue = Conditional.Property <T, TProperty>(); return(configurator.CreateNode(id => new CompareNode <T, TProperty>(id, tokenValue, comparator, rightValue))); }
public static CompareNode <T, TProperty> LessThanOrEqual <T, TProperty>(this RuntimeConfigurator configurator, TProperty value) where T : class where TProperty : IComparable <TProperty> { Value <TProperty> rightValue = Conditional.Constant(value); TokenValueFactory <T, TProperty> tokenValue = Conditional.Property <T, TProperty>(); var comparator = new LessThanOrEqualValueComparator <TProperty>(); return(configurator.CreateNode(id => new CompareNode <T, TProperty>(id, tokenValue, comparator, rightValue))); }