' HINWEIS: Mit dem Befehl "Umbenennen" im Kontextmenü können Sie den Klassennamen "Feed1" sowohl im Code als auch in der Konfigurationsdatei ändern. Public Class Feed1 Implements IFeed1 Public Function CreateFeed() As SyndicationFeedFormatter Implements IFeed1.CreateFeed ' Einen neuen Syndication-Feed erstellen. Dim feed As New SyndicationFeed("Feed Title", "A WCF Syndication Feed", Nothing) Dim items As New List(Of SyndicationItem) ' Ein neues Syndication-Element erstellen. Dim item As New SyndicationItem("An item", "Item content", Nothing) items.Add(item) feed.Items = items ' Auf Grundlage der Abfragezeichenfolge ATOM oder RSS zurückgeben. ' rss -> http://localhost:8733/Design_Time_Addresses/$safeprojectname$/Feed1/ ' atom -> http://localhost:8733/Design_Time_Addresses/$safeprojectname$/Feed1/?format=atom Dim query As String = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.QueryParameters.Get("format") Dim formatter As SyndicationFeedFormatter = Nothing If (query = "atom") Then formatter = New Atom10FeedFormatter(feed) Else formatter = New Rss20FeedFormatter(feed) End If Return formatter End Function End Class