private object[] MarshalAndUnmarshalRequestArgsOnce(MethodInfo testMethod, object[] actual) { ArgumentsSerializerFactory serFactory = m_argSerFactory; ArgumentsSerializer ser = serFactory.Create(testMethod.DeclaringType); MemoryStream data = new MemoryStream(); GiopVersion version = new GiopVersion(1, 2); byte endian = 0; CdrOutputStream targetStream = new CdrOutputStreamImpl(data, endian, version); ser.SerializeRequestArgs(testMethod.Name, actual, targetStream, null); data.Seek(0, SeekOrigin.Begin); CdrInputStreamImpl sourceStream = new CdrInputStreamImpl(data); sourceStream.ConfigStream(endian, version); IDictionary contextElements; object[] deser = ser.DeserializeRequestArgs(testMethod.Name, sourceStream, out contextElements); return(deser); }
private object MarshalAndUnmarshalResponeArgsOnce(MethodInfo testMethod, object returnValue, object[] outArgs, out object[] deserOutArgs) { ArgumentsSerializerFactory serFactory = m_argSerFactory; ArgumentsSerializer ser = serFactory.Create(testMethod.DeclaringType); MemoryStream data = new MemoryStream(); GiopVersion version = new GiopVersion(1, 2); byte endian = 0; CdrOutputStream targetStream = new CdrOutputStreamImpl(data, endian, version); ser.SerializeResponseArgs(testMethod.Name, returnValue, outArgs, targetStream); data.Seek(0, SeekOrigin.Begin); CdrInputStreamImpl sourceStream = new CdrInputStreamImpl(data); sourceStream.ConfigStream(endian, version); object returnValueDeser = ser.DeserializeResponseArgs(testMethod.Name, out deserOutArgs, sourceStream); return(returnValueDeser); }