void Write3_OrderedItem(string n, string ns, global::uwpSerializer.OrderedItem o, bool isNullable, bool needType, string parentRuntimeNs = null, string parentCompileTimeNs = null)
        {
            string defaultNamespace = parentRuntimeNs;

            if ((object)o == null)
            {
                if (isNullable)
                {
                    WriteNullTagLiteral(n, ns);
                }
                return;
            }
            if (!needType)
            {
                System.Type t = o.GetType();
                if (t == typeof(global::uwpSerializer.OrderedItem))
                {
                }
                else
                {
                    throw CreateUnknownTypeException(o);
                }
            }
            WriteStartElement(n, ns, o, false, null);
            if (needType)
            {
                WriteXsiType(@"OrderedItem", defaultNamespace);
            }
            string namespace9 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com";

            WriteElementString(@"ItemName", namespace9, ((global::System.String)o.@ItemName));
            string namespace10 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com";

            WriteElementString(@"Description", namespace10, ((global::System.String)o.@Description));
            string namespace11 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com";

            WriteElementStringRaw(@"UnitPrice", namespace11, System.Xml.XmlConvert.ToString((global::System.Decimal)((global::System.Decimal)o.@UnitPrice)));
            string namespace12 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com";

            WriteElementStringRaw(@"Quantity", namespace12, System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)o.@Quantity)));
            string namespace13 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com";

            WriteElementStringRaw(@"LineTotal", namespace13, System.Xml.XmlConvert.ToString((global::System.Decimal)((global::System.Decimal)o.@LineTotal)));
            WriteEndElement(o);
        }
        global::uwpSerializer.OrderedItem Read3_OrderedItem(bool isNullable, bool checkType, string defaultNamespace = null)
        {
            System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null;
            bool isNull = false;

            if (isNullable)
            {
                isNull = ReadNull();
            }
            if (checkType)
            {
                if (xsiType == null || ((object)((System.Xml.XmlQualifiedName)xsiType).Name == (object)id6_OrderedItem && string.Equals(((System.Xml.XmlQualifiedName)xsiType).Namespace, defaultNamespace ?? id2_httpwwwcpandlcom)))
                {
                }
                else
                {
                    throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType);
                }
            }
            if (isNull)
            {
                return(null);
            }
            global::uwpSerializer.OrderedItem o;
            o = new global::uwpSerializer.OrderedItem();
            bool[] paramsRead = new bool[5];
            while (Reader.MoveToNextAttribute())
            {
                if (!IsXmlnsAttribute(Reader.Name))
                {
                    UnknownNode((object)o);
                }
            }
            Reader.MoveToElement();
            if (Reader.IsEmptyElement)
            {
                Reader.Skip();
                return(o);
            }
            Reader.ReadStartElement();
            Reader.MoveToContent();
            int whileIterations2 = 0;
            int readerCount2     = ReaderCount;

            while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None)
            {
                if (Reader.NodeType == System.Xml.XmlNodeType.Element)
                {
                    if (!paramsRead[0] && ((object)Reader.LocalName == (object)id10_ItemName && string.Equals(Reader.NamespaceURI, defaultNamespace ?? id2_httpwwwcpandlcom)))
                    {
                        {
                            o.@ItemName = Reader.ReadElementContentAsString();
                        }
                        paramsRead[0] = true;
                    }
                    else if (!paramsRead[1] && ((object)Reader.LocalName == (object)id11_Description && string.Equals(Reader.NamespaceURI, defaultNamespace ?? id2_httpwwwcpandlcom)))
                    {
                        {
                            o.@Description = Reader.ReadElementContentAsString();
                        }
                        paramsRead[1] = true;
                    }
                    else if (!paramsRead[2] && ((object)Reader.LocalName == (object)id12_UnitPrice && string.Equals(Reader.NamespaceURI, defaultNamespace ?? id2_httpwwwcpandlcom)))
                    {
                        {
                            o.@UnitPrice = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementContentAsString());
                        }
                        paramsRead[2] = true;
                    }
                    else if (!paramsRead[3] && ((object)Reader.LocalName == (object)id13_Quantity && string.Equals(Reader.NamespaceURI, defaultNamespace ?? id2_httpwwwcpandlcom)))
                    {
                        {
                            o.@Quantity = System.Xml.XmlConvert.ToInt32(Reader.ReadElementContentAsString());
                        }
                        paramsRead[3] = true;
                    }
                    else if (!paramsRead[4] && ((object)Reader.LocalName == (object)id14_LineTotal && string.Equals(Reader.NamespaceURI, defaultNamespace ?? id2_httpwwwcpandlcom)))
                    {
                        {
                            o.@LineTotal = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementContentAsString());
                        }
                        paramsRead[4] = true;
                    }
                    else
                    {
                        UnknownNode((object)o, @"http://www.cpandl.com:ItemName, http://www.cpandl.com:Description, http://www.cpandl.com:UnitPrice, http://www.cpandl.com:Quantity, http://www.cpandl.com:LineTotal");
                    }
                }
                else
                {
                    UnknownNode((object)o, @"http://www.cpandl.com:ItemName, http://www.cpandl.com:Description, http://www.cpandl.com:UnitPrice, http://www.cpandl.com:Quantity, http://www.cpandl.com:LineTotal");
                }
                Reader.MoveToContent();
                CheckReaderCount(ref whileIterations2, ref readerCount2);
            }
            ReadEndElement();
            return(o);
        }