CalendarAggregator.FeedRegistry.LoadFeedsFromAzure C# (CSharp) Метод

LoadFeedsFromAzure() публичный Метод

public LoadFeedsFromAzure ( FeedLoadOption option ) : void
option FeedLoadOption
Результат void
        public void LoadFeedsFromAzure(FeedLoadOption option)
        {
            var dict = Metadata.LoadFeedsFromAzureTableForId(this.id, option);
            var settings = GenUtils.GetSettingsFromAzureTable("settings");
            foreach (var url in dict.Keys)
            {
                try
                {
                    if (settings["eventful_feeds_enabled"] == "False" && url.StartsWith("http://eventful.com/"))
                        continue;
                    if (settings["eventbrite_feeds_enabled"] == "False" && url.Contains("ics_from_eventbrite"))
                        continue;
                    if (settings["lastfm_feeds_enabled"] == "False" && url.Contains("ics_from_lastfm_venue"))
                        continue;
                    if (url.StartsWith("http://upcoming.yahoo.com"))
                        continue;
                }
                catch (Exception e)
                {
                    GenUtils.PriorityLogMsg("exception", "CollectIcal", e.Message + e.StackTrace);
                }
                this.AddFeed(url, dict[url]);
            }
        }

Usage Example

Пример #1
0
        private void SetShowBadgesForHub()
        {
            var fr = new FeedRegistry(this.id);

            fr.LoadFeedsFromAzure(FeedLoadOption.all);
            try
            {
                this.show_eventbrite_badge = Utils.ShowEventBriteBadge(this, fr);
                this.show_eventful_badge   = Utils.ShowEventfulBadge(this);
                this.show_meetup_badge     = Utils.ShowMeetupBadge(this, fr);
                this.show_facebook_badge   = Utils.ShowFacebookBadge(fr);
            }
            catch (Exception e)
            {
                GenUtils.PriorityLogMsg("exception", "SetShowBadgesForHub: " + this.id, e.Message + e.StackTrace);
            }
        }
All Usage Examples Of CalendarAggregator.FeedRegistry::LoadFeedsFromAzure