Esempio n. 1
0
            private static string getAdapterNameWithAMI(Test.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);
                }
            }