public override Rule ToRule(EventSlot slot) { var rule = new AlwaysRule(); foreach (var activityModel in Activities) { rule.Activities.Add(activityModel.ToConfiguredActivity()); } return rule; }
public static AlwaysRuleModel FromRule(AlwaysRule rule) { var model = new AlwaysRuleModel(); foreach (var activity in rule.Activities) { model.Activities.Add(ConfiguredActivityModel.FromConfiguredActivity(activity)); } return model; }