示例#1
0
        private async void Init()
        {
            //((INotifyCollectionChanged)Articles).CollectionChanged += FeedViewModel_CollectionChanged;
            Link = new Uri("https://kaki104.tistory.com/rss");

            if (IsInDesignMode)
            {
                Name     = "Future Of DotNet";
                Articles = SampleDataService.GetRss();
            }
            else
            {
                RSSChannel feed;
                feed = await RssService.GetFeedAsync(Link);

                LastSyncDateTime = DateTime.Now;
                Name             = string.IsNullOrEmpty(Name) ? feed.Title : Name;
                Description      = feed.Description;
                Articles         = feed.Items;
            }

            IsInError    = false;
            ErrorMessage = null;

            Messenger.Default.Register <string>(this, ReceivedString, false);

            //IEnumerable<SampleOrder> datas = await SampleDataService.GetContentGridDataAsync();
            //foreach (SampleOrder item in datas)
            //{
            //    Source.Add(item);
            //}
        }
示例#2
0
        /// <inheritdoc/>
        public async Task InitializeAsync()
        {
            await RssService.GetSubscriptionsAsync();

            await RssService.GetFeedAsync();
        }