private void Write157_XPProgressBarRenderer(string n, string ns, XPProgressBarRenderer o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType && (o.GetType() != typeof(XPProgressBarRenderer))) { throw base.CreateUnknownTypeException(o); } base.WriteStartElement(n, ns, o, false, null); if (needType) { base.WriteXsiType("XPProgressBarRenderer", ""); } this.Write139_Color("BarColor", "", o.BarColor, false); this.Write139_Color("BarBackgroundColor", "", o.BarBackgroundColor, false); base.WriteElementStringRaw("ChunkWidth", "", XmlConvert.ToString(o.ChunkWidth)); base.WriteElementStringRaw("MarqueeChunks", "", XmlConvert.ToString(o.MarqueeChunks)); base.WriteElementString("MarqueeStyle", "", this.Write156_MarqueeStyle(o.MarqueeStyle)); base.WriteEndElement(o); } }
private XPProgressBarRenderer Read157_XPProgressBarRenderer(bool isNullable, bool checkType) { XmlQualifiedName type = checkType ? base.GetXsiType() : null; bool flag = false; if (isNullable) { flag = base.ReadNull(); } if ((checkType && (type != null)) && ((type.Name != this.id115_XPProgressBarRenderer) || (type.Namespace != this.id2_Item))) { throw base.CreateUnknownTypeException(type); } if (flag) { return null; } XPProgressBarRenderer o = new XPProgressBarRenderer(); bool[] flagArray = new bool[5]; while (base.Reader.MoveToNextAttribute()) { if (!base.IsXmlnsAttribute(base.Reader.Name)) { base.UnknownNode(o); } } base.Reader.MoveToElement(); if (base.Reader.IsEmptyElement) { base.Reader.Skip(); return o; } base.Reader.ReadStartElement(); base.Reader.MoveToContent(); int whileIterations = 0; int readerCount = base.ReaderCount; while ((base.Reader.NodeType != XmlNodeType.EndElement) && (base.Reader.NodeType != XmlNodeType.None)) { if (base.Reader.NodeType == XmlNodeType.Element) { if ((!flagArray[0] && (base.Reader.LocalName == this.id254_BarColor)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.BarColor = this.Read139_Color(true); flagArray[0] = true; } else if ((!flagArray[1] && (base.Reader.LocalName == this.id255_BarBackgroundColor)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.BarBackgroundColor = this.Read139_Color(true); flagArray[1] = true; } else if ((!flagArray[2] && (base.Reader.LocalName == this.id256_ChunkWidth)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.ChunkWidth = XmlConvert.ToInt32(base.Reader.ReadElementString()); flagArray[2] = true; } else if ((!flagArray[3] && (base.Reader.LocalName == this.id257_MarqueeChunks)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.MarqueeChunks = XmlConvert.ToInt32(base.Reader.ReadElementString()); flagArray[3] = true; } else if ((!flagArray[4] && (base.Reader.LocalName == this.id114_MarqueeStyle)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.MarqueeStyle = this.Read156_MarqueeStyle(base.Reader.ReadElementString()); flagArray[4] = true; } else { base.UnknownNode(o, ":BarColor, :BarBackgroundColor, :ChunkWidth, :MarqueeChunks, :MarqueeStyle"); } } else { base.UnknownNode(o, ":BarColor, :BarBackgroundColor, :ChunkWidth, :MarqueeChunks, :MarqueeStyle"); } base.Reader.MoveToContent(); base.CheckReaderCount(ref whileIterations, ref readerCount); } base.ReadEndElement(); return o; }