共用方式為


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) 方法。

適用於