SyndicationFeed.Description 속성

정의

피드에 대한 설명을 가져오거나 설정합니다.

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

속성 값

TextSyndicationContent

피드에 대한 설명을 나타내는 TextSyndicationContent 개체입니다.

예제

다음 코드에서는 DescriptionSyndicationFeed를 설정하는 방법을 보여 줍니다.

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")

다음 XML에서는 Description이 Atom 1.0으로 serialize되는 방법을 보여 줍니다.

<subtitle type="text">This is a sample feed</subtitle>

다음 XML에서는 Description이 RSS 2.0으로 serialize되는 방법을 보여 줍니다.

<description>샘플 피드입니다.</description>

설명

Atom 1.0 Description 으로 serialize되면 요소에 <subtitle> 기록됩니다.

RSS 2.0 Description 으로 serialize되는 경우 요소에 <description> 기록됩니다.

적용 대상