private static void GetPassActions(PassActions list, XmlNode parentNode) { foreach (XmlNode actionNode in parentNode.ChildNodes) { var action = new PassAction { Name = Util.GetNodeAttributeValue(actionNode, "name"), Type = StringToPassItemType(actionNode.Name), Exclude = Util.GetNodeAttributeValue(actionNode, "exclude") }; if (action.Type == PassActionType.Scan) { GetPassActions(action.Actions, actionNode); } list.Add(action); } }
private static void GetPassActions(PassActions list, XmlNode parentNode) { foreach (XmlNode actionNode in parentNode.ChildNodes) { var action = new PassAction { Name = Util.GetNodeAttributeValue(actionNode, "name"), Type = StringToPassItemType(actionNode.Name), Exclude = Util.GetNodeAttributeValue(actionNode, "exclude") }; if (action.Type == PassActionType.Scan) GetPassActions(action.Actions, actionNode); list.Add(action); } }