Exemplo n.º 1
0
        public override void Run(string[] args)
        {
            using Communicator communicator = Initialize(ref args);
            communicator.SetProperty("TestAdapter.Endpoints", GetTestEndpoint(0));
            ObjectAdapter adapter = communicator.CreateObjectAdapter("TestAdapter");
            var           blob    = new BlobjectI();

            adapter.AddDefault(blob);
            adapter.Add("__echo", new Echo());
            adapter.Activate();
            communicator.WaitForShutdown();
        }
Exemplo n.º 2
0
        public override async Task RunAsync(string[] args)
        {
            await Communicator.ActivateAsync();

            Communicator.SetProperty("TestAdapter.Endpoints", GetTestEndpoint(0));

            ObjectAdapter adapter = Communicator.CreateObjectAdapter("TestAdapter");
            var           blob    = new BlobjectI();

            adapter.AddDefault(blob);
            adapter.Add("__echo", new Echo());
            await adapter.ActivateAsync();

            ServerReady();
            await Communicator.ShutdownComplete;
        }