Пример #1
0
        /// <summary>
        /// Initialize the script engine by iterating to lua structure file
        /// </summary>
        public void Initialize()
        {
            lua = new LUA(FileIO.ReadAllText(luaPath));

            if (headerType == HeaderType.Defined)
            {
                dHeader_Template = lua.GetFieldList(FieldsType.Header);
            }

            row_Template = lua.GetFieldList("fields");
        }
Пример #2
0
        public RdbStructure(string script)
        {
            if (script == null)
            {
                throw new ArgumentNullException("script object is null!");
            }
            else if (script.Length == 0)
            {
                throw new Exception("script object is empty!");
            }

            this.script = script;

            lua = new LUA(script);

            if (lua.UseHeader)
            {
                headerCells = lua.GetFieldList("header");
            }

            rowCells = lua.GetFieldList("fields");
        }