void IXmlSerializable.ReadXml (XmlReader reader) { if (reader.NodeType != XmlNodeType.Element || reader.LocalName != "Metadata" || reader.NamespaceURI != "http://schemas.xmlsoap.org/ws/2004/09/mex") throw new InvalidOperationException (String.Format ("Unexpected : <{0} ..", reader.LocalName)); /* Move to MetadataSections */ reader.Read (); MetadataSectionSerializer xs = new MetadataSectionSerializer (); while (reader.NodeType == XmlNodeType.Element && reader.LocalName == "MetadataSection" && reader.NamespaceURI == "http://schemas.xmlsoap.org/ws/2004/09/mex") { MetadataSection ms = (MetadataSection) xs.Deserialize (reader); MetadataSections.Add (ms); } }
static MetadataSection () { serializer = new MetadataSectionSerializer (); }