protected override void XmlSerializeChildren(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CIInfoHW info = (CIInfoHW)aParameters.Container.ChildByType(typeof(CIInfoHW)); if (info != null) { int count = info.VersionCount; if (count > 0) { CXmlVersionText.WriteVersionTextListStart(aParameters.Writer); foreach (CIVersionInfo version in info) { if (version.IsValid) { CXmlVersionText xmlVersion = new CXmlVersionText(version.Value); xmlVersion.XmlSerialize(aParameters); } } CXmlVersionText.WriteVersionTextListEnd(aParameters.Writer); } } }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { if (aParameters.Container.Status != CrashItemLib.Crash.Container.CIContainer.TStatus.EStatusErrorContainer) { CIHeader header = aParameters.Container.Header; DateTime crashTime = header.CrashTime; // Date and time CXmlNode.WriteDate(aParameters.Writer, crashTime, SegConstants.CmnDate); CXmlNode.WriteTime(aParameters.Writer, crashTime, SegConstants.CmnTime); // Uptime double uptime = header.UpTime.TotalSeconds; if (uptime > 0) { aParameters.Writer.WriteElementString(SegConstants.Header_Uptime, uptime.ToString()); } // Underlying version information from crash file (if available) if (header.FileFormatVersion.IsValid) { CXmlVersionText version = new CXmlVersionText(header.FileFormatVersion); version.XmlSerialize(aParameters); } // Crash source if (header.CrashSource == 1) { aParameters.Writer.WriteElementString(SegConstants.Header_Crash_Source, SegConstants.Header_Crash_Source_User); } else if (header.CrashSource == 0) { aParameters.Writer.WriteElementString(SegConstants.Header_Crash_Source, SegConstants.Header_Crash_Source_Kernel); } } }