public void Serialize(IntermediateFormatWriter writer) { writer.RegisterDeclaration(RecordField.m_Declaration); while (writer.NextMember()) { switch (writer.CurrentMember.MemberName) { case MemberName.FieldStatus: writer.WriteEnum((int)this.m_fieldStatus); break; case MemberName.FieldValueSerializable: if (!writer.TryWriteSerializable(this.m_fieldValue)) { this.m_fieldValue = null; writer.WriteNull(); this.m_fieldStatus = DataFieldStatus.UnSupportedDataType; } break; case MemberName.IsAggregateField: writer.Write(this.m_isAggregationField); break; case MemberName.FieldPropertyValues: writer.WriteListOfPrimitives(this.m_fieldPropertyValues); break; default: Global.Tracer.Assert(false); break; } } }