59 references to Feed
System.ServiceModel.Syndication (59)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (3)
699
ReadFeedFrom(reader,
Feed
, false);
1104
if (
Feed
== null)
1109
WriteFeedTo(writer,
Feed
, isSourceFeed: false);
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (54)
58
_atomSerializer = new Atom10FeedFormatter(
Feed
);
131
_atomSerializer.SetFeed(
Feed
);
304
ReadXml(reader,
Feed
);
835
if (
Feed
== null)
846
if (
Feed
.BaseUri != null)
848
writer.WriteAttributeString("xml", "base", Atom10FeedFormatter.XmlNs, FeedUtils.GetUriString(
Feed
.BaseUri));
850
WriteAttributeExtensions(writer,
Feed
, Version);
851
string title =
Feed
.Title != null ?
Feed
.Title.Text : string.Empty;
855
for (int i = 0; i <
Feed
.Links.Count; ++i)
857
if (
Feed
.Links[i].RelationshipType == Atom10Constants.AlternateTag)
859
alternateLink =
Feed
.Links[i];
860
WriteAlternateLink(writer, alternateLink,
Feed
.BaseUri);
865
string description =
Feed
.Description != null ?
Feed
.Description.Text : string.Empty;
868
if (
Feed
.Language != null)
870
writer.WriteElementString(Rss20Constants.LanguageTag,
Feed
.Language);
873
if (
Feed
.Copyright != null)
875
writer.WriteElementString(Rss20Constants.CopyrightTag, Rss20Constants.Rss20Namespace,
Feed
.Copyright.Text);
880
if ((
Feed
.Authors.Count == 1) && (
Feed
.Authors[0].Email != null))
882
WritePerson(writer, Rss20Constants.ManagingEditorTag,
Feed
.Authors[0]);
888
_atomSerializer.WriteFeedAuthorsTo(writer,
Feed
.Authors);
892
if (
Feed
.LastUpdatedTime > DateTimeOffset.MinValue)
895
writer.WriteString(AsString(
Feed
.LastUpdatedTime));
899
for (int i = 0; i <
Feed
.Categories.Count; ++i)
901
WriteCategory(writer,
Feed
.Categories[i]);
904
if (!string.IsNullOrEmpty(
Feed
.Generator))
906
writer.WriteElementString(Rss20Constants.GeneratorTag,
Feed
.Generator);
909
if (
Feed
.Contributors.Count > 0)
913
_atomSerializer.WriteFeedContributorsTo(writer,
Feed
.Contributors);
917
if (
Feed
.ImageUrl != null)
920
writer.WriteElementString(Rss20Constants.UrlTag, FeedUtils.GetUriString(
Feed
.ImageUrl));
928
if (
Feed
.InternalDocumentation?.Uri != null)
930
writer.WriteElementString(Rss20Constants.DocumentationTag,
Feed
.InternalDocumentation.Uri.ToString());
933
if (
Feed
.InternalTimeToLive != null)
935
writer.WriteElementString(Rss20Constants.TimeToLiveTag, ((int)
Feed
.InternalTimeToLive.Value.TotalMinutes).ToString());
938
if (
Feed
.InternalSkipHours?.Count > 0)
942
foreach (int hour in
Feed
.InternalSkipHours)
950
if (
Feed
.InternalSkipDays?.Count > 0)
954
foreach (string day in
Feed
.InternalSkipDays)
962
if (
Feed
.InternalTextInput != null)
966
writer.WriteElementString(Rss20Constants.DescriptionTag,
Feed
.InternalTextInput.Description);
967
writer.WriteElementString(Rss20Constants.TitleTag,
Feed
.InternalTextInput.Title);
968
writer.WriteElementString(Rss20Constants.LinkTag,
Feed
.InternalTextInput.Link.GetAbsoluteUri().ToString());
969
writer.WriteElementString(Rss20Constants.NameTag,
Feed
.InternalTextInput.Name);
976
Atom10FeedFormatter.WriteElement(writer, Atom10Constants.IdTag,
Feed
.Id);
980
for (int i = 0; i <
Feed
.Links.Count; ++i)
982
if (
Feed
.Links[i].RelationshipType == Atom10Constants.AlternateTag && isFirstAlternateLink)
987
Atom10FeedFormatter.WriteLink(writer,
Feed
.Links[i],
Feed
.BaseUri);
991
WriteElementExtensions(writer,
Feed
, Version);
992
WriteItems(writer,
Feed
.Items,
Feed
.BaseUri);
System\ServiceModel\Syndication\SyndicationFeed.cs (2)
423
return atomSerializer.
Feed
as TSyndicationFeed;
429
return rssSerializer.
Feed
as TSyndicationFeed;