protected static bool TryParseElement(XmlReader reader, ResourceCollectionInfo collection, string version) { if (collection == null) { throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("collection"); } return(collection.TryParseElement(reader, version)); }
protected static bool TryParseElement(XmlReader reader, ResourceCollectionInfo collection, string version) { if (collection == null) { throw new ArgumentNullException(nameof(collection)); } return(collection.TryParseElement(XmlReaderWrapper.CreateFromReader(reader), version)); }
protected internal virtual bool TryParseElement(XmlReader reader, string version) { if (reader == null) { throw new ArgumentNullException("reader"); } reader.MoveToContent(); if (reader.LocalName != "workspace" || reader.NamespaceURI != version) { return(false); } bool isEmpty = reader.IsEmptyElement; reader.ReadStartElement(); if (isEmpty) { return(true); } for (reader.MoveToContent(); reader.NodeType != XmlNodeType.EndElement; reader.MoveToContent()) { if (reader.LocalName == "title" && reader.NamespaceURI == Namespaces.Atom10) { Title = Atom10FeedFormatter.ReadTextSyndicationContent(reader); continue; } else if (reader.LocalName == "collection" && reader.NamespaceURI == version) { var rc = new ResourceCollectionInfo(); if (rc.TryParseElement(reader, version)) { Collections.Add(rc); continue; } } ElementExtensions.Add(new SyndicationElementExtension(reader)); } return(true); }
protected internal virtual bool TryParseElement(XmlReader reader, string version) { if (reader == null) throw new ArgumentNullException ("reader"); reader.MoveToContent (); if (reader.LocalName != "workspace" || reader.NamespaceURI != version) return false; bool isEmpty = reader.IsEmptyElement; reader.ReadStartElement (); if (isEmpty) return true; for (reader.MoveToContent (); reader.NodeType != XmlNodeType.EndElement; reader.MoveToContent ()) { if (reader.LocalName == "title" && reader.NamespaceURI == Namespaces.Atom10) { Title = Atom10FeedFormatter.ReadTextSyndicationContent (reader); continue; } else if (reader.LocalName == "collection" && reader.NamespaceURI == version) { var rc = new ResourceCollectionInfo (); if (rc.TryParseElement (reader, version)) { Collections.Add (rc); continue; } } ElementExtensions.Add (new SyndicationElementExtension (reader)); } return true; }
protected static bool TryParseElement(XmlReader reader, ResourceCollectionInfo collection, string version) { return(collection.TryParseElement(reader, version)); }
protected static bool TryParseElement(XmlReader reader, ResourceCollectionInfo collection, string version) { return collection.TryParseElement (reader, version); }
protected static bool TryParseElement(XmlReader reader, ResourceCollectionInfo collection, string version) { if (collection == null) { throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("collection"); } return collection.TryParseElement(reader, version); }