public override void Serialize(Corba.DataOutputStream arg) { // rmi data arg.write_octet(1); arg.write_octet(1); // size: is equal to size of m_elements int size = m_elements.Length; arg.write_long(size); if (m_backArraySize < size) { m_backArraySize = size; } arg.write_long(m_backArraySize); for (int i = 0; i < size; i++) { bool isByRef = false; if (m_elements[i] != null) { isByRef = ClsToIdlMapper.IsMappedToConcreteInterface(m_elements[i].GetType()); } arg.write_boolean(isByRef); if (!isByRef) { arg.write_ValueOfActualType(m_elements[i]); } else { arg.write_Object((MarshalByRefObject)m_elements[i]); } } }
private void WriteObject(object val, Corba.DataOutputStream target) { bool isByRef = false; if (val != null) { isByRef = ClsToIdlMapper.IsMappedToConcreteInterface(val.GetType()); } target.write_boolean(isByRef); if (!isByRef) { target.write_ValueOfActualType(val); } else { target.write_Object((MarshalByRefObject)val); } }