/// <summary> /// Serialiaztion of objects /// </summary> /// <param name="objData">Object to serialize</param> /// <param name="abstractHessianOutput">HessianOutput - Instance</param> public override void WriteObject(object objData, AbstractHessianOutput abstractHessianOutput) { if (abstractHessianOutput.AddRef(objData)) { return; } if (objData == null) { abstractHessianOutput.WriteNull(); } else { int iref = abstractHessianOutput.WriteObjectBegin(PROT_GUID_TYPE); if (iref < -1) { abstractHessianOutput.WriteString("value"); abstractHessianOutput.WriteString(objData.ToString()); abstractHessianOutput.WriteMapEnd(); } else { if (iref == -1) { abstractHessianOutput.WriteClassFieldLength(1); abstractHessianOutput.WriteString("value"); abstractHessianOutput.WriteObjectBegin(PROT_GUID_TYPE); } abstractHessianOutput.WriteString(objData.ToString()); } } }
private void writeDefinition20(SerializationInfo serializationInfo, AbstractHessianOutput abstractHessianOutput) { abstractHessianOutput.WriteClassFieldLength(serializationInfo.MemberCount); foreach (SerializationEntry serializationEntry in serializationInfo) { abstractHessianOutput.WriteString(serializationEntry.Name); } }
private void writeDefinition20(AbstractHessianOutput abstractHessianOutput) { abstractHessianOutput.WriteClassFieldLength(m_alFields.Count); for (int i = 0; i < m_alFields.Count; i++) { MemberInfo field = m_alFields[i]; abstractHessianOutput.WriteString(field.Name); } }