示例#1
0
 /// <summary>
 /// Добавление детальной информацией RSS
 /// </summary>
 /// <param name="item"></param>
 public void AddDetailRSSItems(ModelTableDetailRSS item)
 {
     RealmDB.Write(() =>
     {
         RealmDB.Add(item);
     });
 }
示例#2
0
 /// <summary>
 /// Удаление детальной информацией RSS
 /// </summary>
 /// <param name="item"></param>
 public void DeleteDetailRSSItems(ModelTableDetailRSS item)
 {
     using (var db = RealmDB.BeginWrite())
     {
         RealmDB.Remove(item);
         db.Commit();
     }
 }
示例#3
0
        /// <summary>
        /// Метод парсинга данных RSS и добавление в бд
        /// </summary>
        /// <param name="rss"></param>
        /// <returns></returns>
        private ModelTableDetailRSS AddDetailRSS(XElement rss)
        {
            var model = new ModelTableDetailRSS()
            {
                IdRSS       = modelRSS.Id,
                Title       = rss.Element("title").Value,
                Description = rss.Element("description").Value,
                Link        = rss.Element("link").Value,
                PudDate     = ChackedDateTime(rss.Element("pubDate").Value)
            };

            AddDetailRSSItems(model);

            return(model);
        }