Exemple #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Log.Init(1, 50240000, "yyyyMMdd", @"./logs/", LogType.Debug);

            DataBaseOperator.SetDbIniFilePath(".");
            Log.WriteDebugLog("ControlCenter::Startup", "Begin connect db");

            string connStr = DataBasePool.AddDataBaseConnectionString("debit", "!%(**$*@^77f1fjj", 5, 5);

            Log.WriteDebugLog("ControlCenter::Startup", connStr);
            DataBaseOperator.Init("debit");

            string serverInfo = "172.22.0.12:6379";
            string password   = "******";

            RedisPools.RedisPools.Init(serverInfo, Proxy.None, 200, password);

            ControlCenter cc = new ControlCenter();

            cc.Start();

            while (true)
            {
                Thread.Sleep(100000);
            }
        }
        static void Main(string[] args)
        {
            //AGUSTINUS WAHYU TETRA NO      !=agustinus wahyu tetra novranta
            //:             !=

            Console.WriteLine(Convert.ToString(Levenshtein("CHINTIA D W LASUT", "chintia dervini wulandari lasut".ToUpper())));

            Log.Init(1, 50240000, "yyyyMMdd", @"./logs/", LogType.Debug);

            DataBaseOperator.SetDbIniFilePath(".");
            Log.WriteDebugLog("ControlCenter::Startup", "Begin connect db");

            string connStr = DataBasePool.AddDataBaseConnectionString("debittest", "!%(**$*@^77f1fjj", 5, 5);

            Log.WriteDebugLog("ControlCenter::Startup", connStr);
            DataBaseOperator.Init("debittest");

            ControlCenter cc = new ControlCenter();

            cc.Start();

            while (true)
            {
                Thread.Sleep(100000);
            }

            return;

            string serverInfo = "127.0.0.1:6379";
            string password   = "******";

            RedisPools.RedisPools.Init(serverInfo, Proxy.None, 200, password);

            LoanBank bank = new LoanBank();

            DebitUserRecord record = new DebitUserRecord();

            record.debitId        = 111;
            record.bankAccount    = "1680001297876";
            record.bankCode       = "008";
            record.amountTransfer = 10000;
            record.purpose        = "test";
            record.userId         = 27;
            record.userName       = "******";

            string errMsg = String.Empty;

            bank.Transfer(record, out errMsg);


            //bank.CheckTransferStatus("10013");
            //$paramSignature = $email . $timestamp . $bankCode . $bankAccount . $accountName . $custRefNumber . $amountTransfer . $purpose . $disburseId . $secretKey;
        }
        public Startup(IConfiguration config)
        {
            Configuration = config;
            Log.Init(1, 50240000, "yyyyMMdd", @"./logs/", LogType.Debug);

            string DBName    = config["AppSettings:DBName"];
            string publicKey = config["AppSettings:publicKey"];

            DataBaseOperator.SetDbIniFilePath(".");
            Log.WriteDebugLog("Startup::Startup", "Begin connect db");
            string conStr = DataBasePool.AddDataBaseConnectionString(DBName, publicKey, 5, 5);

            DataBaseOperator.Init(DBName);
            Log.WriteDebugLog("WebApiApplication::Application_Start", "New 数据库连接串:{0}", conStr);

            ThreadPool.SetMinThreads(100, 100);
            ThreadPool.SetMaxThreads(2048, 2048);

            string serverInfo = config["AppSettings:RedisExchangeHosts"];
            string password   = config["AppSettings:RedisExchangePwd"];

            RedisPools.RedisPools.Init(serverInfo, Proxy.None, 200, password);
        }