/// <summary> /// Parse() - Parse the Modifier info /// </summary> public string Parse() { ParserSplit ps = new ParserSplit(); Prefix = ps.Split(InfoToParse, "["); Command = ps.Split(ps.After, "|"); TrueOutput = ps.Split(ps.After, ":"); FalseOutput = ps.Split(ps.After, "]"); Suffix = ps.After; string result = (Condition) ? TrueOutput : FalseOutput; return(Prefix + result + Suffix); }
/// <summary> /// Parse() - Parses a Command Line, such as "If" or "Each". /// </summary> public void Parse() { ParserSplit ps = new ParserSplit(); Prefix = ps.Split(InfoToParse, "{{"); Command = ps.Split(ps.After, "|"); // "SectionIf" has only Param1 if (Command.ToLower() == "sectionif") { Param1 = ps.Split(ps.After, "}}"); return; } Param1 = ps.Split(ps.After, "|"); Param2 = ps.Split(ps.After, "}}"); Suffix = ps.After; }