Exemplo n.º 1
0
        public static void Test()
        {
            INewsUpdater        blekkoUpdater = new BlekkoChinaUpdater();
            List <INewsUpdater> newsSources   = new List <INewsUpdater>();

            newsSources.Add(blekkoUpdater);
            NewsReader nr = new NewsReader(newsSources);

            // nr.ReadAllNews();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            INewsUpdater blekkoChinaUpdater  = new BlekkoChinaUpdater();
            INewsUpdater blekkoEuropeUpdater = new BlekkoEuropeUpdater();
            INewsUpdater blekkoAfricaUpdater = new BlekkoAfricaUpdater();
            INewsUpdater blekkoIndiaUpdater  = new BlekkoIndiaUpdater();
            INewsUpdater blekkoSAUpdater     = new BlekkoSAUpdater();
            INewsUpdater blekkoUSUpdater     = new BlekkoUSUpdater();

            List <INewsUpdater> newsSources = new List <INewsUpdater>();

            newsSources.Add(blekkoChinaUpdater);
            newsSources.Add(blekkoEuropeUpdater);
            newsSources.Add(blekkoAfricaUpdater);
            newsSources.Add(blekkoIndiaUpdater);
            newsSources.Add(blekkoSAUpdater);
            newsSources.Add(blekkoUSUpdater);
            nr = new NewsReader(newsSources);
            Update(nr);
        }