Esempio n. 1
0
        public Rule Update(RuleAction newAction)
        {
            Guard.NotNull(newAction);

            if (newAction.GetType() != action.GetType())
            {
                throw new ArgumentException("New action has another type.", nameof(newAction));
            }

            newAction.Freeze();

            return(Clone(clone =>
            {
                clone.action = newAction;
            }));
        }
Esempio n. 2
0
 private void SetAction(RuleAction newAction)
 {
     action = newAction;
     action.Freeze();
 }