private void Write77_IntegralFilterOfInt64(string n, string ns, IntegralFilter<long> o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType) { System.Type type = o.GetType(); if (type != typeof(IntegralFilter<long>)) { if (type == typeof(SizeFilter)) { this.Write97_SizeFilter(n, ns, (SizeFilter) o, isNullable, true); return; } if (type != typeof(VirtualItemSizeFilter)) { throw base.CreateUnknownTypeException(o); } this.Write98_VirtualItemSizeFilter(n, ns, (VirtualItemSizeFilter) o, isNullable, true); return; } } base.WriteStartElement(n, ns, o, false, null); if (needType) { base.WriteXsiType("IntegralFilterOfInt64", ""); } base.WriteElementString("ValueComparision", "", this.Write73_SimpleComparision(o.ValueComparision)); base.WriteElementStringRaw("FromValue", "", XmlConvert.ToString(o.FromValue)); base.WriteElementStringRaw("ToValue", "", XmlConvert.ToString(o.ToValue)); base.WriteEndElement(o); } }
private void Write83_IntegralFilterOfByte(string n, string ns, IntegralFilter<byte> o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType && (o.GetType() != typeof(IntegralFilter<byte>))) { throw base.CreateUnknownTypeException(o); } base.WriteStartElement(n, ns, o, false, null); if (needType) { base.WriteXsiType("IntegralFilterOfByte", ""); } base.WriteElementString("ValueComparision", "", this.Write73_SimpleComparision(o.ValueComparision)); base.WriteElementStringRaw("FromValue", "", XmlConvert.ToString(o.FromValue)); base.WriteElementStringRaw("ToValue", "", XmlConvert.ToString(o.ToValue)); base.WriteEndElement(o); } }
private IntegralFilter<byte> Read83_IntegralFilterOfByte(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.id222_IntegralFilterOfByte) || (type.Namespace != this.id2_Item))) { throw base.CreateUnknownTypeException(type); } if (flag) { return null; } IntegralFilter<byte> o = new IntegralFilter<byte>(); 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.id200_ValueComparision)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.ValueComparision = this.Read73_SimpleComparision(base.Reader.ReadElementString()); flagArray[0] = true; } else if ((!flagArray[1] && (base.Reader.LocalName == this.id201_FromValue)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.FromValue = XmlConvert.ToByte(base.Reader.ReadElementString()); flagArray[1] = true; } else if ((!flagArray[2] && (base.Reader.LocalName == this.id202_ToValue)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.ToValue = XmlConvert.ToByte(base.Reader.ReadElementString()); flagArray[2] = true; } else { base.UnknownNode(o, ":ValueComparision, :FromValue, :ToValue"); } } else { base.UnknownNode(o, ":ValueComparision, :FromValue, :ToValue"); } base.Reader.MoveToContent(); base.CheckReaderCount(ref whileIterations, ref readerCount); } base.ReadEndElement(); return o; }