public override void OnInit(CRule rule, XmlData data) { base.OnInit(rule, data); Attributes = data.Attributes; RuleRoutes = new Dictionary <string, RuleRoute>(); if (!IsMultiRoute) { RuleRoute route = new RuleRoute(); route.OnInit(ERuleKey.RouteSingle, this, data); RuleRoutes.Add(ERuleKey.RouteSingle, route); } else { foreach (var exeData in data.Childs) { string routeName = exeData.Node; RuleRoute route = new RuleRoute(); route.OnInit(routeName, this, exeData); RuleRoutes.Add(routeName, route); } } }
public virtual void OnInit(CRule rule, XmlData data) { mRule = rule; BranchID = ToolParser.IntParse(data.GetAttribute(ERuleKey.ID)); }