示例#1
0
 public conditionalPart(codePart truePart, string condition, codePart falsePart = null)
 {
     this.truePart = truePart;
     if (falsePart != null)
     {
         this.falsePart = falsePart;
         elsestate      = true;
     }
     this.condition = condition;
 }
示例#2
0
        public loopPart(string xml)
        {
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(xml);

            if (doc.FirstChild.Name != "loop")
            {
                throw new Exception("XML이 형식에 맞지 않습니다.");
            }
            condition  = doc.FirstChild.Attributes["con"].Value;
            codeinloop = new codePart(doc.FirstChild.InnerXml);
        }
示例#3
0
        public conditionalPart(string xml)
        {
            XmlDocument xmlcode = new XmlDocument();

            xmlcode.LoadXml(xml);
            if (xmlcode.Attributes["else"].Value == "false")
            {
                elsestate = false;
                truePart  = new codePart(xmlcode.FirstChild.OuterXml);
                condition = xmlcode.Attributes["con"].Value;
            }
            else
            {
                elsestate = false;
                truePart  = new codePart(xmlcode.FirstChild.OuterXml);
                falsePart = new codePart(xmlcode.LastChild.OuterXml);
                condition = xmlcode.Attributes["con"].Value;
            }
        }
示例#4
0
 public loopPart(codePart codeinloop, string condition)
 {
     this.codeinloop = codeinloop;
     this.condition  = condition;
 }