Ejemplo n.º 1
0
        public override DispatchStatus dispatch__(IceInternal.Incoming inS__, Current current)
        {
            byte[] inEncaps = inS__.readParamEncaps();
            var    in__     = new IceInternal.IncomingAsync(inS__);

            try
            {
                ice_invokeAsync(inEncaps, current).ContinueWith(
                    (t) =>
                {
                    try
                    {
                        var ret__ = t.Result;
                        in__.writeParamEncaps__(ret__.outEncaps, ret__.returnValue);
                    }
                    catch (AggregateException ae)
                    {
                        in__.exception__(ae.InnerException);
                        return;
                    }
                    in__.response__();
                });
            }
            catch (System.Exception ex)
            {
                in__.ice_exception(ex);
            }
            return(DispatchStatus.DispatchAsync);
        }
Ejemplo n.º 2
0
 public override Task <Ice.OutputStream> iceDispatch(IceInternal.Incoming inS, Current current)
 {
     byte[] inEncaps = inS.readParamEncaps();
     return(ice_invokeAsync(inEncaps, current).ContinueWith((Task <Object_Ice_invokeResult> t) =>
     {
         var ret = t.GetAwaiter().GetResult();
         return Task.FromResult(inS.writeParamEncaps(ret.outEncaps, ret.returnValue));
     }).Unwrap());
 }
Ejemplo n.º 3
0
        public override Task <OutputStream> iceDispatch(IceInternal.Incoming inS, Current current)
        {
            byte[] inEncaps = inS.readParamEncaps();
            byte[] outEncaps;
            bool   ok = ice_invoke(inEncaps, out outEncaps, current);

            inS.setResult(inS.writeParamEncaps(outEncaps, ok));
            return(null);
        }
Ejemplo n.º 4
0
        public override Task <Ice.OutputStream> iceDispatch(IceInternal.Incoming inS, Current current)
        {
            byte[] inEncaps = inS.readParamEncaps();
            var    task     = ice_invokeAsync(inEncaps, current);
            var    cached   = inS.getAndClearCachedOutputStream();

            return(task.ContinueWith((Task <Object_Ice_invokeResult> t) =>
            {
                var ret = t.GetAwaiter().GetResult();
                return Task.FromResult(inS.writeParamEncaps(cached, ret.outEncaps, ret.returnValue));
            },
                                     TaskScheduler.Current).Unwrap());
        }
Ejemplo n.º 5
0
        public override DispatchStatus dispatch__(IceInternal.Incoming inS__, Current current)
        {
            byte[] inEncaps          = inS__.readParamEncaps();
            AMD_Object_ice_invoke cb = new _AMD_Object_ice_invoke(inS__);

            try
            {
                ice_invoke_async(cb, inEncaps, current);
            }
            catch (System.Exception ex)
            {
                cb.ice_exception(ex);
            }
            return(DispatchStatus.DispatchAsync);
        }
Ejemplo n.º 6
0
        public override DispatchStatus dispatch__(IceInternal.Incoming inS__, Current current)
        {
            byte[] inEncaps = inS__.readParamEncaps();
            byte[] outEncaps;
            bool   ok = ice_invoke(inEncaps, out outEncaps, current);

            inS__.writeParamEncaps__(outEncaps, ok);
            if (ok)
            {
                return(DispatchStatus.DispatchOK);
            }
            else
            {
                return(DispatchStatus.DispatchUserException);
            }
        }