Exemplo n.º 1
0
        public void getClientEndpoints(GetClientEndpointsCallback callback)
        {
            EndpointI[] clientEndpoints = null;
            lock (this)
            {
                clientEndpoints = _clientEndpoints;
            }

            if (clientEndpoints != null) // Lazy initialization.
            {
                callback.setEndpoints(clientEndpoints);
                return;
            }

            _router.getClientProxyAsync().ContinueWith(
                (t) =>
            {
                try
                {
                    callback.setEndpoints(setClientEndpoints(t.Result));
                }
                catch (System.AggregateException ae)
                {
                    Debug.Assert(ae.InnerException is Ice.LocalException);
                    callback.setException((Ice.LocalException)ae.InnerException);
                }
            });
        }
Exemplo n.º 2
0
        public void getClientEndpoints(GetClientEndpointsCallback callback)
        {
            EndpointI[] clientEndpoints = null;
            lock (this)
            {
                clientEndpoints = _clientEndpoints;
            }

            if (clientEndpoints != null) // Lazy initialization.
            {
                callback.setEndpoints(clientEndpoints);
                return;
            }

            _router.begin_getClientProxy().whenCompleted(
                (Ice.ObjectPrx proxy) =>
            {
                callback.setEndpoints(setClientEndpoints(proxy));
            },
                (Ice.Exception ex) =>
            {
                Debug.Assert(ex is Ice.LocalException);
                callback.setException((Ice.LocalException)ex);
            });
        }
Exemplo n.º 3
0
        public void getClientEndpoints(GetClientEndpointsCallback callback)
        {
            EndpointI[] clientEndpoints = null;
            lock (this)
            {
                clientEndpoints = _clientEndpoints;
            }

            if (clientEndpoints != null) // Lazy initialization.
            {
                callback.setEndpoints(clientEndpoints);
                return;
            }

            _router.getClientProxyAsync().ContinueWith(
                (t) =>
            {
                try
                {
                    var r = t.Result;
                    callback.setEndpoints(setClientEndpoints(r.returnValue,
                                                             r.hasRoutingTable.HasValue ? r.hasRoutingTable.Value : true));
                }
                catch (System.AggregateException ae)
                {
                    Debug.Assert(ae.InnerException is LocalException);
                    callback.setException((LocalException)ae.InnerException);
                }
            },
                System.Threading.Tasks.TaskScheduler.Current);
        }
Exemplo n.º 4
0
        public void getClientEndpoints(GetClientEndpointsCallback callback)
        {
            EndpointI[] clientEndpoints = null;
            lock(this)
            {
                clientEndpoints = _clientEndpoints;
            }

            if(clientEndpoints != null) // Lazy initialization.
            {
                callback.setEndpoints(clientEndpoints);
                return;
            }

            _router.begin_getClientProxy().whenCompleted(
                (Ice.ObjectPrx proxy) =>
                {
                    callback.setEndpoints(setClientEndpoints(proxy));
                },
                (Ice.Exception ex) =>
                {
                    Debug.Assert(ex is Ice.LocalException);
                    callback.setException((Ice.LocalException)ex);
                });
        }
Exemplo n.º 5
0
        public void getClientEndpoints(GetClientEndpointsCallback callback)
        {
            EndpointI[] clientEndpoints = null;
            lock(this)
            {
                clientEndpoints = _clientEndpoints;
            }

            if(clientEndpoints != null) // Lazy initialization.
            {
                callback.setEndpoints(clientEndpoints);
                return;
            }

            _router.getClientProxyAsync().ContinueWith(
                (t) =>
                {
                    try
                    {
                        callback.setEndpoints(setClientEndpoints(t.Result));
                    }
                    catch(System.AggregateException ae)
                    {
                        Debug.Assert(ae.InnerException is Ice.LocalException);
                        callback.setException((Ice.LocalException)ae.InnerException);
                    }
                });
        }