SyndicationItem Class

 

Represents a feed item, for example an RSS <item> or an Atom <entry>.

Namespace:   System.ServiceModel.Syndication
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

System.Object
  System.ServiceModel.Syndication.SyndicationItem

Public Class SyndicationItem

NameDescription
System_CAPS_pubmethodSyndicationItem()

Initializes a new instance of the SyndicationItem class.

System_CAPS_pubmethodSyndicationItem(String, String, Uri)

Initializes a new instance of the SyndicationItem class with the specified title, content, and link.

System_CAPS_pubmethodSyndicationItem(String, String, Uri, String, DateTimeOffset)

Initializes a new instance of the SyndicationItem class.

System_CAPS_pubmethodSyndicationItem(String, SyndicationContent, Uri, String, DateTimeOffset)

Initializes a new instance of the SyndicationItem class.

System_CAPS_protmethodSyndicationItem(SyndicationItem)

Initializes a new instance of the SyndicationItem class with the specified SyndicationItem instance.

NameDescription
System_CAPS_pubpropertyAttributeExtensions

Gets the attribute extensions for the syndication item.

System_CAPS_pubpropertyAuthors

Gets the authors of the syndication item.

System_CAPS_pubpropertyBaseUri

Gets and sets the base Uniform Resource Identifier (URI) for the SyndicationItem instance.

System_CAPS_pubpropertyCategories

Gets the syndication categories for the syndication item.

System_CAPS_pubpropertyContent

Gets and sets the content of the syndication item.

System_CAPS_pubpropertyContributors

Gets the contributors of the syndication item.

System_CAPS_pubpropertyCopyright

Gets and sets the copyright information for the syndication item.

System_CAPS_pubpropertyElementExtensions

Gets the element extensions contained in the syndication item.

System_CAPS_pubpropertyId

Gets and sets the ID of the syndication item.

System_CAPS_pubpropertyLastUpdatedTime

Gets and sets the last updated time for the syndication item.

System_CAPS_pubpropertyLinks

Gets the links contained in the syndication item.

System_CAPS_pubpropertyPublishDate

Gets and sets the publish date for the syndication item.

System_CAPS_pubpropertySourceFeed

Gets and sets the source feed of the syndication item.

System_CAPS_pubpropertySummary

Gets and sets the summary of the syndication item.

System_CAPS_pubpropertyTitle

Gets and sets the title of the syndication item.

NameDescription
System_CAPS_pubmethodAddPermalink(Uri)

Adds a permalink to the SyndicationItem.

System_CAPS_pubmethodClone()

Creates a copy of the SyndicationItem instance.

System_CAPS_protmethodCreateCategory()

Creates a new category.

System_CAPS_protmethodCreateLink()

Creates a new SyndicationLink instance.

System_CAPS_protmethodCreatePerson()

Creates a new person.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetAtom10Formatter()

Gets an Atom10FeedFormatter instance.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetRss20Formatter()

Gets an Rss20FeedFormatter instance.

System_CAPS_pubmethodGetRss20Formatter(Boolean)

Gets an Rss20FeedFormatter instance.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticLoad(XmlReader)

Loads a SyndicationItem instance from the specified XmlReader.

System_CAPS_pubmethodSystem_CAPS_staticLoad(Of TSyndicationItem)(XmlReader)

Loads a SyndicationItem derived object from the specified XmlReader.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodSaveAsAtom10(XmlWriter)

Write the syndication item to the specified XmlWriter in Atom 1.0 format.

System_CAPS_pubmethodSaveAsRss20(XmlWriter)

Write the syndication item to the specified XmlWriter in RSS 2.0 format.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_protmethodTryParseAttribute(String, String, String, String)

Attempts to parse an attribute extension.

System_CAPS_protmethodTryParseContent(XmlReader, String, String, SyndicationContent)

Attempts to parse content.

System_CAPS_protmethodTryParseElement(XmlReader, String)

Attempts to parse an element extension.

System_CAPS_protmethodWriteAttributeExtensions(XmlWriter, String)

Writes the attribute extensions to the specified XmlWriter using the specified syndication version.

System_CAPS_protmethodWriteElementExtensions(XmlWriter, String)

Writes the element extensions to the specified XmlWriter using the specific syndication version.

When serialized to Atom 1.0, a SyndicationItem instance is written to an <entry> element. The following table shows how each property defined for SyndicationItem is serialized for Atom 1.0.

SyndicationItem property

Serialized form

AttributeExtensions

Attribute in the <entry> element.

Authors

An <author> element for each author in the collection.

Categories

A<category> element.

Content

A<content> element.

Contributors

A<contributor> element for each contributor in the collection.

Copyright

A<rights> element.

ElementExtensions

Element in the <entry> element.

Id

An <id> element.

LastUpdatedTime

An <updated> element.

Links

A <link> element for each link in the collection.

PublishDate

A <published> element.

SourceFeed

A <source> element.

Summary

A <summary> element.

Title

A <title> element.

When serialized to RSS 2.0, a SyndicationItem instance is written to an <item> element. The following table shows how each property defined for SyndicationItem is serialized for RSS 2.0.

SyndicationItem property

Serialized form

AttributeExtensions

Attribute in the <item> element.

Authors

A <managingEditor> if only one SyndicationPerson is in the Authors collection; otherwise, the <a10:author> element for each author in the collection.

Categories

A <category> element.

Content

An <a10:content> element.

Contributors

An <a10:contributor> element for each SyndicationPerson in the Contributors collection.

Copyright

A <copyright> element.

ElementExtensions

Element in the <item> element.

Id

An <a10:id> element.

LastUpdatedTime

An <a10:updated> element.

Links

A <link> element for each SyndicationLink in the Links collection.

PublishDate

A <pubDate> element.

SourceFeed

A <source> element.

Summary

A <description> element.

Title

A <title> element.

The following code shows how to use the SyndicationItem class.

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

.NET Framework
Available since 3.5
Silverlight
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: