Sdílet prostřednictvím


TextSyndicationContent Třída

Definice

Představuje jakýkoli SyndicationItem obsah určený k zobrazení koncovému uživateli.

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
Dědičnost
TextSyndicationContent

Příklady

Následující příklad ukazuje, jak použít TextSyndicationContent třídu .

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)

Poznámky

Textový obsah je HTML (s řídicími znaky), XHTML (platný kód XML a není u řídicího znaku) nebo prostý text.

Konstruktory

TextSyndicationContent(String)

Inicializuje novou instanci objektu TextSyndicationContent se zadaným textem.

TextSyndicationContent(String, TextSyndicationContentKind)

Inicializuje novou instanci objektu TextSyndicationContent se zadaným textem a TextSyndicationContentKind.

TextSyndicationContent(TextSyndicationContent)

Inicializuje novou instanci objektu TextSyndicationContent se zadanou TextSyndicationContent instancí.

Vlastnosti

AttributeExtensions

Získá rozšíření atributů pro tento obsah.

(Zděděno od SyndicationContent)
Text

Získá text objektu TextSyndicationContent.

Type

Získá typ obsahu objektu TextSyndicationContent.

Metody

Clone()

Vytvoří kopii existující SyndicationContent instance.

Equals(Object)

Určí, zda se zadaný objekt rovná aktuálnímu objektu.

(Zděděno od Object)
GetHashCode()

Slouží jako výchozí hashovací funkce.

(Zděděno od Object)
GetType()

Type Získá z aktuální instance.

(Zděděno od Object)
MemberwiseClone()

Vytvoří mělkou kopii aktuálního Objectsouboru .

(Zděděno od Object)
ToString()

Vrátí řetězec, který představuje aktuální objekt.

(Zděděno od Object)
WriteContentsTo(XmlWriter)

Zapíše obsah objektu do zadaného XmlWriterobjektu TextSyndicationContent .

WriteTo(XmlWriter, String, String)

Zapíše obsah tohoto objektu do zadaného XmlWriter v rámci zadaného prvku a oboru názvů elementu.

(Zděděno od SyndicationContent)

Platí pro