Example #1
0
 public void On(RuleEnabled @event, EnvelopeHeaders headers)
 {
     UpdateRule(@event, headers, r =>
     {
         r.RuleDef = r.RuleDef.Apply(@event);
     });
 }
        protected async Task On(RuleEnabled @event, EnvelopeHeaders headers)
        {
            await EnsureRulesLoadedAsync();

            await Collection.UpdateAsync(@event, headers, w =>
            {
                w.Rule.Apply(@event);

                inMemoryRules.GetOrAddNew(w.AppId).RemoveAll(x => x.Id == w.Id);
                inMemoryRules.GetOrAddNew(w.AppId).Add(w);
            });
        }
Example #3
0
 protected void On(RuleEnabled @event)
 {
     RuleDef = RuleDef.Enable();
 }
Example #4
0
 public static void Apply(this Rule rule, RuleEnabled @event)
 {
     rule.Enable();
 }
Example #5
0
 protected void On(RuleEnabled @event)
 {
     rule = rule.Apply(@event);
 }
Example #6
0
 public static Rule Apply(this Rule rule, RuleEnabled @event)
 {
     return(rule.Enable());
 }