SyndicationFeed.Description Propriedade
Definição
Obtém ou define uma descrição do feed.Gets or sets a description of the feed.
public:
property System::ServiceModel::Syndication::TextSyndicationContent ^ Description { System::ServiceModel::Syndication::TextSyndicationContent ^ get(); void set(System::ServiceModel::Syndication::TextSyndicationContent ^ value); };
public System.ServiceModel.Syndication.TextSyndicationContent Description { get; set; }
member this.Description : System.ServiceModel.Syndication.TextSyndicationContent with get, set
Public Property Description As TextSyndicationContent
Valor da propriedade
Um TextSyndicationContent objeto que representa a descrição do feed.A TextSyndicationContent object that represents the description of the feed.
Exemplos
O código a seguir mostra como definir o Description de um SyndicationFeed .The following code shows how to set the Description of a SyndicationFeed.
List<SyndicationItem> items = new List<SyndicationItem>();
SyndicationItem item1 = new SyndicationItem();
item1.Title = new TextSyndicationContent("Item 1");
item1.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 1");
items.Add(item1);
SyndicationItem item2 = new SyndicationItem();
item2.Title = new TextSyndicationContent("Item 2");
item2.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 2");
items.Add(item2);
SyndicationFeed feed = new SyndicationFeed(items);
feed.Description = new TextSyndicationContent("This is a feed description");
Dim items As New List(Of SyndicationItem)()
Dim item1 As New SyndicationItem()
item1.Title = New TextSyndicationContent("Item 1")
item1.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 1")
items.Add(item1)
Dim item2 As New SyndicationItem()
item2.Title = New TextSyndicationContent("Item 2")
item2.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 2")
items.Add(item2)
Dim feed As New SyndicationFeed(items)
feed.Description = New TextSyndicationContent("This is a feed description")
O XML a seguir mostra como o Description é serializado para Atom 1,0.The following XML shows how Description is serialized to Atom 1.0.
<subtitle type="text">This is a sample feed</subtitle>
O XML a seguir mostra como o Description é serializado para RSS 2,0.The following XML shows how Description is serialized to RSS 2.0.
<description>Este é um feed de exemplo</description>
Comentários
Quando serializado para Atom 1,0, Description é gravado em um <subtitle> elemento.When serialized to Atom 1.0, Description is written to a <subtitle> element.
Quando serializado para RSS 2,0, Description é gravado em um <description> elemento.When serialized to RSS 2.0, Description is written to a <description> element.