Ejemplo n.º 1
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name);
            CSCS_SQL.CheckConnectionString(script, m_name);

            var queryStatement = Utils.GetSafeString(args, 0);
            var spArgs         = Utils.GetSafeVariable(args, 1);
            var sp             = SQLQueryFunction.GetParameters(spArgs);

            int result = 0;

            using (SqlConnection con = new SqlConnection(CSCS_SQL.ConnectionString))
            {
                using (SqlCommand cmd = new SqlCommand(queryStatement, con))
                {
                    if (sp != null)
                    {
                        cmd.Parameters.AddRange(sp.ToArray());
                    }
                    con.Open();
                    result = cmd.ExecuteNonQuery();
                }
            }
            return(new Variable(result));
        }
Ejemplo n.º 2
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name);
            CSCS_SQL.CheckConnectionString(script, m_name);

            var spName   = Utils.GetSafeString(args, 0);
            var colTypes = GetSPData(spName);
            int result   = 0;

            SqlCommand sqlcom = new SqlCommand(spName);

            sqlcom.CommandType = CommandType.StoredProcedure;
            for (int i = 0; i < colTypes.Count && i + 1 < args.Count; i++)
            {
                var arg      = args[i + 1];
                var currName = colTypes[i].Key;
                var currType = colTypes[i].Value;
                if (arg.Type == Variable.VarType.ARRAY && currType is List <KeyValuePair <string, SqlDbType> > )
                {
                    var       typeData = currType as List <KeyValuePair <string, SqlDbType> >;
                    DataTable dt       = new DataTable();
                    foreach (var entry in typeData)
                    {
                        var type = SQLQueryFunction.SqlDbTypeToType((SqlDbType)entry.Value);
                        dt.Columns.Add(new DataColumn(entry.Key, type));
                    }
                    for (int j = 0; j < arg.Tuple.Count; j++)
                    {
                        var row     = arg.Tuple[j];
                        var objs    = row.AsObject() as List <object>;
                        var dataRow = dt.NewRow();
                        if (objs != null)
                        {
                            for (int k = 0; k < objs.Count; k++)
                            {
                                dataRow[typeData[k].Key] = objs[k];
                            }
                        }
                        dt.Rows.Add(dataRow);
                    }
                    sqlcom.Parameters.AddWithValue("@" + currName, dt);
                }
                else
                {
                    sqlcom.Parameters.AddWithValue("@" + currName, arg.AsObject());
                }
            }

            using (SqlConnection con = new SqlConnection(CSCS_SQL.ConnectionString))
            {
                sqlcom.Connection = con;
                con.Open();
                result = sqlcom.ExecuteNonQuery();
            }
            return(new Variable(result));
        }
Ejemplo n.º 3
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 3, m_name);
            CSCS_SQL.CheckConnectionString(script, m_name);

            var tableName = Utils.GetSafeString(args, 0).Trim();
            var colsStr   = Utils.GetSafeString(args, 1).Trim();

            var colData = SQLQueryFunction.GetColumnData(tableName);

            if (colData == null || colData.Count == 0)
            {
                throw new ArgumentException("Error: table [" + tableName + "] doesn't exist.");
            }

            var queryStatement = "INSERT INTO " + tableName + " (" + colsStr + ") VALUES ("; //@a,@b,@c);"
            var cols           = colsStr.Split(',');

            for (int i = 0; i < cols.Length; i++)
            {
                if (string.IsNullOrWhiteSpace(cols[i]) || !colData.Keys.Contains(cols[i]))
                {
                    throw new ArgumentException("Error: column [" + cols[i] + "] doesn't exist.");
                }
                queryStatement += "@" + cols[i] + ",";
            }
            queryStatement = queryStatement.Remove(queryStatement.Length - 1) + ")";

            var  valsVariable = args[2];
            bool oneEntry     = valsVariable.Type == Variable.VarType.ARRAY && valsVariable.Tuple.Count >= 1 &&
                                valsVariable.Tuple[0].Type != Variable.VarType.ARRAY;

            using (SqlConnection con = new SqlConnection(CSCS_SQL.ConnectionString))
            {
                con.Open();
                if (oneEntry)
                {
                    using (SqlCommand cmd = new SqlCommand(queryStatement, con))
                    {
                        InsertRow(cmd, colData, valsVariable, cols);
                    }
                }
                else
                {
                    for (int i = 0; i < valsVariable.Tuple.Count; i++)
                    {
                        using (SqlCommand cmd = new SqlCommand(queryStatement, con))
                        {
                            InsertRow(cmd, colData, valsVariable.Tuple[i], cols);
                        }
                    }
                }
            }
            return(new Variable(oneEntry ? 1 : valsVariable.Tuple.Count));
        }
Ejemplo n.º 4
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name);
            CSCS_SQL.CheckConnectionString(script, m_name);
            var spName = Utils.GetSafeString(args, 0);

            return(ExecuteSP(spName, null, args));
        }
Ejemplo n.º 5
0
        public void InitStandalone()
        {
#if UNITY_EDITOR == false && UNITY_STANDALONE == false
            //ParserFunction.CleanUp();
            ParserFunction.RegisterFunction(Constants.APPEND, new AppendFunction());
            ParserFunction.RegisterFunction(Constants.APPENDLINE, new AppendLineFunction());
            ParserFunction.RegisterFunction(Constants.APPENDLINES, new AppendLinesFunction());
            ParserFunction.RegisterFunction(Constants.CALL_NATIVE, new InvokeNativeFunction());
            ParserFunction.RegisterFunction(Constants.CD, new CdFunction());
            ParserFunction.RegisterFunction(Constants.CD__, new Cd__Function());
            ParserFunction.RegisterFunction(Constants.CONNECTSRV, new ClientSocket());
            ParserFunction.RegisterFunction(Constants.COPY, new CopyFunction());
            ParserFunction.RegisterFunction(Constants.DELETE, new DeleteFunction());
            ParserFunction.RegisterFunction(Constants.DIR, new DirFunction());
            ParserFunction.RegisterFunction(Constants.EXISTS, new ExistsFunction());
            ParserFunction.RegisterFunction(Constants.EXIT, new ExitFunction());
            ParserFunction.RegisterFunction(Constants.FINDFILES, new FindfilesFunction());
            ParserFunction.RegisterFunction(Constants.FINDSTR, new FindstrFunction());
            ParserFunction.RegisterFunction(Constants.GET_NATIVE, new GetNativeFunction());
            ParserFunction.RegisterFunction(Constants.KILL, new KillFunction());
            ParserFunction.RegisterFunction(Constants.MKDIR, new MkdirFunction());
            ParserFunction.RegisterFunction(Constants.MORE, new MoreFunction());
            ParserFunction.RegisterFunction(Constants.MOVE, new MoveFunction());
            ParserFunction.RegisterFunction(Constants.PSINFO, new PsInfoFunction());
            ParserFunction.RegisterFunction(Constants.PWD, new PwdFunction());
            ParserFunction.RegisterFunction(Constants.READFILE, new ReadCSCSFileFunction());
            ParserFunction.RegisterFunction(Constants.RUN, new RunFunction());
            ParserFunction.RegisterFunction(Constants.SET_NATIVE, new SetNativeFunction());
            ParserFunction.RegisterFunction(Constants.STARTSRV, new ServerSocket());
            ParserFunction.RegisterFunction(Constants.STOPWATCH_ELAPSED, new StopWatchFunction(StopWatchFunction.Mode.ELAPSED));
            ParserFunction.RegisterFunction(Constants.STOPWATCH_START, new StopWatchFunction(StopWatchFunction.Mode.START));
            ParserFunction.RegisterFunction(Constants.STOPWATCH_STOP, new StopWatchFunction(StopWatchFunction.Mode.STOP));
            ParserFunction.RegisterFunction(Constants.TAIL, new TailFunction());
            ParserFunction.RegisterFunction(Constants.TIMESTAMP, new TimestampFunction());
            ParserFunction.RegisterFunction(Constants.WRITE, new PrintFunction(false));
            ParserFunction.RegisterFunction(Constants.WRITELINE, new WriteLineFunction());
            ParserFunction.RegisterFunction(Constants.WRITELINES, new WriteLinesFunction());
            ParserFunction.RegisterFunction(Constants.WRITE_CONSOLE, new WriteToConsole());

#if __ANDROID__ == false && __IOS__ == false
            ParserFunction.RegisterFunction(Constants.CONSOLE_CLR, new ClearConsole());
            ParserFunction.RegisterFunction(Constants.PRINT_BLACK, new PrintColorFunction(ConsoleColor.Black));
            ParserFunction.RegisterFunction(Constants.PRINT_GRAY, new PrintColorFunction(ConsoleColor.DarkGray));
            ParserFunction.RegisterFunction(Constants.PRINT_GREEN, new PrintColorFunction(ConsoleColor.Green));
            ParserFunction.RegisterFunction(Constants.PRINT_RED, new PrintColorFunction(ConsoleColor.Red));
            ParserFunction.RegisterFunction(Constants.READ, new ReadConsole());
            ParserFunction.RegisterFunction(Constants.READNUMBER, new ReadConsole(true));
            ParserFunction.RegisterFunction(Constants.TRANSLATE, new TranslateFunction());

            CSCS_SQL.Init();
#endif
#endif
            //ReadConfig();
        }
Ejemplo n.º 6
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name);
            CSCS_SQL.CheckConnectionString(script, m_name);

            var  tableName = Utils.GetSafeString(args, 0);
            bool namesOnly = Utils.GetSafeInt(args, 1, 0) == 1;

            return(GetColsData(tableName, namesOnly));
        }
Ejemplo n.º 7
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name);
            CSCS_SQL.CheckConnectionString(script, m_name);

            var      query   = Utils.GetSafeString(args, 0);
            Variable results = GetData(query);

            return(results);
        }
Ejemplo n.º 8
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name);
            CSCS_SQL.CheckConnectionString(script, m_name);

            var queryStatement = Utils.GetSafeString(args, 0).Trim();
            int result         = 0;

            using (SqlConnection con = new SqlConnection(CSCS_SQL.ConnectionString))
            {
                using (SqlCommand cmd = new SqlCommand(queryStatement, con))
                {
                    con.Open();
                    result = cmd.ExecuteNonQuery();
                }
            }
            return(new Variable(result));
        }
Ejemplo n.º 9
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name);
            CSCS_SQL.CheckConnectionString(script, m_name);

            if (m_mode == Mode.SETUP)
            {
                var      query  = Utils.GetSafeString(args, 0);
                Variable result = new Variable(ExecuteQuery(query));
                return(result);
            }
            else if (m_mode == Mode.NEXT)
            {
                var id = Utils.GetSafeInt(args, 0);
                return(GetNextRecord(id));
            }
            else if (m_mode == Mode.CLOSE)
            {
                var id = Utils.GetSafeInt(args, 0);
                Close(id);
                return(Variable.EmptyInstance);
            }
            else if (m_mode == Mode.CURRENT_ROW)
            {
                var         id     = Utils.GetSafeInt(args, 0);
                SQLQueryObj obj    = GetSQLObject(id);
                Variable    result = new Variable(obj.CurrentRow);
                return(result);
            }

            else if (m_mode == Mode.TOTAL)
            {
                var      id     = Utils.GetSafeInt(args, 0);
                Variable result = new Variable(GetTotalRecords(id));
                return(result);
            }

            return(Variable.EmptyInstance);
        }
Ejemplo n.º 10
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            CSCS_SQL.CheckConnectionString(script, m_name);

            switch (m_mode)
            {
            case Mode.SP_DESC:
                Utils.CheckArgs(args.Count, 1, m_name);
                var spName  = "sp_helptext";
                var argName = Utils.GetSafeString(args, 0);
                List <KeyValuePair <string, object> > spParams = new List <KeyValuePair <string, object> >()
                {
                    new KeyValuePair <string, object>("@objname", argName)
                };
                var results = SQLSPFunction.ExecuteSP(spName, spParams);
                if (results.Type == Variable.VarType.ARRAY && results.Tuple.Count >= 1 &&
                    results.Tuple[0].Type == Variable.VarType.ARRAY && results.Tuple[0].Count >= 1)
                {
                    var r   = results.Tuple[0].Tuple[0].AsString();
                    var res = System.Text.RegularExpressions.Regex.Replace(r, @"\s{2,}", " ");
                    return(new Variable(res));
                }
                return(results);

            case Mode.TABLES:
                return(RemoveListEntries(SQLQueryFunction.GetData("SELECT name FROM sysobjects WHERE xtype = 'U'",
                                                                  null, null, false)));

            case Mode.PROCEDURES:
                return(RemoveListEntries(SQLQueryFunction.GetData("SELECT NAME from SYS.PROCEDURES",
                                                                  null, null, false)));
            }

            return(Variable.EmptyInstance);
        }
Ejemplo n.º 11
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name);
            CSCS_SQL.CheckConnectionString(script, m_name);

            var    arg       = Utils.GetSafeString(args, 0).Trim();
            string statement = "";

            switch (m_mode)
            {
            case Mode.DROP_DB:
                statement = "DROP DATABASE " + arg;
                break;

            case Mode.CREATE_DB:
                statement = "CREATE DATABASE " + arg;
                break;

            case Mode.DROP_TABLE:
                statement = "DROP TABLE " + arg;
                break;
            }
            int result = 0;

            using (SqlConnection con = new SqlConnection(CSCS_SQL.ConnectionString))
            {
                using (SqlCommand cmd = new SqlCommand(statement, con))
                {
                    con.Open();
                    result = cmd.ExecuteNonQuery();
                }
            }
            return(new Variable(result));
        }
Ejemplo n.º 12
0
        public void InitStandalone()
        {
            ParserFunction.RegisterFunction(Constants.GOTO, new GotoGosubFunction(true));
            ParserFunction.RegisterFunction(Constants.GOSUB, new GotoGosubFunction(false));

            ParserFunction.AddAction(Constants.LABEL_OPERATOR, new LabelFunction());
            ParserFunction.AddAction(Constants.POINTER, new PointerFunction());
            ParserFunction.AddAction(Constants.POINTER_REF, new PointerReferenceFunction());

#if UNITY_EDITOR == false && UNITY_STANDALONE == false
            //ParserFunction.CleanUp();
            ParserFunction.RegisterFunction(Constants.APPEND, new AppendFunction());
            ParserFunction.RegisterFunction(Constants.APPENDLINE, new AppendLineFunction());
            ParserFunction.RegisterFunction(Constants.APPENDLINES, new AppendLinesFunction());
            ParserFunction.RegisterFunction(Constants.CALL_NATIVE, new InvokeNativeFunction());
            ParserFunction.RegisterFunction(Constants.CD, new CdFunction());
            ParserFunction.RegisterFunction(Constants.CD__, new Cd__Function());
            ParserFunction.RegisterFunction(Constants.CONNECTSRV, new ClientSocket());
            ParserFunction.RegisterFunction(Constants.COPY, new CopyFunction());
            ParserFunction.RegisterFunction(Constants.DELETE, new DeleteFunction());
            ParserFunction.RegisterFunction(Constants.DIR, new DirFunction());
            ParserFunction.RegisterFunction(Constants.EXISTS, new ExistsFunction());
            ParserFunction.RegisterFunction(Constants.EXIT, new ExitFunction());
            ParserFunction.RegisterFunction(Constants.FINDFILES, new FindfilesFunction());
            ParserFunction.RegisterFunction(Constants.FINDSTR, new FindstrFunction());
            ParserFunction.RegisterFunction(Constants.GET_NATIVE, new GetNativeFunction());
            ParserFunction.RegisterFunction(Constants.KILL, new KillFunction());
            ParserFunction.RegisterFunction(Constants.MKDIR, new MkdirFunction());
            ParserFunction.RegisterFunction(Constants.MORE, new MoreFunction());
            ParserFunction.RegisterFunction(Constants.MOVE, new MoveFunction());
            ParserFunction.RegisterFunction(Constants.PSINFO, new PsInfoFunction());
            ParserFunction.RegisterFunction(Constants.PWD, new PwdFunction());
            ParserFunction.RegisterFunction(Constants.READFILE, new ReadCSCSFileFunction());
            ParserFunction.RegisterFunction(Constants.RUN, new RunFunction());
            ParserFunction.RegisterFunction(Constants.SET_NATIVE, new SetNativeFunction());
            ParserFunction.RegisterFunction(Constants.STARTSRV, new ServerSocket());
            ParserFunction.RegisterFunction(Constants.STOPWATCH_ELAPSED, new StopWatchFunction(StopWatchFunction.Mode.ELAPSED));
            ParserFunction.RegisterFunction(Constants.STOPWATCH_START, new StopWatchFunction(StopWatchFunction.Mode.START));
            ParserFunction.RegisterFunction(Constants.STOPWATCH_STOP, new StopWatchFunction(StopWatchFunction.Mode.STOP));
            ParserFunction.RegisterFunction(Constants.TAIL, new TailFunction());
            ParserFunction.RegisterFunction(Constants.TIMESTAMP, new TimestampFunction());
            ParserFunction.RegisterFunction(Constants.WRITE, new PrintFunction(false));
            ParserFunction.RegisterFunction(Constants.WRITELINE, new WriteLineFunction());
            ParserFunction.RegisterFunction(Constants.WRITELINES, new WriteLinesFunction());
            ParserFunction.RegisterFunction(Constants.WRITE_CONSOLE, new WriteToConsole());

#if __ANDROID__ == false && __IOS__ == false
            ParserFunction.RegisterFunction(Constants.ADD_COMP_DEFINITION, new EditCompiledEntry(EditCompiledEntry.EditMode.ADD_DEFINITION));
            ParserFunction.RegisterFunction(Constants.ADD_COMP_NAMESPACE, new EditCompiledEntry(EditCompiledEntry.EditMode.ADD_NAMESPACE));
            ParserFunction.RegisterFunction(Constants.CLEAR_COMP_DEFINITIONS, new EditCompiledEntry(EditCompiledEntry.EditMode.CLEAR_DEFINITIONS));
            ParserFunction.RegisterFunction(Constants.CLEAR_COMP_NAMESPACES, new EditCompiledEntry(EditCompiledEntry.EditMode.CLEAR_NAMESPACES));
            ParserFunction.RegisterFunction(Constants.CSHARP_FUNCTION, new CompiledFunctionCreator(true));

            ParserFunction.RegisterFunction(Constants.CONSOLE_CLR, new ClearConsole());
            ParserFunction.RegisterFunction(Constants.PRINT_BLACK, new PrintColorFunction(ConsoleColor.Black));
            ParserFunction.RegisterFunction(Constants.PRINT_GRAY, new PrintColorFunction(ConsoleColor.DarkGray));
            ParserFunction.RegisterFunction(Constants.PRINT_GREEN, new PrintColorFunction(ConsoleColor.Green));
            ParserFunction.RegisterFunction(Constants.PRINT_RED, new PrintColorFunction(ConsoleColor.Red));
            ParserFunction.RegisterFunction(Constants.READ, new ReadConsole());
            ParserFunction.RegisterFunction(Constants.READNUMBER, new ReadConsole(true));
            ParserFunction.RegisterFunction(Constants.TRANSLATE, new TranslateFunction());

            ParserFunction.RegisterFunction(Constants.ENCODE_FILE, new EncodeFileFunction(true));
            ParserFunction.RegisterFunction(Constants.DECODE_FILE, new EncodeFileFunction(false));

            CSCS_SQL.Init();
#endif
#endif
            //ReadConfig();
        }
Ejemplo n.º 13
0
        public void InitStandalone()
        {
#if UNITY_EDITOR == false && UNITY_STANDALONE == false
            // Math Top level functions
            ParserFunction.RegisterFunction(Constants.ABS, new AbsFunction());
            ParserFunction.RegisterFunction(Constants.ACOS, new AcosFunction());
            ParserFunction.RegisterFunction(Constants.ASIN, new AsinFunction());
            ParserFunction.RegisterFunction(Constants.CEIL, new CeilFunction());
            ParserFunction.RegisterFunction(Constants.COS, new CosFunction());
            ParserFunction.RegisterFunction(Constants.EXP, new ExpFunction());
            ParserFunction.RegisterFunction(Constants.FLOOR, new FloorFunction());
            ParserFunction.RegisterFunction(Constants.LOG, new LogFunction());
            ParserFunction.RegisterFunction(Constants.PI, new PiFunction());
            ParserFunction.RegisterFunction(Constants.POW, new PowFunction());
            ParserFunction.RegisterFunction(Constants.ROUND, new RoundFunction());
            ParserFunction.RegisterFunction(Constants.RANDOM, new GetRandomFunction());
            ParserFunction.RegisterFunction(Constants.SIN, new SinFunction());
            ParserFunction.RegisterFunction(Constants.SQRT, new SqrtFunction());

            //ParserFunction.CleanUp();
            ParserFunction.RegisterFunction(Constants.APPEND, new AppendFunction());
            ParserFunction.RegisterFunction(Constants.APPENDLINE, new AppendLineFunction());
            ParserFunction.RegisterFunction(Constants.APPENDLINES, new AppendLinesFunction());
            ParserFunction.RegisterFunction(Constants.CALL_NATIVE, new InvokeNativeFunction());
            ParserFunction.RegisterFunction(Constants.CD, new CdFunction());
            ParserFunction.RegisterFunction(Constants.CD__, new Cd__Function());
            ParserFunction.RegisterFunction(Constants.CONNECTSRV, new ClientSocket());
            ParserFunction.RegisterFunction(Constants.COPY, new CopyFunction());
            ParserFunction.RegisterFunction(Constants.DELETE, new DeleteFunction());
            ParserFunction.RegisterFunction(Constants.DIR, new DirFunction());
            ParserFunction.RegisterFunction(Constants.EXISTS, new ExistsFunction());
            ParserFunction.RegisterFunction(Constants.EXIT, new ExitFunction());
            ParserFunction.RegisterFunction(Constants.FINDFILES, new FindfilesFunction());
            ParserFunction.RegisterFunction(Constants.FINDSTR, new FindstrFunction());
            ParserFunction.RegisterFunction(Constants.GET_NATIVE, new GetNativeFunction());
            ParserFunction.RegisterFunction(Constants.JSON, new GetVariableFromJSONFunction());
            ParserFunction.RegisterFunction(Constants.KILL, new KillFunction());
            ParserFunction.RegisterFunction(Constants.MKDIR, new MkdirFunction());
            ParserFunction.RegisterFunction(Constants.MORE, new MoreFunction());
            ParserFunction.RegisterFunction(Constants.MOVE, new MoveFunction());
            ParserFunction.RegisterFunction(Constants.PSINFO, new PsInfoFunction());
            ParserFunction.RegisterFunction(Constants.PWD, new PwdFunction());
            ParserFunction.RegisterFunction(Constants.READFILE, new ReadCSCSFileFunction());
            ParserFunction.RegisterFunction(Constants.RUN, new RunFunction());
            ParserFunction.RegisterFunction(Constants.SET_NATIVE, new SetNativeFunction());
            ParserFunction.RegisterFunction(Constants.STARTSRV, new ServerSocket());
            ParserFunction.RegisterFunction(Constants.STOPWATCH_ELAPSED, new StopWatchFunction(StopWatchFunction.Mode.ELAPSED));
            ParserFunction.RegisterFunction(Constants.STOPWATCH_START, new StopWatchFunction(StopWatchFunction.Mode.START));
            ParserFunction.RegisterFunction(Constants.STOPWATCH_STOP, new StopWatchFunction(StopWatchFunction.Mode.STOP));
            ParserFunction.RegisterFunction(Constants.TAIL, new TailFunction());
            ParserFunction.RegisterFunction(Constants.TIMESTAMP, new TimestampFunction());
            ParserFunction.RegisterFunction(Constants.WEB_REQUEST, new WebRequestFunction());
            ParserFunction.RegisterFunction(Constants.WRITE, new PrintFunction(false));
            ParserFunction.RegisterFunction(Constants.WRITELINE, new WriteLineFunction());
            ParserFunction.RegisterFunction(Constants.WRITELINES, new WriteLinesFunction());
            ParserFunction.RegisterFunction(Constants.WRITE_CONSOLE, new WriteToConsole());

#if __ANDROID__ == false && __IOS__ == false
            ParserFunction.RegisterFunction(Constants.ADD_COMP_DEFINITION, new EditCompiledEntry(EditCompiledEntry.EditMode.ADD_DEFINITION));
            ParserFunction.RegisterFunction(Constants.ADD_COMP_NAMESPACE, new EditCompiledEntry(EditCompiledEntry.EditMode.ADD_NAMESPACE));
            ParserFunction.RegisterFunction(Constants.CLEAR_COMP_DEFINITIONS, new EditCompiledEntry(EditCompiledEntry.EditMode.CLEAR_DEFINITIONS));
            ParserFunction.RegisterFunction(Constants.CLEAR_COMP_NAMESPACES, new EditCompiledEntry(EditCompiledEntry.EditMode.CLEAR_NAMESPACES));
            ParserFunction.RegisterFunction(Constants.CSHARP_FUNCTION, new CompiledFunctionCreator(true));

            ParserFunction.RegisterFunction(Constants.CONSOLE_CLR, new ClearConsole());
            ParserFunction.RegisterFunction(Constants.PRINT_BLACK, new PrintColorFunction(ConsoleColor.Black));
            ParserFunction.RegisterFunction(Constants.PRINT_GRAY, new PrintColorFunction(ConsoleColor.DarkGray));
            ParserFunction.RegisterFunction(Constants.PRINT_GREEN, new PrintColorFunction(ConsoleColor.Green));
            ParserFunction.RegisterFunction(Constants.PRINT_RED, new PrintColorFunction(ConsoleColor.Red));
            ParserFunction.RegisterFunction(Constants.READ, new ReadConsole());
            ParserFunction.RegisterFunction(Constants.READNUMBER, new ReadConsole(true));
            ParserFunction.RegisterFunction(Constants.TRANSLATE, new TranslateFunction());

            ParserFunction.RegisterFunction(Constants.ENCODE_FILE, new EncodeFileFunction(true));
            ParserFunction.RegisterFunction(Constants.DECODE_FILE, new EncodeFileFunction(false));

            CSCS_SQL.Init();
#endif
#endif
            //ReadConfig();
        }