void Write4_PurchaseOrder(string n, string ns, global::uwpSerializer.PurchaseOrder 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.PurchaseOrder)) { } else { throw CreateUnknownTypeException(o); } } WriteStartElement(n, ns, o, false, null); if (needType) { WriteXsiType(@"PurchaseOrder", defaultNamespace); } string namespace2 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com"; Write2_Address(@"ShipTo", namespace2, ((global::uwpSerializer.Address)o.@ShipTo), false, false, namespace2, @"http://www.cpandl.com"); string namespace3 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com"; WriteElementString(@"OrderDate", namespace3, ((global::System.String)o.@OrderDate)); string namespace4 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com"; { global::uwpSerializer.OrderedItem[] a = (global::uwpSerializer.OrderedItem[])((global::uwpSerializer.OrderedItem[])o.@OrderedItems); if (a != null) { WriteStartElement(@"Items", namespace4, null, false); for (int ia = 0; ia < a.Length; ia++) { string namespace5 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com"; Write3_OrderedItem(@"OrderedItem", namespace5, ((global::uwpSerializer.OrderedItem)a[ia]), true, false, namespace5, @"http://www.cpandl.com"); } WriteEndElement(); } } string namespace6 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com"; WriteElementStringRaw(@"SubTotal", namespace6, System.Xml.XmlConvert.ToString((global::System.Decimal)((global::System.Decimal)o.@SubTotal))); string namespace7 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com"; WriteElementStringRaw(@"ShipCost", namespace7, System.Xml.XmlConvert.ToString((global::System.Decimal)((global::System.Decimal)o.@ShipCost))); string namespace8 = (parentCompileTimeNs == @"http://www.cpandl.com" && parentRuntimeNs != null) ? parentRuntimeNs : @"http://www.cpandl.com"; WriteElementStringRaw(@"TotalCost", namespace8, System.Xml.XmlConvert.ToString((global::System.Decimal)((global::System.Decimal)o.@TotalCost))); WriteEndElement(o); }