コード例 #1
0
    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);
        }
    }
コード例 #2
0
ファイル: AllTests.cs プロジェクト: bholl/zeroc-ice
 private static string getAdapterNameWithAMI(TestIntfPrx test)
 {
     GetAdapterNameCB cb = new GetAdapterNameCB();
     test.begin_getAdapterName().whenCompleted(cb.response, cb.exception);
     return cb.getResult();
 }