共用方式為


SyndicationItem 建構函式

定義

初始化 SyndicationItem 類別的新執行個體。

多載

SyndicationItem()

初始化 SyndicationItem 類別的新執行個體。

SyndicationItem(SyndicationItem)

使用指定的 SyndicationItem 執行個體,初始化 SyndicationItem 類別的新執行個體。

SyndicationItem(String, String, Uri)

使用指定的標題、內容和連結,初始化 SyndicationItem 類別的新執行個體。

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

初始化 SyndicationItem 類別的新執行個體。

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

初始化 SyndicationItem 類別的新執行個體。

SyndicationItem()

來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs

初始化 SyndicationItem 類別的新執行個體。

public:
 SyndicationItem();
public SyndicationItem ();
Public Sub New ()

適用於

SyndicationItem(SyndicationItem)

來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs

使用指定的 SyndicationItem 執行個體,初始化 SyndicationItem 類別的新執行個體。

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)

參數

source
SyndicationItem

用來初始化新 SyndicationItem 執行個體的 SyndicationItem 執行個體。

適用於

SyndicationItem(String, String, Uri)

來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs

使用指定的標題、內容和連結,初始化 SyndicationItem 類別的新執行個體。

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)

參數

title
String

項目標題。

content
String

項目內容。

itemAlternateLink
Uri

項目 URL。

範例

下列範例將示範如何呼叫這個建構函式。

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

適用於

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

來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs

初始化 SyndicationItem 類別的新執行個體。

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)

參數

title
String

新聞訂閱項目的標題。

content
SyndicationContent

包含新聞訂閱項目內容的 SyndicationContent 執行個體。

itemAlternateLink
Uri

新聞訂閱項目的替代 URI。

id
String

新聞訂閱項目的 ID。

lastUpdatedTime
DateTimeOffset

包含上次已更新新聞訂閱項目的 DateTimeOffset

範例

下列程式碼會示範如何呼叫這個建構函式。

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)

適用於

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

來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs
來源:
SyndicationItem.cs

初始化 SyndicationItem 類別的新執行個體。

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)

參數

title
String

新聞訂閱項目的標題。

content
String

新聞訂閱項目的內容。

itemAlternateLink
Uri

新聞訂閱項目的替代 URI。

id
String

新聞訂閱項目的 ID。

lastUpdatedTime
DateTimeOffset

包含上次已更新新聞訂閱項目的 DateTimeOffset

範例

下列程式碼會示範如何呼叫這個建構函式。

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)

適用於