internal static Tk55Parser Create(FunctionItem function, SubFuncClass subFunc) { if (string.IsNullOrEmpty(subFunc.Content)) { if (function.Parser == null) { return(null); } IPageStyle style = subFunc.NameId.Value <PageStyleClass>(); return(new Tk55Parser(function.Parser.Parser, function.Parser.ModuleCreator, style, function.Parser.Source)); } else { return(Parse(subFunc.Content)); } }
public void AddSubFunctions(IEnumerable <DataRow> rows) { fSubKeys = new HashSet <SubFunctionKey>(); fSubFunction = new Dictionary <string, SubFuncClass>(); if (Parser != null) { fSubKeys.Add(new SubFunctionKey(Parser.Style, Parser.Source)); } foreach (DataRow row in rows) { SubFuncClass subFunc = new SubFuncClass(); subFunc.ReadFromDataRow(row); if (subFunc.NameId == "_Empty") { continue; } var key = subFunc.CreateParser(this); if (key != null) { fSubKeys.Add(key); } fSubFunction.Add(subFunc.NameId, subFunc); } }