private static void selfTest() { selfTested = true; // we cannot instanciate the abstract class Xpn sol tests will be done in derieved classes // Note: these Operator Evaluation Directives are some fancy presets for studying new fancy formula parsers. the "real thing" directives are to be defined in derieved classes or in EvalExpert implementations!. _dtv.Set(" _ ", "AP``¹``>¹²``, ²``"); // append _dtv.Set(" & ", "CC``¹``>´°(¹´, ²´)````"); // convert charray _dtv.Set(" >$ ", "CS``¹``>(´¹ ²)´`` ° ²``"); // convert string _dtv.Set(" |. ", "LTM``¹``>(´¹ ²)´`` ° ²``"); // lTrim _dtv.Set(" .| ", "RTM``¹``>(´¹ ²)´`` ° ²``"); // rTrim _dtv.Set(" |.| ", "TM``¹``>(´¹ ²)´`` ° ²``"); // trim _dtv.Set(" && ", "AN``¹``>(´¹ ²)´`` ° ²````"); _dtv.Set(" || ", "OR``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" ^^ ", "XR``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" °° ", "XS``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" !°° ", "NX``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" == ", "IS``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" !== ", "NS``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" = ", "EQ``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" != ", "NE``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" > ", "GT``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" < ", "LT``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" >= ", "GE``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" <= ", "LE``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" ~ ", "LK``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" !~ ", "NL``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" ° ", "IN``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" !° ", "NI``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" ≡ ", "MV``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" !≡ ", "NV``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" ≡> ", "MU``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" !≡> ", "NU``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" ≡< ", "ML``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" !≡< ", "NL``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" <|> ", "UNION``¹``>(´¹´²)´``) ° (²``"); _dtv.Set(" <&> ", "INTERSECT``¹``>(´¹)´ ° ²``(²)``"); _dtv.Set(" <-> ", "EXCEPT``¹``>(´¹)´ ° ²``(²)``"); _dtv.Set(" sin ", "SIN``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" cos ", "COS``¹``>(´¹ ²)´`` ° ²``"); _dtv.Set(" tan ", "TAN``¹``>(´¹ ²)´`` ° ²``"); }
public void init(string App_Name, string[] args) //reads Options from Environment, Arguments and Ini-Files INTO the static class "ao" (AppOptions) { /* * dbDrivers.Set("h2s", "h2s 00 (H2Sql)"); * dbDrivers.Set("mys", "mys 01 (Oracle MySql)"); * dbDrivers.Set("2mys", "2mys 01h (MySql Emulation of H2Db)"); * dbDrivers.Set("pgs", "pgs 02 (PostGreSql)"); * dbDrivers.Set("2pgs", "2pgs 02h (PostGreSql Emulation of H2Db)"); * dbDrivers.Set("fbd", "fbd 03 (FireBirdSql)"); * dbDrivers.Set("2fbd", "2fbd 03h (FireBirdSql Emulation of H2Db)"); * dbDrivers.Set("sql", "sql 04 (SqLite)"); * dbDrivers.Set("2sql", "2sql 04h (SqLite Emulation of H2Db)"); * dbDrivers.Set("mss", "mss 05 (MsSqlServer)"); * dbDrivers.Set("2mss", "2mss 05h (MsSqlServer Emulation of H2Db)"); * dbDrivers.Set("syb", "syb 06 (SAP SyBase)"); * dbDrivers.Set("2syb", "2syb 06h (SAP SyBase Emulation of H2Db)"); * dbDrivers.Set("ora", "ora 07 (Oracle)"); * dbDrivers.Set("2ora", "2ora 07h (Oracle Emulation of H2Db)"); * dbDrivers.Set("db2", "db2 08 (IBM DB2)"); * dbDrivers.Set("2db2", "2db2 08h (IBM DB2 Emulation of H2Db)"); * dbDrivers.Set("dby", "dby 09 (Apache Derby)"); * dbDrivers.Set("2dby", "2dby 09h (Apache Derby Emulation of H2Db)"); * dbDrivers.Set("hsq", "hsq 10 (HSqlDb)"); * dbDrivers.Set("2hsq", "2hsq 10h (HSqlDb Emulation of H2Db)"); */ useHtmlAgilityPack = true; // ndStruct should replace the HtmlAgilityPack but ndStruct is not tested enough and ndStructs is not yet performant enough name = App_Name; ctx.args.Add(args); //if (args.Count() != 1) { Console.WriteLine("Usage: " + appName + " \"Directory\""); Console.WriteLine("press any key to abort ..."); Console.ReadKey(); return; } Registry.CurrentUser.CreateSubKey("SOFTWARE\\" + name); string iniContent = ""; try { string iniFile = Path.GetDirectoryName((new Uri(Assembly.GetEntryAssembly().CodeBase)).AbsolutePath) + "/" + name + ".ini".Replace("\\", "/").Replace("//", "\\\\"); iniContent = utl.f2s(iniFile); } catch (Exception e) { try { string iniFile = Path.GetDirectoryName((new Uri(Assembly.GetEntryAssembly().CodeBase)).AbsolutePath) + "\\..\\..\\..\\" + name + ".ini".Replace("\\", "/").Replace("//", "\\\\"); iniContent = utl.f2s(iniFile); } catch (Exception ex) { } // cannot throw Exception because there is no INI-File when ctx has been initialized from a Web App! } while (iniContent.Length > 0) { string line = utl.cutl(ref iniContent, "\n").Replace("\r", "").Trim(); if ((line.IndexOf("=") > -1) & (!line.StartsWith("//"))) { string entryName = utl.cutl(ref line, "=").Trim(); string entryValue = utl.cutl(ref line, "//").Trim(); if (entryName.ToUpper().Equals("FONT")) { Font = entryValue; } else if (entryName.ToUpper().Equals("DBFONT")) { DbFont = entryValue; } else if (entryName.ToUpper().Equals("TSFONT")) { TsFont = entryValue; } else if (entryName.ToUpper().Equals("DBD-H2S")) { dbDrivers.Set("h2s", dbdriverEntry(entryValue)); //00 (H2Sql)"); } else if (entryName.ToUpper().Equals("DBD-MYS")) { dbDrivers.Set("mys", dbdriverEntry(entryValue)); //01 (Oracle MySql)"); } else if (entryName.ToUpper().Equals("DBD-2MYS")) { dbDrivers.Set("2mys", dbdriverEntry(entryValue)); //01h (MySql Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-PGS")) { dbDrivers.Set("pgs", dbdriverEntry(entryValue)); //02 (PostGreSql)"); } else if (entryName.ToUpper().Equals("DBD-2PGS")) { dbDrivers.Set("2pgs", dbdriverEntry(entryValue)); //02h (PostGreSql Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-FBD")) { dbDrivers.Set("fbd", dbdriverEntry(entryValue)); //03 (FireBirdSql)"); } else if (entryName.ToUpper().Equals("DBD-2FBD")) { dbDrivers.Set("2fbd", dbdriverEntry(entryValue)); //03h (FireBirdSql Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-SQL")) { dbDrivers.Set("sql", dbdriverEntry(entryValue)); //04 (SqLite)"); } else if (entryName.ToUpper().Equals("DBD-2SQL")) { dbDrivers.Set("2sql", dbdriverEntry(entryValue)); //04h (SqLite Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-MSS")) { dbDrivers.Set("mss", dbdriverEntry(entryValue)); //05 (MsSqlServer)"); } else if (entryName.ToUpper().Equals("DBD-2MSS")) { dbDrivers.Set("2mss", dbdriverEntry(entryValue)); //05h (MsSqlServer Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-SYB")) { dbDrivers.Set("syb", dbdriverEntry(entryValue)); //06 (SAP SyBase)"); } else if (entryName.ToUpper().Equals("DBD-2SYB")) { dbDrivers.Set("2syb", dbdriverEntry(entryValue)); //06h (SAP SyBase Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-ORA")) { dbDrivers.Set("ora", dbdriverEntry(entryValue)); //07 (Oracle)"); } else if (entryName.ToUpper().Equals("DBD-2ORA")) { dbDrivers.Set("2ora", dbdriverEntry(entryValue)); //07h (Oracle Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-DB2")) { dbDrivers.Set("db2", dbdriverEntry(entryValue)); //08 (IBM DB2)"); } else if (entryName.ToUpper().Equals("DBD-2DB2")) { dbDrivers.Set("2db2", dbdriverEntry(entryValue)); //08h (IBM DB2 Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-DBY")) { dbDrivers.Set("dby", dbdriverEntry(entryValue)); //09 (Apache Derby)"); } else if (entryName.ToUpper().Equals("DBD-2DBY")) { dbDrivers.Set("2dby", dbdriverEntry(entryValue)); //09h (Apache Derby Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-HSQ")) { dbDrivers.Set("hsq", dbdriverEntry(entryValue)); //10 (HSqlDb)"); } else if (entryName.ToUpper().Equals("DBD-2HSQ")) { dbDrivers.Set("2hsq", dbdriverEntry(entryValue)); //10h (HSqlDb Emulation of H2Db)"); } else if (entryName.ToUpper().Equals("DBD-TDA")) { dbDrivers.Set("tda", dbdriverEntry(entryValue)); //11 (Novell TeraData)"); } iniParam.Add(entryName.ToUpper(), entryValue); } } }