public RssChannel GetDocument(string url) { Feed feed = FeedManager.GetFeed(url); if (feed != null) { return(feed.Document.Channel); } return(new RssChannel()); }
protected void RegisterForSyndication() { string url = FeedUrl; if (string.IsNullOrEmpty(url)) { throw new Exception("The widget does not have the proper feed settings. FeedUrl is null or empty"); } Uri newUri; if (!Uri.TryCreate(url, UriKind.Absolute, out newUri)) { throw new Exception("Invalid Url format. The url " + FeedUrl + " is not valid"); } if (!FeedManager.RegisterFeed(FeedUrl)) { throw new Exception("The feed " + FeedUrl + " could not be registered"); } }
protected RssChannel Document() { return(FeedManager.GetFeed(FeedUrl).Document.Channel); }