Example #1
0
 public void On(RuleDisabled @event, EnvelopeHeaders headers)
 {
     UpdateRule(@event, headers, r =>
     {
         r.RuleDef = r.RuleDef.Apply(@event);
     });
 }
        protected async Task On(RuleDisabled @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(RuleDisabled @event)
 {
     RuleDef = RuleDef.Disable();
 }
Example #4
0
 public static void Apply(this Rule rule, RuleDisabled @event)
 {
     rule.Disable();
 }
Example #5
0
 protected void On(RuleDisabled @event)
 {
     rule = rule.Apply(@event);
 }
Example #6
0
 public static Rule Apply(this Rule rule, RuleDisabled @event)
 {
     return(rule.Disable());
 }