SyndicationItem 클래스

정의

RSS <item> 또는 Atom <entry>등의 피드 항목을 나타냅니다.

public ref class SyndicationItem
public class SyndicationItem
type SyndicationItem = class
Public Class SyndicationItem
상속
SyndicationItem

예제

다음 코드에서는 SyndicationItem 클래스를 사용하는 방법을 보여 줍니다.

SyndicationItem item = new SyndicationItem("My Item", "This is some content", new Uri("http://SomeServer/MyItem"), "Item ID", DateTime.Now);
item.Authors.Add(new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://contoso/jesper"));
item.Categories.Add(new SyndicationCategory("Category One"));
item.Contributors.Add(new SyndicationPerson("lene@contoso.com", "Lene Aaling", "http://contoso/lene"));
item.Copyright = new TextSyndicationContent("Copyright 2007");
item.Links.Add(new SyndicationLink(new Uri("http://OtherServer/Item"), "alternate", "Alternate Link", "text/html", 1000));
item.PublishDate = new DateTime(2007, 2, 23);
item.Summary = new TextSyndicationContent("this is a summary for my item");
XmlQualifiedName xqName = new XmlQualifiedName("itemAttrib", "http://FeedServer/tags");
item.AttributeExtensions.Add(xqName, "ItemAttribValue");

SyndicationFeed feed = new SyndicationFeed();
Collection<SyndicationItem> items = new Collection<SyndicationItem>();
items.Add(item);
feed.Items = items;
Dim item As SyndicationItem = New SyndicationItem("My Item", "This is some content", New Uri("http:' SomeServer/MyItem"), "Item ID", DateTime.Now)
item.Authors.Add(New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http:' contoso/jesper"))
item.Categories.Add(New SyndicationCategory("Category One"))
item.Contributors.Add(New SyndicationPerson("lene@contoso.com", "Lene Aaling", "http:' contoso/lene"))
item.Copyright = New TextSyndicationContent("Copyright 2007")
item.Links.Add(New SyndicationLink(New Uri("http:' OtherServer/Item"), "alternate", "Alternate Link", "text/html", 1000))
item.PublishDate = New DateTime(2007, 2, 23)
item.Summary = New TextSyndicationContent("this is a summary for my item")
Dim xqName As XmlQualifiedName = New XmlQualifiedName("itemAttrib", "http:' FeedServer/tags")
item.AttributeExtensions.Add(xqName, "ItemAttribValue")

Dim feed As SyndicationFeed = New SyndicationFeed()
Dim items As Collection(Of SyndicationItem) = New Collection(Of SyndicationItem)()
items.Add(item)
feed.Items = items

설명

Atom 1.0 SyndicationItem 으로 직렬화하면 인스턴스가 요소에 <entry> 기록됩니다. 다음 표에서는 정의된 SyndicationItem 각 속성이 Atom 1.0에 대해 serialize되는 방법을 보여줍니다.

SyndicationItem 속성 Serialize된 형식
AttributeExtensions 요소의 특성입니다 <entry> .
Authors <author> 컬렉션의 각 작성자의 요소입니다.
Categories <category> 요소입니다.
Content <content> 요소입니다.
Contributors <contributor> 컬렉션의 각 참가자에 대한 요소입니다.
Copyright 요소입니다<rights> .
ElementExtensions 요소의 요소입니다 <entry> .
Id 요소입니다 <id> .
LastUpdatedTime 요소입니다 <updated> .
Links <link> 컬렉션의 각 링크에 대한 요소입니다.
PublishDate <published> 요소입니다.
SourceFeed <source> 요소입니다.
Summary <summary> 요소입니다.
Title <title> 요소입니다.

RSS 2.0 SyndicationItem 으로 직렬화되면 인스턴스가 요소에 <item> 기록됩니다. 다음 표에서는 정의된 SyndicationItem 각 속성이 RSS 2.0에 대해 serialize되는 방법을 보여 줍니다.

SyndicationItem 속성 Serialize된 형식
AttributeExtensions 요소의 특성입니다 <item> .
Authors 컬렉션에 Authors 하나 SyndicationPerson 만 있으면 A <managingEditor> 이고, 그렇지 않으면 컬렉션의 <a10:author> 각 작성자의 요소입니다.
Categories <category> 요소입니다.
Content 요소입니다 <a10:content> .
Contributors <a10:contributor> 컬렉션의 각 SyndicationPerson 요소입니다Contributors.
Copyright <copyright> 요소입니다.
ElementExtensions 요소의 요소입니다 <item> .
Id 요소입니다 <a10:id> .
LastUpdatedTime 요소입니다 <a10:updated> .
Links <link> 컬렉션의 각 SyndicationLink 요소입니다Links.
PublishDate <pubDate> 요소입니다.
SourceFeed <source> 요소입니다.
Summary <description> 요소입니다.
Title <title> 요소입니다.

생성자

SyndicationItem()

SyndicationItem 클래스의 새 인스턴스를 초기화합니다.

SyndicationItem(String, String, Uri)

지정된 제목, 콘텐츠 및 링크를 사용하여 SyndicationItem 클래스의 새 인스턴스를 초기화합니다.

SyndicationItem(String, String, Uri, String, DateTimeOffset)

SyndicationItem 클래스의 새 인스턴스를 초기화합니다.

SyndicationItem(String, SyndicationContent, Uri, String, DateTimeOffset)

SyndicationItem 클래스의 새 인스턴스를 초기화합니다.

SyndicationItem(SyndicationItem)

지정된 SyndicationItem 인스턴스를 사용하여 SyndicationItem 클래스의 새 인스턴스를 초기화합니다.

속성

AttributeExtensions

배포 항목의 속성 확장을 가져옵니다.

Authors

배포 항목의 작성자를 가져옵니다.

BaseUri

SyndicationItem 인스턴스의 기본 URI(Uniform Resource Identifier)를 가져오거나 설정합니다.

Categories

배포 항목의 배포 범주를 가져옵니다.

Content

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

Contributors

배포 항목의 검토자를 가져옵니다.

Copyright

배포 항목의 저작권 정보를 가져오거나 설정합니다.

ElementExtensions

배포 항목에 포함된 요소 확장을 가져옵니다.

Id

배포 항목의 ID를 가져오거나 설정합니다.

LastUpdatedTime

배포 항목의 마지막 업데이트 시간을 가져오거나 설정합니다.

Links

배포 항목에 포함된 링크를 가져옵니다.

PublishDate

배포 항목의 게시 날짜를 가져오거나 설정합니다.

SourceFeed

배포 항목의 원본 피드를 가져오거나 설정합니다.

Summary

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

Title

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

메서드

AddPermalink(Uri)

SyndicationItem고정 링크 를 추가합니다.

Clone()

SyndicationItem 인스턴스의 복사본을 만듭니다.

CreateCategory()

새 범주를 만듭니다.

CreateLink()

SyndicationLink 인스턴스를 만듭니다.

CreatePerson()

새 사람을 만듭니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetAtom10Formatter()

Atom10FeedFormatter 인스턴스를 가져옵니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetRss20Formatter()

Rss20FeedFormatter 인스턴스를 가져옵니다.

GetRss20Formatter(Boolean)

Rss20FeedFormatter 인스턴스를 가져옵니다.

GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
Load(XmlReader)

지정된 SyndicationItem 에서 XmlReader인스턴스를 로드합니다.

Load<TSyndicationItem>(XmlReader)

지정된 SyndicationItem 에서 XmlReader파생 개체를 로드합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
SaveAsAtom10(XmlWriter)

배포 항목을 지정된 XmlWriter 에 Atom 1.0 형식으로 씁니다.

SaveAsRss20(XmlWriter)

배포 항목을 지정된 XmlWriter 에 RSS 2.0 형식으로 씁니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
TryParseAttribute(String, String, String, String)

특성 확장의 구문 분석을 시도합니다.

TryParseContent(XmlReader, String, String, SyndicationContent)

콘텐츠의 구문 분석을 시도합니다.

TryParseElement(XmlReader, String)

요소 확장의 구문 분석을 시도합니다.

WriteAttributeExtensions(XmlWriter, String)

지정된 배포 버전을 사용하여 지정된 XmlWriter에 특성 확장을 씁니다.

WriteElementExtensions(XmlWriter, String)

특정 배포 버전을 사용하여 지정된 XmlWriter 에 요소 확장을 씁니다.

적용 대상