public List <Rule> InternRuleList() { if (RuleList != null) { return(RuleList.Select(x => SavedRule.Intern(x)).ToList()); } else { return(new List <Rule>()); } }
public static SavedRule Extern(Rule x) { var y = new SavedRule(); if (x.TitlePattern != null) { y.TitlePattern = x.TitlePattern.ToString(); } if (x.ClassPattern != null) { y.ClassPattern = x.ClassPattern.ToString(); } y.Action = x.Action; return(y); }
public static Rule Intern(SavedRule x) { return(new Rule(x.TitlePattern, x.ClassPattern, x.Action)); }
public void ExternRuleList(List <Rule> list) { RuleList = list.Select(x => SavedRule.Extern(x)).ToList(); }