Ejemplo n.º 1
0
 public override void execute(BRemote __byps__remote, BAsyncResultIF <Object> __byps__asyncResult)
 {
     // checkpoint byps.gen.cs.GenApiClass:413
     try {
         RemoteStreams __byps__remoteT = (RemoteStreams)__byps__remote;
         BAsyncResultSendMethod <System.IO.Stream> __byps__outerResult = new BAsyncResultSendMethod <System.IO.Stream>(__byps__asyncResult, new byps.test.api.BResult_15());
         __byps__remoteT.GetImage(BAsyncResultHelper.ToDelegate(__byps__outerResult));
     } catch (Exception e) {
         __byps__asyncResult.setAsyncResult(null, e);
     }
 }
Ejemplo n.º 2
0
        public void testRemoteStreamsOneStreamChunked()
        {
            log.info("testRemoteStreamsOneStreamChunked(");
            String str   = "hello";
            Stream istrm = new MyContentStreamChunked(new MemoryStream(Encoding.ASCII.GetBytes(str)));

            remote.SetImage(istrm);
            Stream     istrmR = remote.GetImage();
            ByteBuffer buf    = BWire.bufferFromStream(istrmR, false);
            String     strR   = Encoding.ASCII.GetString(buf.array(), buf.position(), buf.remaining());

            TestUtils.assertEquals(log, "stream", str, strR);
            log.info(")testRemoteStreamsOneStreamChunked");
        }