static void Main(string[] args) { EchoClientApp.InitCodes(); ServiceApp.RegisterApp <EchoClientApp>("client"); ServiceApp.RegisterApp <EchoServerApp>("server"); string[] args2 = (new string[] { "echo.exe" }).Union(args).ToArray(); Native.dsn_run(args2.Length, args2, true); }
static void Main(string[] args) { echoHelper.InitCodes(); ServiceApp.RegisterApp <echoServerApp>("server"); ServiceApp.RegisterApp <echoClientApp>("client"); //ServiceApp.RegisterApp<echoPerfTestClientApp>("client.echo.perf.test"); var args2 = (new string[] { "echo" }).Union(args).ToArray(); Native.dsn_run(args2.Length, args2, true); }
static void Main(string[] args) { counterHelper.InitCodes(); testHelper.init(); ServiceApp.RegisterApp <counterServerApp>("server"); ServiceApp.RegisterApp <counterClientApp>("client"); string[] args2 = (new string[] { "counter" }).Union(args).ToArray(); Native.dsn_run(args2.Length, args2, false); // Native.dsn_run_config("config.ini", false); int counter = 0; while (testHelper.finished_test() != 4) { Thread.Sleep(1000); if (++counter > 10) { Console.WriteLine("it takes too long to complete..."); Native.dsn_exit(1); } } bool passed = true; Dictionary <string, bool> result = testHelper.result(); foreach (KeyValuePair <string, bool> entry in result) { string name = entry.Key; bool ok = entry.Value; passed = passed && ok; Console.WriteLine(name + " " + (ok ? "passed" : "failed")); } int ret = passed ? 0 : 1; Native.dsn_exit(ret); }