private void Write112_VirtualItemFullNameFilter(string n, string ns, VirtualItemFullNameFilter o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType && (o.GetType() != typeof(VirtualItemFullNameFilter))) { throw base.CreateUnknownTypeException(o); } base.WriteStartElement(n, ns, o, false, null); if (needType) { base.WriteXsiType("VirtualItemFullNameFilter", ""); } if (o.NameCondition != NamePatternCondition.Equal) { base.WriteElementString("NameCondition", "", this.Write100_NamePatternCondition(o.NameCondition)); } base.WriteElementString("NameComparision", "", this.Write101_NamePatternComparision(o.NameComparision)); base.WriteElementString("NamePattern", "", o.NamePattern); base.WriteEndElement(o); } }
private VirtualItemFullNameFilter Read112_VirtualItemFullNameFilter(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.id60_VirtualItemFullNameFilter) || (type.Namespace != this.id2_Item))) { throw base.CreateUnknownTypeException(type); } if (flag) { return null; } VirtualItemFullNameFilter o = new VirtualItemFullNameFilter(); bool[] flagArray = new bool[3]; 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.id228_NameCondition)) && (base.Reader.NamespaceURI == this.id2_Item)) { if (base.Reader.IsEmptyElement) { base.Reader.Skip(); } else { o.NameCondition = this.Read100_NamePatternCondition(base.Reader.ReadElementString()); } flagArray[0] = true; } else if ((!flagArray[1] && (base.Reader.LocalName == this.id229_NameComparision)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.NameComparision = this.Read101_NamePatternComparision(base.Reader.ReadElementString()); flagArray[1] = true; } else if ((!flagArray[2] && (base.Reader.LocalName == this.id230_NamePattern)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.NamePattern = base.Reader.ReadElementString(); flagArray[2] = true; } else { base.UnknownNode(o, ":NameCondition, :NameComparision, :NamePattern"); } } else { base.UnknownNode(o, ":NameCondition, :NameComparision, :NamePattern"); } base.Reader.MoveToContent(); base.CheckReaderCount(ref whileIterations, ref readerCount); } base.ReadEndElement(); return o; }