SyndicationFeed Constructors
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Initialiseert een nieuw exemplaar van de SyndicationFeed klasse.
Overloads
| Name | Description |
|---|---|
| SyndicationFeed() |
Initialiseert een nieuw exemplaar van de SyndicationFeed klasse. |
| SyndicationFeed(IEnumerable<SyndicationItem>) |
Initialiseert een nieuw exemplaar van de SyndicationFeed klasse met de opgegeven verzameling SyndicationItem objecten. |
| SyndicationFeed(SyndicationFeed, Boolean) |
Hiermee maakt u een nieuw exemplaar van de SyndicationFeed klasse met de opgegeven feed. |
| SyndicationFeed(String, String, Uri) |
Initialiseert een nieuw exemplaar van de SyndicationFeed klasse met de opgegeven titel, beschrijving en URI (Uniform Resource Identifier). |
| SyndicationFeed(String, String, Uri, IEnumerable<SyndicationItem>) |
Initialiseert een nieuw exemplaar van de SyndicationFeed klasse met de opgegeven titel, beschrijving, URI en verzameling SyndicationItem objecten. |
| SyndicationFeed(String, String, Uri, String, DateTimeOffset) |
Hiermee maakt u een nieuw exemplaar van de SyndicationFeed klasse. |
| SyndicationFeed(String, String, Uri, String, DateTimeOffset, IEnumerable<SyndicationItem>) |
Hiermee maakt u een nieuw exemplaar van de SyndicationFeed klasse. |
SyndicationFeed()
Initialiseert een nieuw exemplaar van de SyndicationFeed klasse.
public:
SyndicationFeed();
public SyndicationFeed();
Public Sub New ()
Van toepassing op
SyndicationFeed(IEnumerable<SyndicationItem>)
Initialiseert een nieuw exemplaar van de SyndicationFeed klasse met de opgegeven verzameling SyndicationItem objecten.
public:
SyndicationFeed(System::Collections::Generic::IEnumerable<System::ServiceModel::Syndication::SyndicationItem ^> ^ items);
public SyndicationFeed(System.Collections.Generic.IEnumerable<System.ServiceModel.Syndication.SyndicationItem> items);
new System.ServiceModel.Syndication.SyndicationFeed : seq<System.ServiceModel.Syndication.SyndicationItem> -> System.ServiceModel.Syndication.SyndicationFeed
Public Sub New (items As IEnumerable(Of SyndicationItem))
Parameters
- items
- IEnumerable<SyndicationItem>
Een verzameling SyndicationItem objecten.
Voorbeelden
In het volgende voorbeeld ziet u hoe u deze constructor aanroept.
List<SyndicationItem> items = new List<SyndicationItem>();
SyndicationItem item1 = new SyndicationItem();
item1.Title = new TextSyndicationContent("Item 1");
item1.Summary = new TextSyndicationContent("This is Item 1's summary");
item1.Authors.Add(new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://contoso/jesper"));
item1.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 1");
items.Add(item1);
SyndicationItem item2 = new SyndicationItem();
item2.Title = new TextSyndicationContent("Item 2");
item2.Summary = new TextSyndicationContent("This is Item 2's summary");
item2.Authors.Add(new SyndicationPerson("lene@contoso.com", "Lene Aaling", "http://contoso/lene"));
item2.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 2");
items.Add(item2);
SyndicationFeed feed = new SyndicationFeed(items);
Dim items As Collection(Of SyndicationItem) = New Collection(Of SyndicationItem)()
Dim item1 As SyndicationItem = New SyndicationItem()
item1.Title = New TextSyndicationContent("Item 1")
item1.Summary = New TextSyndicationContent("This is Item 1's summary")
item1.Authors.Add(New SyndicationPerson("Jesper@contoso.com", "Jesper Aaberg", "http:'contoso/jesper"))
item1.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 1")
Dim item2 As SyndicationItem = New SyndicationItem()
item2.Title = New TextSyndicationContent("Item 2")
item2.Summary = New TextSyndicationContent("This is Item 2's summary")
item2.Authors.Add(New SyndicationPerson("lene@contoso.com", "Lene Aaling", "http:'contoso/lene"))
item2.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 2")
Dim feed As SyndicationFeed = New SyndicationFeed(items)
Opmerkingen
De verzameling SyndicationItem objecten die in deze constructor worden doorgegeven, wordt gebufferd.
Van toepassing op
SyndicationFeed(SyndicationFeed, Boolean)
Hiermee maakt u een nieuw exemplaar van de SyndicationFeed klasse met de opgegeven feed.
protected:
SyndicationFeed(System::ServiceModel::Syndication::SyndicationFeed ^ source, bool cloneItems);
protected SyndicationFeed(System.ServiceModel.Syndication.SyndicationFeed source, bool cloneItems);
new System.ServiceModel.Syndication.SyndicationFeed : System.ServiceModel.Syndication.SyndicationFeed * bool -> System.ServiceModel.Syndication.SyndicationFeed
Protected Sub New (source As SyndicationFeed, cloneItems As Boolean)
Parameters
- source
- SyndicationFeed
Het SyndicationFeed exemplaar dat wordt gebruikt om het nieuwe exemplaar te initialiseren.
- cloneItems
- Boolean
Een waarde die aangeeft of de items in het bronexemplaren moeten worden gekloond.
Opmerkingen
Als de cloneItems parameter is true, worden alle SyndicationItem exemplaren in het bronexemplaren SyndicationFeed gekloond en toegevoegd aan de Items verzameling van het nieuwe SyndicationFeed exemplaar. Als de cloneItems parameter is false, bevat de Items verzameling van het nieuwe SyndicationFeed exemplaar verwijzingen naar de bestaande SyndicationItem exemplaren.
Van toepassing op
SyndicationFeed(String, String, Uri)
Initialiseert een nieuw exemplaar van de SyndicationFeed klasse met de opgegeven titel, beschrijving en URI (Uniform Resource Identifier).
public:
SyndicationFeed(System::String ^ title, System::String ^ description, Uri ^ feedAlternateLink);
public SyndicationFeed(string title, string description, Uri feedAlternateLink);
new System.ServiceModel.Syndication.SyndicationFeed : string * string * Uri -> System.ServiceModel.Syndication.SyndicationFeed
Public Sub New (title As String, description As String, feedAlternateLink As Uri)
Parameters
- title
- String
De titel van de feed.
- description
- String
De beschrijving van de feed.
- feedAlternateLink
- Uri
De URI voor de feed.
Voorbeelden
In het volgende voorbeeld ziet u hoe u deze constructor aanroept.
SyndicationFeed feed = new SyndicationFeed("My Data Feed", "This is a sample feed", new Uri("http://localhost/MyDataService"));
Dim feed As SyndicationFeed = New SyndicationFeed("My Data Feed", "This is a sample feed", New Uri("http:'localhost/MyDataService"))
Van toepassing op
SyndicationFeed(String, String, Uri, IEnumerable<SyndicationItem>)
Initialiseert een nieuw exemplaar van de SyndicationFeed klasse met de opgegeven titel, beschrijving, URI en verzameling SyndicationItem objecten.
public:
SyndicationFeed(System::String ^ title, System::String ^ description, Uri ^ feedAlternateLink, System::Collections::Generic::IEnumerable<System::ServiceModel::Syndication::SyndicationItem ^> ^ items);
public SyndicationFeed(string title, string description, Uri feedAlternateLink, System.Collections.Generic.IEnumerable<System.ServiceModel.Syndication.SyndicationItem> items);
new System.ServiceModel.Syndication.SyndicationFeed : string * string * Uri * seq<System.ServiceModel.Syndication.SyndicationItem> -> System.ServiceModel.Syndication.SyndicationFeed
Public Sub New (title As String, description As String, feedAlternateLink As Uri, items As IEnumerable(Of SyndicationItem))
Parameters
- title
- String
De titel van de feed.
- description
- String
De beschrijving van de feed.
- feedAlternateLink
- Uri
De URI voor de feed.
- items
- IEnumerable<SyndicationItem>
Een verzameling SyndicationItem objecten.
Voorbeelden
In het volgende voorbeeld ziet u hoe u deze constructor aanroept.
List<SyndicationItem> items = new List<SyndicationItem>();
SyndicationItem item1 = new SyndicationItem();
item1.Title = new TextSyndicationContent("Item 1");
item1.Summary = new TextSyndicationContent("This is Item 1's summary");
item1.Authors.Add(new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://contoso/jesper"));
item1.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 1");
items.Add(item1);
SyndicationItem item2 = new SyndicationItem();
item2.Title = new TextSyndicationContent("Item 2");
item2.Summary = new TextSyndicationContent("This is Item 2's summary");
item2.Authors.Add(new SyndicationPerson("lene@contoso.com", "Lene Aaling", "http://contoso/lene"));
item2.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 2");
items.Add(item2);
SyndicationFeed feed = new SyndicationFeed("My Data Feed", "This is a sample feed", new Uri("http://localhost/MyDataService"), items);
Dim items As Collection(Of SyndicationItem) = New Collection(Of SyndicationItem)()
Dim item1 As SyndicationItem = New SyndicationItem()
item1.Title = New TextSyndicationContent("Item 1")
item1.Summary = New TextSyndicationContent("This is Item 1's summary")
item1.Authors.Add(New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http:'contoso/jesper"))
item1.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 1")
Dim item2 As SyndicationItem = New SyndicationItem()
item2.Title = New TextSyndicationContent("Item 2")
item2.Summary = New TextSyndicationContent("This is Item 2's summary")
item2.Authors.Add(New SyndicationPerson("lene@contoso.com", "Lene Aaling", "http:'contoso/lene"))
item2.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 2")
Dim feed As SyndicationFeed = New SyndicationFeed("My Data Feed", "This is a sample feed", New Uri("http:'localhost/MyDataService"), items)
Van toepassing op
SyndicationFeed(String, String, Uri, String, DateTimeOffset)
Hiermee maakt u een nieuw exemplaar van de SyndicationFeed klasse.
public:
SyndicationFeed(System::String ^ title, System::String ^ description, Uri ^ feedAlternateLink, System::String ^ id, DateTimeOffset lastUpdatedTime);
public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime);
new System.ServiceModel.Syndication.SyndicationFeed : string * string * Uri * string * DateTimeOffset -> System.ServiceModel.Syndication.SyndicationFeed
Public Sub New (title As String, description As String, feedAlternateLink As Uri, id As String, lastUpdatedTime As DateTimeOffset)
Parameters
- title
- String
De titel van de syndicatiefeed.
- description
- String
De beschrijving van de syndicatiefeed.
- feedAlternateLink
- Uri
De alternatieve URI voor de syndicatiefeed.
- id
- String
De id van de syndicatiefeed.
- lastUpdatedTime
- DateTimeOffset
De DateTimeOffset feed met de laatste keer dat de syndicatiefeed is bijgewerkt.
Voorbeelden
De volgende code laat zien hoe u deze constructor aanroept.
SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
Dim feed As SyndicationFeed = New SyndicationFeed("Feed Title", "Feed Description", New Uri("http:'Feed/Alternate/Link"), "FeedID", DateTime.Now)
Van toepassing op
SyndicationFeed(String, String, Uri, String, DateTimeOffset, IEnumerable<SyndicationItem>)
Hiermee maakt u een nieuw exemplaar van de SyndicationFeed klasse.
public:
SyndicationFeed(System::String ^ title, System::String ^ description, Uri ^ feedAlternateLink, System::String ^ id, DateTimeOffset lastUpdatedTime, System::Collections::Generic::IEnumerable<System::ServiceModel::Syndication::SyndicationItem ^> ^ items);
public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime, System.Collections.Generic.IEnumerable<System.ServiceModel.Syndication.SyndicationItem> items);
new System.ServiceModel.Syndication.SyndicationFeed : string * string * Uri * string * DateTimeOffset * seq<System.ServiceModel.Syndication.SyndicationItem> -> System.ServiceModel.Syndication.SyndicationFeed
Public Sub New (title As String, description As String, feedAlternateLink As Uri, id As String, lastUpdatedTime As DateTimeOffset, items As IEnumerable(Of SyndicationItem))
Parameters
- title
- String
De titel van de syndicatiefeed.
- description
- String
De beschrijving van de syndicatiefeed.
- feedAlternateLink
- Uri
De alternatieve URI voor de syndicatiefeed.
- id
- String
De id van de syndicatiefeed.
- lastUpdatedTime
- DateTimeOffset
De DateTimeOffset feed met de laatste keer dat de syndicatiefeed is bijgewerkt.
- items
- IEnumerable<SyndicationItem>
Een verzameling SyndicationItem objecten.
Voorbeelden
De volgende code laat zien hoe u deze constructor aanroept.
List<SyndicationItem> items = new List<SyndicationItem>();
SyndicationItem item1 = new SyndicationItem();
item1.Title = new TextSyndicationContent("Item 1");
item1.Summary = new TextSyndicationContent("This is Item 1's summary");
item1.Authors.Add(new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://contoso/jesper"));
item1.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 1");
items.Add(item1);
SyndicationItem item2 = new SyndicationItem();
item2.Title = new TextSyndicationContent("Item 2");
item2.Summary = new TextSyndicationContent("This is Item 2's summary");
item2.Authors.Add(new SyndicationPerson("lene@contoso.com", "Lene Aaling", "http://contoso/lene"));
item2.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 2");
items.Add(item2);
SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now, items);
Dim items As New List(Of SyndicationItem)()
Dim item1 = New SyndicationItem()
item1.Title = New TextSyndicationContent("Item 1")
item1.Summary = New TextSyndicationContent("This is Item 1's summary")
item1.Authors.Add(New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http:'contoso/jesper"))
item1.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 1")
items.Add(item1)
Dim item2 = New SyndicationItem()
item2.Title = New TextSyndicationContent("Item 2")
item2.Summary = New TextSyndicationContent("This is Item 2's summary")
item2.Authors.Add(New SyndicationPerson("lene@contoso.com", "Lene Aaling", "http:'contoso/lene"))
item2.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 2")
items.Add(item2)
Dim feed As New SyndicationFeed("Feed Title", "Feed Description", New Uri("http:'Feed/Alternate/Link"), "FeedID", DateTime.Now, items)