Rediger

Del via


TextSyndicationContent Class

Definition

Represents any SyndicationItem content intended to be displayed to an end user.

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
Inheritance
TextSyndicationContent

Examples

The following example demonstrates how to use the TextSyndicationContent class.

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)

Remarks

Text content is HTML (with escaped markup), XHTML (valid XML, and is not escaped), or plain text.

Constructors

TextSyndicationContent(String, TextSyndicationContentKind)

Initializes a new instance of the TextSyndicationContent with the specified text and TextSyndicationContentKind.

TextSyndicationContent(String)

Initializes a new instance of the TextSyndicationContent with the specified text.

TextSyndicationContent(TextSyndicationContent)

Initializes a new instance of the TextSyndicationContent with the specified TextSyndicationContent instance.

Properties

AttributeExtensions

Gets the attribute extensions for this content.

(Inherited from SyndicationContent)
Text

Gets the text of the TextSyndicationContent.

Type

Gets the content type of the TextSyndicationContent.

Methods

Clone()

Creates a copy of the existing SyndicationContent instance.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
WriteContentsTo(XmlWriter)

Writes the contents of the TextSyndicationContent to the specified XmlWriter.

WriteTo(XmlWriter, String, String)

Writes the contents of this object to the specified XmlWriter within the specified element and element namespace.

(Inherited from SyndicationContent)

Applies to