protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CIInfoSW info = (CIInfoSW)aParameters.Container.ChildByType(typeof(CIInfoSW)); if (info != null) { // Checksum if (info.ImageCheckSum != 0) { aParameters.Writer.WriteElementString(SegConstants.CmnChecksum, info.ImageCheckSum.ToString("x8")); } // Date and time CXmlNode.WriteDate(aParameters.Writer, info.ImageTimeStamp, SegConstants.CmnDate); CXmlNode.WriteTime(aParameters.Writer, info.ImageTimeStamp, SegConstants.CmnTime); // Platform string platform = info.Platform; WriteStringIfNotEmpty(aParameters.Writer, SegConstants.SWInfo_Platform, platform); // Language string language = info.Language; WriteStringIfNotEmpty(aParameters.Writer, SegConstants.SWInfo_Language, language); } }
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); } } }