void Write2_MetadataSource(string n, string ns, global::System.Web.Compilation.WCFModel.MetadataSource 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::System.Web.Compilation.WCFModel.MetadataSource)) { } else { throw CreateUnknownTypeException(o); } } WriteStartElement(n, ns, o, false, null); if (needType) { WriteXsiType(@"MetadataSource", @"urn:schemas-microsoft-com:xml-dataservicemap"); } WriteAttribute(@"Address", @"", ((global::System.String)o.@Address)); WriteAttribute(@"Protocol", @"", ((global::System.String)o.@Protocol)); WriteAttribute(@"SourceId", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)o.@SourceId))); WriteEndElement(o); }
global::System.Web.Compilation.WCFModel.MetadataSource Read2_MetadataSource(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)id7_MetadataSource && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } if (isNull) return null; global::System.Web.Compilation.WCFModel.MetadataSource o; o = new global::System.Web.Compilation.WCFModel.MetadataSource(); bool[] paramsRead = new bool[3]; while (Reader.MoveToNextAttribute()) { if (!paramsRead[0] && ((object) Reader.LocalName == (object)id22_Address && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@Address = Reader.Value; paramsRead[0] = true; } else if (!paramsRead[1] && ((object) Reader.LocalName == (object)id23_Protocol && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@Protocol = Reader.Value; paramsRead[1] = true; } else if (!paramsRead[2] && ((object) Reader.LocalName == (object)id20_SourceId && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@SourceId = System.Xml.XmlConvert.ToInt32(Reader.Value); paramsRead[2] = true; } else if (!IsXmlnsAttribute(Reader.Name)) { UnknownNode((object)o, @":Address, :Protocol, :SourceId"); } } Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip(); return o; } Reader.ReadStartElement(); Reader.MoveToContent(); int whileIterations8 = 0; int readerCount8 = ReaderCount; while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { UnknownNode((object)o, @""); } else { UnknownNode((object)o, @""); } Reader.MoveToContent(); CheckReaderCount(ref whileIterations8, ref readerCount8); } ReadEndElement(); return o; }
global::System.Web.Compilation.WCFModel.MetadataSource Read2_MetadataSource(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)id7_MetadataSource && (object)((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } if (isNull) { return(null); } global::System.Web.Compilation.WCFModel.MetadataSource o; o = new global::System.Web.Compilation.WCFModel.MetadataSource(); bool[] paramsRead = new bool[3]; while (Reader.MoveToNextAttribute()) { if (!paramsRead[0] && ((object)Reader.LocalName == (object)id22_Address && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@Address = Reader.Value; paramsRead[0] = true; } else if (!paramsRead[1] && ((object)Reader.LocalName == (object)id23_Protocol && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@Protocol = Reader.Value; paramsRead[1] = true; } else if (!paramsRead[2] && ((object)Reader.LocalName == (object)id20_SourceId && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@SourceId = System.Xml.XmlConvert.ToInt32(Reader.Value); paramsRead[2] = true; } else if (!IsXmlnsAttribute(Reader.Name)) { UnknownNode((object)o, @":Address, :Protocol, :SourceId"); } } Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip(); return(o); } Reader.ReadStartElement(); Reader.MoveToContent(); int whileIterations8 = 0; int readerCount8 = ReaderCount; while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { UnknownNode((object)o, @""); } else { UnknownNode((object)o, @""); } Reader.MoveToContent(); CheckReaderCount(ref whileIterations8, ref readerCount8); } ReadEndElement(); return(o); }