public void testHandoverStreamWithDeferedProperties() { log.info("testHandoverStreamWithDeferedProperties("); BContentStream bstrm1 = (BContentStream)remote.GetStreamDeferedProperies(); TestUtils.assertEquals(log, "contentType", "", bstrm1.ContentType); TestUtils.assertEquals(log, "contentLength", -1L, bstrm1.ContentLength); TestUtils.assertEquals(log, "fileName", "", bstrm1.FileName); TestUtils.assertEquals(log, "attachmentCode", 0, bstrm1.AttachmentCode); remote.SetStreamDoNotMaterialize(bstrm1); BContentStream bstrm = (BContentStream)remote.GetStreamDoNotClone(); TestUtils.assertEquals(log, "contentType", "", bstrm.ContentType); TestUtils.assertEquals(log, "contentLength", -1L, bstrm.ContentLength); TestUtils.assertEquals(log, "fileName", "", bstrm.FileName); TestUtils.assertEquals(log, "attachmentCode", 0, bstrm.AttachmentCode); bstrm.ensureProperties(); TestUtils.assertEquals(log, "contentType", "application/mycontentype", bstrm.ContentType); TestUtils.assertEquals(log, "contentLength", 5L, bstrm.ContentLength); TestUtils.assertEquals(log, "fileName", "myfilename", bstrm.FileName); TestUtils.assertEquals(log, "attachmentCode", BContentStream.ATTACHMENT, bstrm.AttachmentCode); log.info(")testHandoverStreamWithDeferedProperties"); }
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 <Object> __byps__outerResult = new BAsyncResultSendMethod <Object>(__byps__asyncResult, new byps.test.api.BResult_19()); __byps__remoteT.SetStreamDoNotMaterialize(streamValue, BAsyncResultHelper.ToDelegate(__byps__outerResult)); } catch (Exception e) { __byps__asyncResult.setAsyncResult(null, e); } }