SyndicationItem.Content 속성

정의

배포 항목의 내용을 가져오거나 설정합니다.

public:
 property System::ServiceModel::Syndication::SyndicationContent ^ Content { System::ServiceModel::Syndication::SyndicationContent ^ get(); void set(System::ServiceModel::Syndication::SyndicationContent ^ value); };
public System.ServiceModel.Syndication.SyndicationContent Content { get; set; }
member this.Content : System.ServiceModel.Syndication.SyndicationContent with get, set
Public Property Content As SyndicationContent

속성 값

SyndicationContent

배포 항목의 내용을 포함하는 SyndicationContent 인스턴스입니다.

예제

다음 코드에서는 콘텐츠를 에 추가하는 방법을 보여 있습니다 SyndicationItem.

SyndicationItem item = new SyndicationItem("Item Title", "Item Content", new Uri("http://Item/Alternate/Link"));
item.Content = new TextSyndicationContent("This is the content of the syndication item");
Dim item As New SyndicationItem("Item Title", "Item Content", New Uri("http:' Item/Alternate/Link"))
item.Content = New TextSyndicationContent("This is the content of the syndication item")

다음 XML에서는 속성이 Content Atom 1.0에 대해 serialize되는 방법을 보여 있습니다.

TextSyndicationContent 는 다음 예제와 같이 serialize됩니다.

<content type="text">This is some content</content>  

UrlSyndicationContent 는 다음 예제와 같이 serialize됩니다.

<content type="text/html" src="http://myurl/" />  

XmlSyndicationContent 는 다음 예제와 같이 serialize됩니다.

<content type="MyXMLType">  
    <mg:MyElement xmlns:mg="http://migree/elements">This is some text</mg:MyElement>  
</content>  

다음 XML은 속성이 Content RSS 2.0에 대해 serialize되는 방법을 보여 줍니다.

TextSyndicationContent 는 다음 예제와 같이 serialize됩니다.

<description>This is some content</description>  

UrlSyndicationContent 는 다음 예제와 같이 serialize됩니다.

<a10:content type="text/html" src="http://myurl/" />  

XmlSyndicationContent 는 다음 예제와 같이 serialize됩니다.

<a10:content type="MyXMLType">  
    <mg:MyElement xmlns:mg="http://migree/elements">This is some text</mg:MyElement>  
</a10:content>  

설명

SyndicationContent 는 모든 배포 콘텐츠 형식에 대한 기본 클래스입니다. .NET Framework 3.5는 다음과 같은 배포 콘텐츠 형식을 정의합니다.

이러한 콘텐츠 형식(또는 파생된 SyndicationContent사용자 정의 형식)에 이 속성을 할당할 수 있습니다.

Atom 1.0의 Content 경우 속성이 요소로 <content> 직렬화됩니다.

For RSS 2.0, the Content property is serialized to a <description> element for TextSyndicationContent, a <a10:content> element for UrlSyndicationContent and XmlSyndicationContent.

적용 대상