SyndicationItem Konstruktoren

Definition

Initialisiert eine neue Instanz der SyndicationItem-Klasse.

Überlädt

SyndicationItem()

Initialisiert eine neue Instanz der SyndicationItem-Klasse.

SyndicationItem(SyndicationItem)

Initialisiert eine neue Instanz der SyndicationItem-Klasse mit der angegebenen SyndicationItem-Instanz.

SyndicationItem(String, String, Uri)

Initialisiert eine neue Instanz der SyndicationItem-Klasse mit dem angegebenen Titel, Inhalt und Link.

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

Initialisiert eine neue Instanz der SyndicationItem-Klasse.

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

Initialisiert eine neue Instanz der SyndicationItem-Klasse.

SyndicationItem()

Initialisiert eine neue Instanz der SyndicationItem-Klasse.

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

Gilt für

SyndicationItem(SyndicationItem)

Initialisiert eine neue Instanz der SyndicationItem-Klasse mit der angegebenen SyndicationItem-Instanz.

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)

Parameter

source
SyndicationItem

Eine SyndicationItem-Instanz für die Initialisierung der neuen SyndicationItem-Instanz.

Gilt für

SyndicationItem(String, String, Uri)

Initialisiert eine neue Instanz der SyndicationItem-Klasse mit dem angegebenen Titel, Inhalt und Link.

public:
 SyndicationItem(System::String ^ title, System::String ^ content, Uri ^ itemAlternateLink);
public:
 SyndicationItem(System::String ^ title, System::String ^ content, Uri ^ feedAlternateLink);
public SyndicationItem (string title, string content, Uri itemAlternateLink);
public SyndicationItem (string title, string content, Uri feedAlternateLink);
new System.ServiceModel.Syndication.SyndicationItem : string * string * Uri -> System.ServiceModel.Syndication.SyndicationItem
new System.ServiceModel.Syndication.SyndicationItem : string * string * Uri -> System.ServiceModel.Syndication.SyndicationItem
Public Sub New (title As String, content As String, itemAlternateLink As Uri)
Public Sub New (title As String, content As String, feedAlternateLink As Uri)

Parameter

title
String

Der Elementtitel.

content
String

Der Elementinhalt.

itemAlternateLinkfeedAlternateLink
Uri

Die Element-URL.

Beispiele

Im folgenden Beispiel wird der Aufruf dieses Konstruktors veranschaulicht.

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

Gilt für

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

Initialisiert eine neue Instanz der SyndicationItem-Klasse.

public:
 SyndicationItem(System::String ^ title, System::ServiceModel::Syndication::SyndicationContent ^ content, Uri ^ itemAlternateLink, System::String ^ id, DateTimeOffset lastUpdatedTime);
public:
 SyndicationItem(System::String ^ title, System::ServiceModel::Syndication::SyndicationContent ^ content, Uri ^ feedAlternateLink, System::String ^ id, DateTimeOffset lastUpdatedTime);
public SyndicationItem (string title, System.ServiceModel.Syndication.SyndicationContent content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime);
public SyndicationItem (string title, System.ServiceModel.Syndication.SyndicationContent content, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime);
new System.ServiceModel.Syndication.SyndicationItem : string * System.ServiceModel.Syndication.SyndicationContent * Uri * string * DateTimeOffset -> System.ServiceModel.Syndication.SyndicationItem
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)
Public Sub New (title As String, content As SyndicationContent, feedAlternateLink As Uri, id As String, lastUpdatedTime As DateTimeOffset)

Parameter

title
String

Der Titel des Syndication-Elements.

content
SyndicationContent

Eine SyndicationContent-Instanz mit dem Inhalt des Syndication-Elements.

itemAlternateLinkfeedAlternateLink
Uri

Die alternative URI für das Syndication-Element.

id
String

Die ID des Syndication-Elements.

lastUpdatedTime
DateTimeOffset

Der DateTimeOffset, der den Zeitpunkt der letzten Aktualisierung des Syndication-Elements enthält.

Beispiele

Das folgende Codebeispiel zeigt, wie dieser Konstruktor aufgerufen wird.

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)

Gilt für

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

Initialisiert eine neue Instanz der SyndicationItem-Klasse.

public:
 SyndicationItem(System::String ^ title, System::String ^ content, Uri ^ itemAlternateLink, System::String ^ id, DateTimeOffset lastUpdatedTime);
public:
 SyndicationItem(System::String ^ title, System::String ^ content, Uri ^ feedAlternateLink, System::String ^ id, DateTimeOffset lastUpdatedTime);
public SyndicationItem (string title, string content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime);
public SyndicationItem (string title, string content, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime);
new System.ServiceModel.Syndication.SyndicationItem : string * string * Uri * string * DateTimeOffset -> System.ServiceModel.Syndication.SyndicationItem
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)
Public Sub New (title As String, content As String, feedAlternateLink As Uri, id As String, lastUpdatedTime As DateTimeOffset)

Parameter

title
String

Der Titel des Syndication-Elements.

content
String

Der Inhalt des Syndication-Elements.

itemAlternateLinkfeedAlternateLink
Uri

Die alternative URI für das Syndication-Element.

id
String

Die ID des Syndication-Elements.

lastUpdatedTime
DateTimeOffset

Der DateTimeOffset, der den Zeitpunkt der letzten Aktualisierung des Syndication-Elements enthält.

Beispiele

Das folgende Codebeispiel zeigt, wie dieser Konstruktor aufgerufen wird.

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)

Gilt für