private static string getAdapterNameWithAMI(TestIntfPrx testIntf) { object m = new object(); string result = null; testIntf.begin_getAdapterName().whenCompleted( (string name) => { lock (m) { result = name; System.Threading.Monitor.Pulse(m); } }, (Ice.Exception ex) => { test(false); }); lock (m) { while (result == null) { System.Threading.Monitor.Wait(m); } return(result); } }
private static string getAdapterNameWithAMI(TestIntfPrx test) { GetAdapterNameCB cb = new GetAdapterNameCB(); test.begin_getAdapterName().whenCompleted(cb.response, cb.exception); return cb.getResult(); }