예제 #1
0
        /// <summary>
        /// Сохранить новости в хранилище.
        /// </summary>
        /// <param name="news">Новости.</param>
        protected void SaveNews(IEnumerable <NewsMessage> news)
        {
            news = news.ToArray();

            if (!news.Any())
            {
                return;
            }

            var storage = StorageRegistry.GetNewsMessageStorage(Settings.Drive, Settings.StorageFormat);

            storage.Save(news);

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