SyndicationFeedFormatter.TryParseContent 方法

定义

试图使用指定的 SyndicationItem 实例分析联合项内容。

protected public:
 static bool TryParseContent(System::Xml::XmlReader ^ reader, System::ServiceModel::Syndication::SyndicationItem ^ item, System::String ^ contentType, System::String ^ version, [Runtime::InteropServices::Out] System::ServiceModel::Syndication::SyndicationContent ^ % content);
protected internal static bool TryParseContent (System.Xml.XmlReader reader, System.ServiceModel.Syndication.SyndicationItem item, string contentType, string version, out System.ServiceModel.Syndication.SyndicationContent content);
static member TryParseContent : System.Xml.XmlReader * System.ServiceModel.Syndication.SyndicationItem * string * string * SyndicationContent -> bool
Protected Friend Shared Function TryParseContent (reader As XmlReader, item As SyndicationItem, contentType As String, version As String, ByRef content As SyndicationContent) As Boolean

参数

reader
XmlReader

要从其中进行读取的 XmlReader

item
SyndicationItem

要使用的 SyndicationItem 实例。

contentType
String

内容类型。

version
String

要在分析时使用的联合版本。

content
SyndicationContent

要分析的内容。

返回

如果已成功分析内容,则为 true;否则为 false

注解

若要控制分析联合内容的方式,可以从 SyndicationItem 派生您自己的类,并重写

TryParseContent(XmlReader, String, String, SyndicationContent) 方法。

适用于