Exemplo n.º 1
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);
        }
Exemplo 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 <Ice.Object_Ice_invokeResult> t) =>
     {
         var ret = t.GetAwaiter().GetResult();
         return Task.FromResult <Ice.OutputStream>(inS.writeParamEncaps(ret.outEncaps, ret.returnValue));
     }).Unwrap());
 }
Exemplo n.º 3
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());
        }