Exemple #1
0
 public override Predicate Negate()
 {
     ReasoningPredicate pNegate = null;
     if (Operator == "or")
         pNegate = new ReasoningPredicate("and");
     if (Operator == "and")
         pNegate = new ReasoningPredicate("or");
     if (Operator == "oneof")
         throw new NotImplementedException("Not handling oneof for now");
     if (Operator == "not")
         return Predicates[0];
     foreach (Predicate fOperand in Predicates)
         pNegate.Predicates.Add(fOperand.Negate());
     return pNegate;
 }
 public override Predicate Negate()
 {
     ReasoningPredicate pNegate = null;
     if (Operator == "or")
         pNegate = new ReasoningPredicate("and");
     if (Operator == "and")
         pNegate = new ReasoningPredicate("or");
     if (Operator == "oneof")
         throw new NotImplementedException("Not handling oneof for now");
     if (Operator == "not")
         return Predicates[0];
     foreach (Predicate fOperand in Predicates)
         pNegate.Predicates.Add(fOperand.Negate());
     return pNegate;
 }