void Write5_MetadataFile(string n, string ns, global::System.Web.Compilation.WCFModel.MetadataFile 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.MetadataFile)) { } else { throw CreateUnknownTypeException(o); } } WriteStartElement(n, ns, o, false, null); if (needType) { WriteXsiType(@"MetadataFile", @"urn:schemas-microsoft-com:xml-dataservicemap"); } WriteAttribute(@"FileName", @"", ((global::System.String)o.@FileName)); WriteAttribute(@"MetadataType", @"", Write4_MetadataType(((global::System.Web.Compilation.WCFModel.MetadataFile.MetadataType)o.@FileType))); WriteAttribute(@"ID", @"", ((global::System.String)o.@ID)); if (o.@IgnoreSpecified) { WriteAttribute(@"Ignore", @"", System.Xml.XmlConvert.ToString((global::System.Boolean)((global::System.Boolean)o.@Ignore))); } if (o.@IsMergeResultSpecified) { WriteAttribute(@"IsMergeResult", @"", System.Xml.XmlConvert.ToString((global::System.Boolean)((global::System.Boolean)o.@IsMergeResult))); } if (o.@SourceIdSpecified) { WriteAttribute(@"SourceId", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)o.@SourceId))); } WriteAttribute(@"SourceUrl", @"", ((global::System.String)o.@SourceUrl)); if (o.@IgnoreSpecified) { } if (o.@IsMergeResultSpecified) { } if (o.@SourceIdSpecified) { } WriteEndElement(o); }
global::System.Web.Compilation.WCFModel.MetadataFile Read5_MetadataFile(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)id9_MetadataFile && (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.MetadataFile o; o = new global::System.Web.Compilation.WCFModel.MetadataFile(); bool[] paramsRead = new bool[7]; while (Reader.MoveToNextAttribute()) { if (!paramsRead[0] && ((object) Reader.LocalName == (object)id16_FileName && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@FileName = Reader.Value; paramsRead[0] = true; } else if (!paramsRead[1] && ((object) Reader.LocalName == (object)id17_MetadataType && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@FileType = Read4_MetadataType(Reader.Value); paramsRead[1] = true; } else if (!paramsRead[2] && ((object) Reader.LocalName == (object)id4_ID && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@ID = Reader.Value; paramsRead[2] = true; } else if (!paramsRead[3] && ((object) Reader.LocalName == (object)id18_Ignore && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@Ignore = System.Xml.XmlConvert.ToBoolean(Reader.Value); o.@IgnoreSpecified = true; paramsRead[3] = true; } else if (!paramsRead[4] && ((object) Reader.LocalName == (object)id19_IsMergeResult && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@IsMergeResult = System.Xml.XmlConvert.ToBoolean(Reader.Value); o.@IsMergeResultSpecified = true; paramsRead[4] = true; } else if (!paramsRead[5] && ((object) Reader.LocalName == (object)id20_SourceId && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@SourceId = System.Xml.XmlConvert.ToInt32(Reader.Value); o.@SourceIdSpecified = true; paramsRead[5] = true; } else if (!paramsRead[6] && ((object) Reader.LocalName == (object)id21_SourceUrl && (object) Reader.NamespaceURI == (object)id5_Item)) { o.@SourceUrl = Reader.Value; paramsRead[6] = true; } else if (!IsXmlnsAttribute(Reader.Name)) { UnknownNode((object)o, @":FileName, :MetadataType, :ID, :Ignore, :IsMergeResult, :SourceId, :SourceUrl"); } } Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip(); return o; } Reader.ReadStartElement(); Reader.MoveToContent(); int whileIterations7 = 0; int readerCount7 = 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 whileIterations7, ref readerCount7); } ReadEndElement(); return o; }
global::System.Web.Compilation.WCFModel.MetadataFile Read5_MetadataFile(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)id9_MetadataFile && (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.MetadataFile o; o = new global::System.Web.Compilation.WCFModel.MetadataFile(); bool[] paramsRead = new bool[7]; while (Reader.MoveToNextAttribute()) { if (!paramsRead[0] && ((object)Reader.LocalName == (object)id16_FileName && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@FileName = Reader.Value; paramsRead[0] = true; } else if (!paramsRead[1] && ((object)Reader.LocalName == (object)id17_MetadataType && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@FileType = Read4_MetadataType(Reader.Value); paramsRead[1] = true; } else if (!paramsRead[2] && ((object)Reader.LocalName == (object)id4_ID && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@ID = Reader.Value; paramsRead[2] = true; } else if (!paramsRead[3] && ((object)Reader.LocalName == (object)id18_Ignore && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@Ignore = System.Xml.XmlConvert.ToBoolean(Reader.Value); o.@IgnoreSpecified = true; paramsRead[3] = true; } else if (!paramsRead[4] && ((object)Reader.LocalName == (object)id19_IsMergeResult && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@IsMergeResult = System.Xml.XmlConvert.ToBoolean(Reader.Value); o.@IsMergeResultSpecified = true; paramsRead[4] = true; } else if (!paramsRead[5] && ((object)Reader.LocalName == (object)id20_SourceId && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@SourceId = System.Xml.XmlConvert.ToInt32(Reader.Value); o.@SourceIdSpecified = true; paramsRead[5] = true; } else if (!paramsRead[6] && ((object)Reader.LocalName == (object)id21_SourceUrl && (object)Reader.NamespaceURI == (object)id5_Item)) { o.@SourceUrl = Reader.Value; paramsRead[6] = true; } else if (!IsXmlnsAttribute(Reader.Name)) { UnknownNode((object)o, @":FileName, :MetadataType, :ID, :Ignore, :IsMergeResult, :SourceId, :SourceUrl"); } } Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip(); return(o); } Reader.ReadStartElement(); Reader.MoveToContent(); int whileIterations7 = 0; int readerCount7 = 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 whileIterations7, ref readerCount7); } ReadEndElement(); return(o); }