private static void OnEventsOnRuleFiringEvent(object sa, AgendaEventArgs args)
 {
     var sb = new StringBuilder();
     sb.Append("rule firing:");
     sb.Append(args.Rule.Name);
     sb.Append(args.Rule.Description);
     sb.AppendFormat("tags: {0}", string.Join(",",args.Rule.Tags));
     Debug.WriteLine(sb.ToString());
 }
Example #2
0
        public void RaiseRuleFired(ISession session, Activation activation)
        {
            var handler = RuleFiredEvent;

            if (handler != null)
            {
                var @event = new AgendaEventArgs(activation.Rule, activation.Tuple);
                handler(session, @event);
            }
        }
Example #3
0
        public void RaiseRuleFiring(ISession session, Activation activation)
        {
            var handler = RuleFiringEvent;

            if (handler != null)
            {
                var @event = new AgendaEventArgs(activation);
                handler(session, @event);
            }
            _parent?.RaiseRuleFiring(session, activation);
        }
Example #4
0
        public void RaiseActivationDeleted(ISession session, Activation activation)
        {
            var handler = ActivationDeletedEvent;

            if (handler != null)
            {
                var @event = new AgendaEventArgs(activation);
                handler(session, @event);
            }
            _parent?.RaiseActivationDeleted(session, activation);
        }
Example #5
0
        public void RaiseRuleFired(ISession session, IActivation activation)
        {
            var handler = RuleFiredEvent;

            if (handler != null)
            {
                var @event = new AgendaEventArgs(activation);
                handler(session, @event);
            }
            if (_parent != null)
            {
                _parent.RaiseRuleFired(session, activation);
            }
        }
Example #6
0
        public void RaiseActivationUpdated(ISession session, Activation activation)
        {
            var handler = ActivationUpdatedEvent;

            if (handler != null)
            {
                var @event = new AgendaEventArgs(activation.Rule, activation.Tuple);
                handler(session, @event);
            }
            if (_parent != null)
            {
                _parent.RaiseActivationUpdated(session, activation);
            }
        }
Example #7
0
 private void OnRuleFired(object sender, AgendaEventArgs args)
 {
     Log.InfoFormat("Rule fired. Rule={0}", args.Rule.Name);
 }
 private static void OnEventsOnRuleFiredEvent(object sa, AgendaEventArgs args)
 {
     Debug.WriteLine("rule fired:" + args.Rule.Name);
 }
 static void OnActivationDeletedEvent(object sender, AgendaEventArgs args)
 {
     Debug.WriteLine("activation deleted");
 }
 static void OnActivationCreatedEvent(object sender, AgendaEventArgs args)
 {
     Debug.WriteLine("activation created:" + args.Rule.Name);
 }
Example #11
0
 private static void EventProviderOnActivationCreatedEvent(object sender, AgendaEventArgs e)
 {
     Console.WriteLine("+A({0}): {1}", e.Rule.Name, string.Join(",", e.Facts.Select(f => f.Value).ToArray()));
 }
Example #12
0
 public void RaiseRuleFired(ISession session, Activation activation)
 {
     var handler = RuleFiredEvent;
     if (handler != null)
     {
         var @event = new AgendaEventArgs(activation.Rule, activation.Tuple);
         handler(session, @event);
     }
     if (_parent != null)
     {
         _parent.RaiseRuleFired(session, activation);
     }
 }