public conditionalPart(codePart truePart, string condition, codePart falsePart = null) { this.truePart = truePart; if (falsePart != null) { this.falsePart = falsePart; elsestate = true; } this.condition = condition; }
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); }
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; } }
public loopPart(codePart codeinloop, string condition) { this.codeinloop = codeinloop; this.condition = condition; }