Ejemplo n.º 1
0
 void Write9_Item(string n, string ns, CiscoIPPhoneTouchAreaMenuItemType 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(CiscoIPPhoneTouchAreaMenuItemType)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"CiscoIPPhoneTouchAreaMenuItemType", @"");
     WriteNullableStringLiteral(@"Name", @"", ((global::System.String)o.@Name));
     WriteNullableStringLiteral(@"URL", @"", ((global::System.String)o.@URL));
     Write8_CiscoIPPhoneTouchArea(@"TouchArea", @"", ((CiscoIPPhoneTouchArea)o.@TouchArea), false, false);
     WriteEndElement(o);
 }
Ejemplo n.º 2
0
 CiscoIPPhoneTouchAreaMenuItemType Read9_Item(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)id8_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) {
     }
     else
         throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType);
     }
     if (isNull) return null;
     CiscoIPPhoneTouchAreaMenuItemType o;
     o = new CiscoIPPhoneTouchAreaMenuItemType();
     bool[] paramsRead = new bool[3];
     while (Reader.MoveToNextAttribute()) {
         if (!IsXmlnsAttribute(Reader.Name)) {
             UnknownNode((object)o);
         }
     }
     Reader.MoveToElement();
     if (Reader.IsEmptyElement) {
         Reader.Skip();
         return o;
     }
     Reader.ReadStartElement();
     Reader.MoveToContent();
     int whileIterations11 = 0;
     int readerCount11 = 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)id46_Name && (object) Reader.NamespaceURI == (object)id2_Item)) {
                 if (ReadNull()) {
                     o.@Name = null;
                 }
                 else {
                     o.@Name = Reader.ReadElementString();
                 }
                 paramsRead[0] = true;
             }
             else if (!paramsRead[1] && ((object) Reader.LocalName == (object)id38_URL && (object) Reader.NamespaceURI == (object)id2_Item)) {
                 if (ReadNull()) {
                     o.@URL = null;
                 }
                 else {
                     o.@URL = Reader.ReadElementString();
                 }
                 paramsRead[1] = true;
             }
             else if (!paramsRead[2] && ((object) Reader.LocalName == (object)id58_TouchArea && (object) Reader.NamespaceURI == (object)id2_Item)) {
                 o.@TouchArea = Read8_CiscoIPPhoneTouchArea(false, true);
                 paramsRead[2] = true;
             }
             else {
                 UnknownNode((object)o, @":Name, :URL, :TouchArea");
             }
         }
         else {
             UnknownNode((object)o, @":Name, :URL, :TouchArea");
         }
         Reader.MoveToContent();
         CheckReaderCount(ref whileIterations11, ref readerCount11);
     }
     ReadEndElement();
     return o;
 }