void Write3_CustomerSchema(string n, string ns, global::Mvp.Xml.Design.Tests.CustomerSchema o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) { WriteNullTagLiteral(n, ns); } return; } if (!needType) { System.Type t = o.GetType(); if (t == typeof(global::Mvp.Xml.Design.Tests.CustomerSchema)) { } else { throw CreateUnknownTypeException(o); } } WriteStartElement(n, ns, o, false, null); if (needType) { WriteXsiType(null, @"http://tempuri.org/CustomerSchema.xsd"); } WriteElementString(@"Name", @"http://tempuri.org/CustomerSchema.xsd", ((global::System.String)o.@Name)); Write2_CustomerSchemaOrders(@"Orders", @"http://tempuri.org/CustomerSchema.xsd", ((global::Mvp.Xml.Design.Tests.CustomerSchemaOrders)o.@Orders), false, false); WriteEndElement(o); }
/// <remarks/> protected override global::Mvp.Xml.Design.Tests.CustomerSchema Read3_CustomerSchema(bool isNullable, bool checkType) { global::Mvp.Xml.Design.Tests.CustomerSchema obj = base.Read3_CustomerSchema(isNullable, checkType); CustomerSchemaDeserializedHandler handler = CustomerSchemaDeserialized; if (handler != null) { handler(obj); } return(obj); }
/// <remarks/> protected virtual global::Mvp.Xml.Design.Tests.CustomerSchema Read3_CustomerSchema(bool isNullable, bool checkType) { 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)id3_Item && (object)((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } if (isNull) { return(null); } global::Mvp.Xml.Design.Tests.CustomerSchema o; o = new global::Mvp.Xml.Design.Tests.CustomerSchema(); bool[] paramsRead = new bool[2]; while (Reader.MoveToNextAttribute()) { if (!IsXmlnsAttribute(Reader.Name)) { UnknownNode((object)o); } } Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip(); return(o); } Reader.ReadStartElement(); Reader.MoveToContent(); int whileIterations0 = 0; int readerCount0 = 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)id4_Name && (object)Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } paramsRead[0] = true; } else if (!paramsRead[1] && ((object)Reader.LocalName == (object)id5_Orders && (object)Reader.NamespaceURI == (object)id2_Item)) { o.@Orders = Read2_CustomerSchemaOrders(false, true); paramsRead[1] = true; } else { UnknownNode((object)o, @"http://tempuri.org/CustomerSchema.xsd:Name, http://tempuri.org/CustomerSchema.xsd:Orders"); } } else { UnknownNode((object)o, @"http://tempuri.org/CustomerSchema.xsd:Name, http://tempuri.org/CustomerSchema.xsd:Orders"); } Reader.MoveToContent(); CheckReaderCount(ref whileIterations0, ref readerCount0); } ReadEndElement(); return(o); }