Ejemplo n.º 1
0
        public bool Satisfies(DateCmpExpr rule, LiteralExpr <Date> test)
        => (rule.Kind == TimeMarker.Before && test.Value < rule.Param1.Value) ||
        (rule.Kind == TimeMarker.After && test.Value > rule.Param1.Value) ||
        (rule.Kind == TimeMarker.Matches && test.Value == rule.Param1.Value) ||
        (rule.Kind == TimeMarker.Between && test.Value >= rule.Param1.Value && test.Value <= rule.Param2.Value.Value)

        ;
Ejemplo n.º 2
0
 public bool Satisfies(PrimalCmpExpr <T> rule, LiteralExpr <T> test)
 => (rule.Kind == PrimalCmpKind.Eq && gmath.eq(rule.Value, test.Value)) ||
 (rule.Kind == PrimalCmpKind.NEq && gmath.neq(rule.Value, test.Value)) ||
 (rule.Kind == PrimalCmpKind.Lt && gmath.lt(rule.Value, test.Value)) ||
 (rule.Kind == PrimalCmpKind.LtEq && gmath.lteq(rule.Value, test.Value)) ||
 (rule.Kind == PrimalCmpKind.Gt && gmath.gt(rule.Value, test.Value)) ||
 (rule.Kind == PrimalCmpKind.GtEq && gmath.gteq(rule.Value, test.Value))
 ;
Ejemplo n.º 3
0
 public bool Satisfies(MembershipExpr <T> rule, LiteralExpr <T> test)
 => (rule.Test == MembershipTest.IsMember && rule.Value.Contains(test.Value)) ||
 (rule.Test == MembershipTest.IsNotMember && !rule.Value.Contains(test.Value));