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());
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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()));
 }
Ejemplo n.º 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);
     }
 }