語言

TextSyndicationContent 類別

定義

代表任何 SyndicationItem 旨在顯示給最終使用者的內容。

public ref class TextSyndicationContent : System::ServiceModel::Syndication::SyndicationContent
public class TextSyndicationContent : System.ServiceModel.Syndication.SyndicationContent
type TextSyndicationContent = class
    inherit SyndicationContent
Public Class TextSyndicationContent
Inherits SyndicationContent
繼承
TextSyndicationContent

範例

以下範例示範如何使用這個 TextSyndicationContent 類別。

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);

feed.Copyright = new TextSyndicationContent("Copyright 2007");
feed.Description = new TextSyndicationContent("This is a sample feed");

TextSyndicationContent textContent = new TextSyndicationContent("Some text content");
SyndicationItem item = new SyndicationItem("Item Title", textContent, new Uri("http://server/items"), "ItemID", DateTime.Now);
Dim feed As SyndicationFeed = New SyndicationFeed("Feed Title", "Feed Description", New Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now)

feed.Copyright = New TextSyndicationContent("Copyright 2007")
feed.Description = New TextSyndicationContent("This is a sample feed")

Dim textContent As TextSyndicationContent = New TextSyndicationContent("Some text content")
Dim item As SyndicationItem = New SyndicationItem("Item Title", textContent, New Uri("http://server/items"), "ItemID", DateTime.Now)

備註

文字內容包括 HTML(帶有轉義標記)、XHTML(有效 XML,且不轉義)或純文字。

建構函式

名稱 Description
TextSyndicationContent(String, TextSyndicationContentKind)

初始化一個新的實例 TextSyndicationContent ,包含指定的文字與 TextSyndicationContentKind。

TextSyndicationContent(String)

初始化一個新的 實 TextSyndicationContent 例,包含指定的文字。

TextSyndicationContent(TextSyndicationContent)

初始化一個新的實例 TextSyndicationContent ,使用指定的 TextSyndicationContent 實例。

屬性

名稱 Description
AttributeExtensions

取得這些內容的屬性擴充功能。

(繼承來源 SyndicationContent)
Text

取得 TextSyndicationContent.

Type

取得 的內容類型 TextSyndicationContent。

方法

名稱 Description
Clone()

建立現有 SyndicationContent 實例的副本。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetType()

取得目前實例的 Type。

(繼承來源 Object)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)
WriteContentsTo(XmlWriter)

將 的內容 TextSyndicationContent 寫入指定的 XmlWriter。

WriteTo(XmlWriter, String, String)

將該物件的內容寫入 XmlWriter 指定的元素及元素命名空間內的指定物件。

(繼承來源 SyndicationContent)

適用於