コード例 #1
0
        protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters)
        {
            CIInfoHW info = (CIInfoHW)aParameters.Container.ChildByType(typeof(CIInfoHW));

            if (info != null)
            {
                // Product type
                string productType = info.ProductType;
                WriteStringIfNotEmpty(aParameters.Writer, SegConstants.HWInfo_ProductType, productType);

                // Product code
                string productCode = info.ProductCode;
                WriteStringIfNotEmpty(aParameters.Writer, SegConstants.HWInfo_ProductCode, productCode);

                // Serial number
                string serialNumber = info.SerialNumber;
                WriteStringIfNotEmpty(aParameters.Writer, SegConstants.HWInfo_SerialNumber, serialNumber);

                // Crash source
                if (info.ProductionMode == 1)
                {
                    aParameters.Writer.WriteElementString(SegConstants.HWInfo_ProductionMode, SegConstants.HWInfo_ProductionMode_Prd);
                }
                else if (info.ProductionMode == 0)
                {
                    aParameters.Writer.WriteElementString(SegConstants.HWInfo_ProductionMode, SegConstants.HWInfo_ProductionMode_RnD);
                }
            }
        }
コード例 #2
0
        public override void XmlSerialize(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters)
        {
            CIInfoHW info = (CIInfoHW)aParameters.Container.ChildByType(typeof(CIInfoHW));

            if (info != null)
            {
                base.XmlSerialize(aParameters);
            }
        }
コード例 #3
0
        internal void AddHWInfo(CIContainer aContainer)
        {
            CIInfoHW info = (CIInfoHW)aContainer.ChildByType(typeof(CIInfoHW));

            if (info != null)
            {
                iProductType    = info.ProductType;
                iProductCode    = info.ProductCode.Trim();
                iSerialNumber   = info.SerialNumber.Trim();
                iProductionMode = info.ProductionMode;
            }
        }
コード例 #4
0
        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);
                }
            }
        }