Ejemplo n.º 1
0
 protected void HandleExpectedNewFact(NewFactEventArgs nfea)
 {
     if ((deductionsToCheck != null)
       		&& (Array.IndexOf(deductionsToCheck, nfea.Fact.ToString())<0)) {
       			wrongDeduction = true;
             Console.WriteLine("* Wrongly Deducted: {0} @ {1} !!! !!!", nfea.Fact, deductionChecker);
       		}
       	deductionChecker++;
 }
Ejemplo n.º 2
0
 protected void ShowAllNewFacts(NewFactEventArgs nfea)
 {
     deducted++;
     Console.WriteLine("NxBRE Deducted: {0}", nfea.Fact);
 }
Ejemplo n.º 3
0
		private void ModifyFactHandler(NewFactEventArgs nfea) {
			NewWorkingBRE();
			working_bre.RuleContext.SetObject(MODIFIEDFACT_ID, nfea.Fact);
			working_bre.RuleContext.SetObject(MODIFIEDOTHERFACT_ID, nfea.OtherFact);
			working_bre.Process(ON_MODIFY_FACT);			
		}
Ejemplo n.º 4
0
		private void DeleteFactHandler(NewFactEventArgs nfea) {
			NewWorkingBRE();
			working_bre.RuleContext.SetObject(DELETEDFACT_ID, nfea.Fact);
			working_bre.Process(ON_DELETE_FACT);			
		}
Ejemplo n.º 5
0
		private void NewFactHandler(NewFactEventArgs nfea) {
			NewWorkingBRE();
			working_bre.RuleContext.SetObject(NEWFACT_ID, nfea.Fact);
			working_bre.Process(ON_NEW_FACT);			
		}
Ejemplo n.º 6
0
 private void HandleNewFactEvent(NewFactEventArgs nfea)
 {
     Console.WriteLine("* Deducted: {0}", nfea.Fact);
 }
Ejemplo n.º 7
0
 private void NewFactHandler(NewFactEventArgs nfea)
 {
     if (nfea.Fact.Type == "Fraudulent Customer")
         ((Customer)nfea.Fact.GetPredicateValue(0)).Fraudulent = true;
 }
Ejemplo n.º 8
0
 protected void HandleOrderedNewFact(NewFactEventArgs nfea)
 {
     if ((deductionsToCheck != null)
       		&& (deductionsToCheck[deductionChecker] != nfea.Fact.ToString())) {
       			wrongDeduction = true;
             Console.WriteLine("* Wrongly Deducted: {0} @ {1}, Expected: {2}", nfea.Fact, deductionChecker, deductionsToCheck[deductionChecker]);
       		}
       	deductionChecker++;
 }
Ejemplo n.º 9
0
 protected void HandleNewFactEvent(NewFactEventArgs nfea)
 {
     if (logThreshold == LogEventImpl.DEBUG) Console.WriteLine("+ Deducted: {0}", nfea.Fact);
       	deducted++;
 }
Ejemplo n.º 10
0
 protected void HandleModifiedFactEvent(NewFactEventArgs nfea)
 {
     if (logThreshold == LogEventImpl.DEBUG) Console.WriteLine("* Modified : {0}->{1}", nfea.Fact, nfea.OtherFact);
       	modified++;
 }