public virtual void Serialize(IntermediateFormatWriter writer)
        {
            writer.RegisterDeclaration(OnDemandMetadata.m_Declaration);
            while (writer.NextMember())
            {
                switch (writer.CurrentMember.MemberName)
                {
                case MemberName.CommonSubReportInfos:
                    writer.WriteStringRIFObjectDictionary(this.m_commonSubReportInfoMap);
                    break;

                case MemberName.SubReportInfos:
                    writer.WriteStringRIFObjectDictionary(this.m_subReportInfoMap);
                    break;

                case MemberName.ReportSnapshot:
                    writer.Write(this.m_reportSnapshot);
                    break;

                case MemberName.DataChunkMap:
                    writer.WriteStringRIFObjectDictionary(this.m_dataChunkMap);
                    break;

                case MemberName.CachedExternalImages:
                    writer.WriteStringRIFObjectDictionary(this.m_cachedExternalImages);
                    break;

                case MemberName.CachedShapefiles:
                    writer.WriteStringRIFObjectDictionary(this.m_cachedShapefiles);
                    break;

                case MemberName.TransparentImageChunkName:
                    writer.Write(this.m_transparentImageChunkName);
                    break;

                case MemberName.GroupTreeRootOffset:
                    writer.Write(this.m_groupTreeRootOffset);
                    break;

                case MemberName.TablixProcessingComplete:
                    writer.WriteStringBoolArrayDictionary(this.m_tablixProcessingComplete);
                    break;

                case MemberName.GroupTreePartitions:
                    writer.Write(this.m_groupTreePartitions);
                    break;

                case MemberName.LookupPartitions:
                    writer.Write(this.m_lookupPartitions);
                    break;

                case MemberName.LastAssignedGlobalID:
                    writer.Write(this.m_lastAssignedGlobalID);
                    break;

                case MemberName.UpdatedVariableValues:
                    writer.WriteStringRIFObjectDictionary(this.m_updatedVariableValues);
                    break;

                default:
                    Global.Tracer.Assert(false);
                    break;
                }
            }
        }