private static void OnEventsOnFactUpdatingEvent(object sa, WorkingMemoryEventArgs args)
 {
     var sb = new StringBuilder();
     sb.Append("fact updating: ");
     sb.AppendFormat("{0}:{1}",args.Fact.Type.Name, args.Fact.Value);
     Debug.WriteLine(sb.ToString());
 }
Esempio n. 2
0
        public void RaiseFactRetracted(ISession session, Fact fact)
        {
            var handler = FactRetractedEvent;

            if (handler != null)
            {
                var @event = new WorkingMemoryEventArgs(fact);
                handler(session, @event);
            }
        }
Esempio n. 3
0
        public void RaiseFactUpdating(ISession session, Fact fact)
        {
            var handler = FactUpdatingEvent;

            if (handler != null)
            {
                var @event = new WorkingMemoryEventArgs(fact);
                handler(session, @event);
            }
            _parent?.RaiseFactUpdating(session, fact);
        }
Esempio n. 4
0
        public void RaiseFactInserted(ISession session, IFact fact)
        {
            var handler = FactInsertedEvent;

            if (handler != null)
            {
                var @event = new WorkingMemoryEventArgs(fact);
                handler(session, @event);
            }
            _parent?.RaiseFactInserted(session, fact);
        }
Esempio n. 5
0
        public void RaiseFactUpdated(ISession session, Fact fact)
        {
            var handler = FactUpdatedEvent;

            if (handler != null)
            {
                var @event = new WorkingMemoryEventArgs(fact);
                handler(session, @event);
            }
            if (_parent != null)
            {
                _parent.RaiseFactUpdated(session, fact);
            }
        }
 static void OnFactInsertedEvent(object sender, WorkingMemoryEventArgs args)
 {
     Debug.WriteLine("fact inserted:" + args.Fact.Type.Name);
 }
 private static void OnEventsOnFactUpdatedEvent(object sa, WorkingMemoryEventArgs args)
 {
     Debug.WriteLine("fact updated");
 }
Esempio n. 8
0
 private static void EventProviderOnFactRetractingEvent(object sender, WorkingMemoryEventArgs e)
 {
     Console.WriteLine("Retract: {0}", e.Fact.Value);
 }
Esempio n. 9
0
 public void RaiseFactRetracted(ISession session, Fact fact)
 {
     var handler = FactRetractedEvent;
     if (handler != null)
     {
         var @event = new WorkingMemoryEventArgs(fact);
         handler(session, @event);
     }
     if (_parent != null)
     {
         _parent.RaiseFactRetracted(session, fact);
     }
 }