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,不會逸出) 或是純文字。

建構函式

TextSyndicationContent(String)

使用指定的文字,初始化 TextSyndicationContent 的新執行個體。

TextSyndicationContent(String, TextSyndicationContentKind)

使用指定的文字和 TextSyndicationContent,初始化 TextSyndicationContentKind 的新執行個體。

TextSyndicationContent(TextSyndicationContent)

使用指定的 TextSyndicationContent執行個體,初始化 TextSyndicationContent 的新執行個體。

屬性

AttributeExtensions

取得此內容的屬性延伸。

(繼承來源 SyndicationContent)
Text

取得 TextSyndicationContent 的文字。

Type

取得 TextSyndicationContent 的內容類型。

方法

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)

適用於