SyndicationItem Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the SyndicationItem class.
Overloads
SyndicationItem() |
Initializes a new instance of the SyndicationItem class. |
SyndicationItem(SyndicationItem) |
Initializes a new instance of the SyndicationItem class with the specified SyndicationItem instance. |
SyndicationItem(String, String, Uri) |
Initializes a new instance of the SyndicationItem class with the specified title, content, and link. |
SyndicationItem(String, SyndicationContent, Uri, String, DateTimeOffset) |
Initializes a new instance of the SyndicationItem class. |
SyndicationItem(String, String, Uri, String, DateTimeOffset) |
Initializes a new instance of the SyndicationItem class. |
SyndicationItem()
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
Initializes a new instance of the SyndicationItem class.
public:
SyndicationItem();
public SyndicationItem ();
Public Sub New ()
Applies to
SyndicationItem(SyndicationItem)
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
Initializes a new instance of the SyndicationItem class with the specified SyndicationItem instance.
protected:
SyndicationItem(System::ServiceModel::Syndication::SyndicationItem ^ source);
protected SyndicationItem (System.ServiceModel.Syndication.SyndicationItem source);
new System.ServiceModel.Syndication.SyndicationItem : System.ServiceModel.Syndication.SyndicationItem -> System.ServiceModel.Syndication.SyndicationItem
Protected Sub New (source As SyndicationItem)
Parameters
- source
- SyndicationItem
A SyndicationItem instance used to initialize the new SyndicationItem instance.
Applies to
SyndicationItem(String, String, Uri)
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
Initializes a new instance of the SyndicationItem class with the specified title, content, and link.
public:
SyndicationItem(System::String ^ title, System::String ^ content, Uri ^ itemAlternateLink);
public SyndicationItem (string title, string content, Uri itemAlternateLink);
new System.ServiceModel.Syndication.SyndicationItem : string * string * Uri -> System.ServiceModel.Syndication.SyndicationItem
Public Sub New (title As String, content As String, itemAlternateLink As Uri)
Parameters
- title
- String
The item title.
- content
- String
The item content.
- itemAlternateLink
- Uri
The item URL.
Examples
The following example shows how to call this constructor.
SyndicationItem item = new SyndicationItem("My Item", "This is some content", new Uri("http://SomeServer/MyItem"));
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 item As SyndicationItem = New SyndicationItem("My Item", "This is some content", New Uri("http:' SomeServer/MyItem"))
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")
Applies to
SyndicationItem(String, SyndicationContent, Uri, String, DateTimeOffset)
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
Initializes a new instance of the SyndicationItem class.
public:
SyndicationItem(System::String ^ title, System::ServiceModel::Syndication::SyndicationContent ^ content, Uri ^ itemAlternateLink, System::String ^ id, DateTimeOffset lastUpdatedTime);
public SyndicationItem (string title, System.ServiceModel.Syndication.SyndicationContent content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime);
new System.ServiceModel.Syndication.SyndicationItem : string * System.ServiceModel.Syndication.SyndicationContent * Uri * string * DateTimeOffset -> System.ServiceModel.Syndication.SyndicationItem
Public Sub New (title As String, content As SyndicationContent, itemAlternateLink As Uri, id As String, lastUpdatedTime As DateTimeOffset)
Parameters
- title
- String
The title of the syndication item.
- content
- SyndicationContent
A SyndicationContent instance containing the content of the syndication item.
- itemAlternateLink
- Uri
The alternate URI for the syndication item.
- id
- String
The ID of the syndication item.
- lastUpdatedTime
- DateTimeOffset
The DateTimeOffset that contains the last time the syndication item was last updated.
Examples
The following code shows how to call this constructor.
TextSyndicationContent content = new TextSyndicationContent("Item Content");
Uri uri = new Uri("http://Item/Alternate/Link");
SyndicationItem item = new SyndicationItem("Item Title", content, uri, "itemID", DateTimeOffset.Now);
Dim content As New TextSyndicationContent("Item Content")
Dim uri As New Uri("http:' Item/Alternate/Link")
Dim item As New SyndicationItem("Item Title", content, uri, "itemID", DateTimeOffset.Now)
Applies to
SyndicationItem(String, String, Uri, String, DateTimeOffset)
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
Initializes a new instance of the SyndicationItem class.
public:
SyndicationItem(System::String ^ title, System::String ^ content, Uri ^ itemAlternateLink, System::String ^ id, DateTimeOffset lastUpdatedTime);
public SyndicationItem (string title, string content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime);
new System.ServiceModel.Syndication.SyndicationItem : string * string * Uri * string * DateTimeOffset -> System.ServiceModel.Syndication.SyndicationItem
Public Sub New (title As String, content As String, itemAlternateLink As Uri, id As String, lastUpdatedTime As DateTimeOffset)
Parameters
- title
- String
The title of the syndication item.
- content
- String
The content of the syndication item.
- itemAlternateLink
- Uri
The alternate URI for the syndication item.
- id
- String
The ID of the syndication item.
- lastUpdatedTime
- DateTimeOffset
The DateTimeOffset that contains the last time the syndication item was last updated.
Examples
The following code shows how to call this constructor.
SyndicationItem item = new SyndicationItem("Item Title", "Item Content", new Uri("http://Item/Alternate/Link"), "itemID", DateTimeOffset.Now);
Dim item As New SyndicationItem("Item Title", "Item Content", New Uri("http:' Item/Alternate/Link"), "itemID", DateTimeOffset.Now)