private static IEnumerable <DataRule> ParseRuleElement(XElement ruleElement) { foreach (XElement ruleAction in ruleElement.Elements()) { DataRule feature = new DataRule(); feature.ActionType = ruleAction.Name.LocalName; // we can be any one of many types of rules: dialogbox, assignment, query, submit, switch view // we could parse further if that turns out to be interesting yield return(feature); } }
private static IEnumerable<DataRule> ParseRuleElement(XElement ruleElement) { foreach (XElement ruleAction in ruleElement.Elements()) { DataRule feature = new DataRule(); feature.ActionType = ruleAction.Name.LocalName; // we can be any one of many types of rules: dialogbox, assignment, query, submit, switch view // we could parse further if that turns out to be interesting yield return feature; } }