예제 #1
0
        public override async Task RunAsync(string[] args)
        {
            await using Ice.Communicator communicator = Initialize(ref args);
            await communicator.ActivateAsync();

            int num;

            try
            {
                num = args.Length == 1 ? int.Parse(args[0]) : 0;
            }
            catch (FormatException)
            {
                num = 0;
            }
            AllTests.Run(this, num);
        }
예제 #2
0
파일: Server.cs 프로젝트: RedTaylor/ice
        public override async Task RunAsync(string[] args)
        {
            await using Ice.Communicator communicator = Initialize(ref args);
            await communicator.ActivateAsync();

            if (args.Length < 1)
            {
                throw new ArgumentException("Usage: server testdir");
            }

            communicator.SetProperty("TestAdapter.Endpoints", GetTestEndpoint(0, "tcp"));
            communicator.SetProperty("TestAdapter.AcceptNonSecure", "Always");
            Ice.ObjectAdapter adapter = communicator.CreateObjectAdapter("TestAdapter");
            adapter.Add("factory", new ServerFactory(args[0] + "/../certs"));
            await adapter.ActivateAsync();

            await communicator.WaitForShutdownAsync();
        }