private static int run(string[] args, Ice.Communicator communicator) { communicator.getProperties().setProperty("TestAdapter.Endpoints", "default"); Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); adapter.add(new decimalI(), Ice.Util.stringToIdentity("test")); adapter.add(new Test1I(), Ice.Util.stringToIdentity("test1")); adapter.add(new Test2I(), Ice.Util.stringToIdentity("test2")); adapter.activate(); Console.Out.Write("testing operation name... "); Console.Out.Flush(); @abstract.@decimalPrx p = @[email protected]( adapter.createProxy(Ice.Util.stringToIdentity("test"))); p.@default(); Console.Out.WriteLine("ok"); Console.Out.Write("testing System as module name... "); Console.Out.Flush(); @abstract.System.TestPrx t1 = @abstract.System.TestPrxHelper.uncheckedCast( adapter.createProxy(Ice.Util.stringToIdentity("test1"))); t1.op(); System.TestPrx t2 = System.TestPrxHelper.uncheckedCast( adapter.createProxy(Ice.Util.stringToIdentity("test2"))); t2.op(); Console.Out.WriteLine("ok"); Console.Out.Write("testing types... "); Console.Out.Flush(); testtypes(); Console.Out.WriteLine("ok"); return(0); }
public override void run(string[] args) { using (var communicator = initialize(ref args)) { communicator.getProperties().setProperty("TestAdapter.Endpoints", "default"); Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); adapter.Add(new decimalI(), "test"); adapter.Add(new Test1I(), "test1"); adapter.Add(new Test2I(), "test2"); adapter.Activate(); Console.Out.Write("testing operation name... "); Console.Out.Flush(); @abstract.@decimalPrx p = @[email protected](adapter.CreateProxy("test")); p.@default(); Console.Out.WriteLine("ok"); Console.Out.Write("testing System as module name... "); Console.Out.Flush(); @abstract.System.TestPrx t1 = @abstract.System.TestPrx.UncheckedCast(adapter.CreateProxy("test1")); t1.op(); System.TestPrx t2 = System.TestPrx.UncheckedCast(adapter.CreateProxy("test2")); t2.op(); Console.Out.WriteLine("ok"); Console.Out.Write("testing types... "); Console.Out.Flush(); testtypes(); Console.Out.WriteLine("ok"); } }