SyndicationItem.TryParseContent 方法

定義

嘗試剖析內容。

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

參數

reader
XmlReader

要從其中讀取的 XmlReader

contentType
String

內容的內容類型。

version
String

剖析期間要使用的新聞訂閱版本。

content
SyndicationContent

載入剖析內容的 SyndicationContent 執行個體。

傳回

指出是否已成功剖析內容的值。

備註

這個方法是延伸點,可讓您處理自訂內容的還原序列化作業。 若要執行這項動作,您必須自 SyndicationItem 衍生類別,並且覆寫這個方法。 這個方法是針對所有無法辨識的內容來呼叫。

適用於