public Package(XPathNavigator xPathNavigator) : base(xPathNavigator) { this.m_Attributes = new Interface.WATFDictionary<string, string>(); XPathNavigator copyXPathNavigator = xPathNavigator.CreateNavigator(); if(copyXPathNavigator.MoveToFirstAttribute()) { if(copyXPathNavigator.Name.Equals(GlobalDefine.Keyword.Executive.Path)) { this.m_Attributes.Add(copyXPathNavigator.Name, Path.Value(xPathNavigator)); } else if(copyXPathNavigator.Name.Equals(GlobalDefine.Keyword.Executive.Prefix)) { this.m_Attributes.Add(copyXPathNavigator.Name, Prefix.Value(xPathNavigator)); } while (copyXPathNavigator.MoveToNextAttribute()) { if (copyXPathNavigator.Name.Equals(GlobalDefine.Keyword.Executive.Path)) { this.m_Attributes.Add(copyXPathNavigator.Name, Path.Value(xPathNavigator)); } else if (copyXPathNavigator.Name.Equals(GlobalDefine.Keyword.Executive.Prefix)) { this.m_Attributes.Add(copyXPathNavigator.Name, Prefix.Value(xPathNavigator)); } } } }
public Load(XPathNavigator xPathNavigator) : base(xPathNavigator) { this.m_Attributes = new WATF.Compiler.Interface.WATFDictionary<string, string>(); XPathNavigator copyXPathNavigator = xPathNavigator.CreateNavigator(); if (copyXPathNavigator.MoveToFirstAttribute()) { if (copyXPathNavigator.Name.Equals(GlobalDefine.Keyword.ConfigFile.Name)) { this.m_Attributes.Add(GlobalDefine.Keyword.ConfigFile.Name, Name.Value(xPathNavigator)); } else if (copyXPathNavigator.Name.Equals(GlobalDefine.Keyword.ConfigFile.Path)) { this.m_Attributes.Add(GlobalDefine.Keyword.ConfigFile.Path, Path.Value(xPathNavigator)); } while (copyXPathNavigator.MoveToNextAttribute()) { if (copyXPathNavigator.Name.Equals(GlobalDefine.Keyword.ConfigFile.Name)) { this.m_Attributes.Add(GlobalDefine.Keyword.ConfigFile.Name, Name.Value(xPathNavigator)); } else if (copyXPathNavigator.Name.Equals(GlobalDefine.Keyword.ConfigFile.Path)) { this.m_Attributes.Add(GlobalDefine.Keyword.ConfigFile.Path, Path.Value(xPathNavigator)); } } } }
public object Run(object value = null) { this.m_ExeFiles = (Interface.WATFDictionary<string, Executive.Executive>)this.m_ConfigFile.Run(); foreach (KeyValuePair<String, Executive.Executive> ExecutiveNode in this.m_ExeFiles) { if (ExecutiveNode.Key.Equals(GlobalDefine.Keyword.Executive.Root)) { ExecutiveNode.Value.Run(); } } return true; }
public Import(XPathNavigator xPathNavigator) : base(xPathNavigator) { this.m_ImportChilds = new Interface.WATFDictionary<String, WATF.Compiler.Interface.WATFPathNavigator>(); XPathNodeIterator xPathNodeIterator = xPathNavigator.CreateNavigator().SelectChildren(XPathNodeType.Element); while (xPathNodeIterator.MoveNext()) { if (xPathNodeIterator.Current.LocalName.Equals(GlobalDefine.Keyword.Executive.Package)) { m_ImportChilds.Add(xPathNodeIterator.Current.LocalName, new Package.Package(xPathNodeIterator.Current)); } } }
public Test(XPathNavigator xPathNavigator) : base(xPathNavigator) { m_TestChilds = new Interface.WATFDictionary<string, Interface.WATFPathNavigator>(); XPathNodeIterator xPathNodeIterator = xPathNavigator.CreateNavigator().SelectChildren(XPathNodeType.Element); while (xPathNodeIterator.MoveNext()) { if (xPathNodeIterator.Current.LocalName.Equals(GlobalDefine.Keyword.Executive.Step)) { m_TestChilds.Add(GlobalDefine.Keyword.Executive.Step, new Step.Step(xPathNodeIterator.Current)); } } }
private ConfigFile(XPathNavigator xPathNavigator) : base(xPathNavigator) { m_ConfigFileNodes = new Interface.WATFDictionary<string, Interface.WATFPathNavigator>(); XPathNodeIterator xPathNodeIterator = xPathNavigator.CreateNavigator().SelectChildren(XPathNodeType.Element); while (xPathNodeIterator.MoveNext()) { if(xPathNodeIterator.Current.LocalName.Equals(GlobalDefine.Keyword.ConfigFile.Load)) { m_ConfigFileNodes.Add(GlobalDefine.Keyword.ConfigFile.Load, new Load.Load(xPathNodeIterator.Current)); } } }
public Var(XPathNavigator xPathNavigator) : base(xPathNavigator) { this.m_Attributes = new Interface.WATFDictionary<string, string>(); XPathNavigator copyXPathNavigator = xPathNavigator.CreateNavigator(); if (copyXPathNavigator.MoveToFirstAttribute()) { this.m_Attributes.Add(copyXPathNavigator.Name, copyXPathNavigator.Value); while (copyXPathNavigator.MoveToNextAttribute()) { this.m_Attributes.Add(copyXPathNavigator.Name, copyXPathNavigator.Value); } } }
public Executive(XPathNavigator xPathNavigator) : base(xPathNavigator) { XPathNodeIterator xPathNodeIterator = xPathNavigator.CreateNavigator().SelectChildren(XPathNodeType.Element); m_ExeChilds = new Interface.WATFDictionary<string, Interface.WATFPathNavigator>(); while (xPathNodeIterator.MoveNext()) { if (xPathNodeIterator.Current.LocalName.Equals(GlobalDefine.Keyword.Executive.Import)) { m_ExeChilds.Add(xPathNodeIterator.Current.LocalName, new Import.Import(xPathNodeIterator.Current)); } else if (xPathNodeIterator.Current.LocalName.Equals(GlobalDefine.Keyword.Executive.Test)) { m_ExeChilds.Add(xPathNodeIterator.Current.LocalName, new Test.Test(xPathNodeIterator.Current)); } } }
public Step(XPathNavigator xPathNavigator) : base(xPathNavigator) { m_StepChilds = new Interface.WATFDictionary<string, Interface.WATFPathNavigator>(); XPathNodeIterator xPathNodeIterator = xPathNavigator.CreateNavigator().SelectChildren(XPathNodeType.Element); while (xPathNodeIterator.MoveNext()) { if (xPathNodeIterator.Current.LocalName.Equals(GlobalDefine.Keyword.Executive.Var)) { m_StepChilds.Add(GlobalDefine.Keyword.Executive.Var, new Var.Var(xPathNodeIterator.Current)); } else if (xPathNodeIterator.Current.LocalName.Equals(GlobalDefine.Keyword.Executive.Action)) { m_StepChilds.Add(GlobalDefine.Keyword.Executive.Action, new Action.Action(xPathNodeIterator.Current)); } } }
public override object Run(object value = null) { //exe load xmlnode //load executive file Interface.WATFDictionary<String, Executive.Executive> ExecutiveNodes = new Interface.WATFDictionary<string, Executive.Executive>(); foreach (KeyValuePair<String, Interface.WATFPathNavigator> ConfigFileNode in this.m_ConfigFileNodes) { if (ConfigFileNode.Key.Equals(GlobalDefine.Keyword.ConfigFile.Load)) { XPathDocument xPathDocument = new XPathDocument((string)((Load.Load)ConfigFileNode.Value).Run()); XPathNodeIterator xPathNodeIterator = xPathDocument.CreateNavigator().Select("/" + GlobalDefine.Keyword.Executive.Root); if (xPathNodeIterator.MoveNext()) { if (xPathNodeIterator.Current.LocalName.Equals(GlobalDefine.Keyword.Executive.Root)) { ExecutiveNodes.Add(GlobalDefine.Keyword.Executive.Root, new Executive.Executive(xPathNodeIterator.Current)); } } } } return ExecutiveNodes; }
public Action(XPathNavigator xPathNavigator) : base(xPathNavigator) { m_ActionChilds = new Interface.WATFDictionary<string, Interface.WATFPathNavigator>(); XPathNodeIterator xPathNodeIterator = xPathNavigator.CreateNavigator().SelectChildren(XPathNodeType.Element); while (xPathNodeIterator.MoveNext()) { if (xPathNodeIterator.Current.LocalName.Equals(GlobalDefine.Keyword.Executive.Action)) { m_ActionChilds.Add(GlobalDefine.Keyword.Executive.Action, new Action(xPathNodeIterator.Current)); } } this.m_Attributes = new Interface.WATFDictionary<string, string>(); XPathNavigator copyXPathNavigator = xPathNavigator.CreateNavigator(); if (copyXPathNavigator.MoveToFirstAttribute()) { this.m_Attributes.Add(copyXPathNavigator.Name, copyXPathNavigator.Value); while (copyXPathNavigator.MoveToNextAttribute()) { this.m_Attributes.Add(copyXPathNavigator.Name,copyXPathNavigator.Value); } } }