protected override void XmlSerializeChildren(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlDocumentRoot docRoot = (base.Parent as CXmlDocumentRoot); if (docRoot != null) { CXmlNodeSegmentTable table = docRoot.SegmentTable; if (table != null) { foreach (CXmlSegBase seg in table) { bool wasSerialized = seg.WasSerialized; if (wasSerialized) { aParameters.Writer.WriteStartElement(Constants.SegmentDictionary_Segment); // seg.Version.XmlSerialize(aParameters); aParameters.Writer.WriteElementString(SegConstants.CmnName, seg.Name); // aParameters.Writer.WriteEndElement(); } } } } }
public override object Serialize(CISinkSerializationParameters aParams) { CXmlDocumentRoot document = new CXmlDocumentRoot(); // string fileName = string.Empty; using (CXmlDocumentSerializationParameters parameters = new CXmlDocumentSerializationParameters(aParams, document)) { fileName = parameters.FileName; document.XmlSerialize(parameters); } // return(fileName); }