public static AlwaysRuleModel FromRule(AlwaysRule rule) { var model = new AlwaysRuleModel(); foreach (var activity in rule.Activities) { model.Activities.Add(ConfiguredActivityModel.FromConfiguredActivity(activity)); } return model; }
public static AlwaysRuleModel FromRule(AlwaysRule rule) { var model = new AlwaysRuleModel(); foreach (var activity in rule.Activities) { model.Activities.Add(ConfiguredActivityModel.FromConfiguredActivity(activity)); } return(model); }
public static RuleModelBase FromRule(Rule rule) { if (rule is AlwaysRule) { return(AlwaysRuleModel.FromRule(rule as AlwaysRule)); } if (rule is IfElseRule) { return(IfElseRuleModel.FromRule(rule as IfElseRule)); } if (rule is SwitchCaseRule) { return(SwitchCaseRuleModel.FromRule(rule as SwitchCaseRule)); } throw new NotSupportedException(); }