Ejemplo n.º 1
0
        /// <summary>
        /// Сохранить новости в хранилище.
        /// </summary>
        /// <param name="news">Новости.</param>
        protected void SaveNews(IEnumerable <News> news)
        {
            var count = news.Count();

            if (count > 0)
            {
                var storage = StorageRegistry.GetNewsStorage(Settings.Drive, Settings.StorageFormat);
                storage.Save(news);

                RaiseDataLoaded(null, typeof(NewsMessage), null, news.Last().ServerTime, count);
            }
        }