void Write23_CiscoIPPhoneError(string n, string ns, CiscoIPPhoneError 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(CiscoIPPhoneError)) { } else { throw CreateUnknownTypeException(o); } } WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(null, @""); WriteAttribute(@"Number", @"", System.Xml.XmlConvert.ToString((global::System.UInt16)((global::System.UInt16)o.@Number))); WriteEndElement(o); }
CiscoIPPhoneError Read23_CiscoIPPhoneError(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)id2_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } if (isNull) return null; CiscoIPPhoneError o; o = new CiscoIPPhoneError(); bool[] paramsRead = new bool[1]; while (Reader.MoveToNextAttribute()) { if (!paramsRead[0] && ((object) Reader.LocalName == (object)id34_Number && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Number = System.Xml.XmlConvert.ToUInt16(Reader.Value); paramsRead[0] = true; } else if (!IsXmlnsAttribute(Reader.Name)) { UnknownNode((object)o, @":Number"); } } Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip(); return o; } Reader.ReadStartElement(); Reader.MoveToContent(); int whileIterations1 = 0; int readerCount1 = 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 whileIterations1, ref readerCount1); } ReadEndElement(); return o; }