Atom10FeedFormatter.ReadItems(XmlReader, SyndicationFeed, Boolean) 方法
定义
从指定的 SyndicationItem 读入 XmlReader 实例的集合。Reads in a collection of SyndicationItem instances from the specified XmlReader.
protected:
virtual System::Collections::Generic::IEnumerable<System::ServiceModel::Syndication::SyndicationItem ^> ^ ReadItems(System::Xml::XmlReader ^ reader, System::ServiceModel::Syndication::SyndicationFeed ^ feed, [Runtime::InteropServices::Out] bool % areAllItemsRead);
protected virtual System.Collections.Generic.IEnumerable<System.ServiceModel.Syndication.SyndicationItem> ReadItems (System.Xml.XmlReader reader, System.ServiceModel.Syndication.SyndicationFeed feed, out bool areAllItemsRead);
abstract member ReadItems : System.Xml.XmlReader * System.ServiceModel.Syndication.SyndicationFeed * bool -> seq<System.ServiceModel.Syndication.SyndicationItem>
override this.ReadItems : System.Xml.XmlReader * System.ServiceModel.Syndication.SyndicationFeed * bool -> seq<System.ServiceModel.Syndication.SyndicationItem>
Protected Overridable Function ReadItems (reader As XmlReader, feed As SyndicationFeed, ByRef areAllItemsRead As Boolean) As IEnumerable(Of SyndicationItem)
参数
- feed
- SyndicationFeed
要用于创建 SyndicationFeed 实例的 SyndicationItem 实例。The SyndicationFeed instance to use to create the SyndicationItem instances.
- areAllItemsRead
- Boolean
一个指定是否已从 SyndicationItem 实例读取所有 XmlReader 实例的值。A value that specifies whether all of the SyndicationItem instances have been read from the XmlReader instance.
返回
SyndicationItem 实例的集合。A collection of SyndicationItem instances.
注解
此方法不会将新创建的 SyndicationItem 实例添加到 SyndicationFeed,因为此操作是由该方法的调用方来完成的。This method does not add the newly created SyndicationItem instances to the SyndicationFeed, because this is done by the caller of the method. 此方法为派生自 Atom10FeedFormatter 的类提供了一个扩展点,用于自定义反序列化 Atom 项的方式。This method provides an extensibility point for classes derived from Atom10FeedFormatter to customize how the Atom entries get deserialized. 例如,派生类可以将读取 Atom 项延迟到调用方访问该项之后。For instance, derived classes could delay the reading of the Atom entry until the caller accesses the entry.