Esempio n. 1
0
 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));
             }
         }
     }
 }
Esempio n. 2
0
 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));
             }
         }
     }
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 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));
         }
     }
 }
Esempio n. 5
0
 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));
         }
     }
 }
Esempio n. 6
0
 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));
         }
     }
 }
Esempio n. 7
0
 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);
         }
     }
 }
Esempio n. 8
0
 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));
         }
     }
 }
Esempio n. 9
0
 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));
         }
     }
 }
Esempio n. 10
0
 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;
 }
Esempio n. 11
0
 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);
         }
     }
 }