Пример #1
0
        private void PushItem(Announcements Pull)
        {
            Announcements       Local     = new Announcements();
            IEnumerable <Topic> NewTopics = Pull.Topics.Except(Local.Topics, new GDiff());

            bool IsLocalNew = Local.Topics.Count() == 0;

            foreach (Topic C in NewTopics)
            {
                Local.MarkNew(Pull.GetItem(C.Payload));
            }

            if (IsLocalNew)
            {
                Pull.Save();
                // Drop the Pulled data,  use locally parsed one instead
                Local = new Announcements();
            }
            else
            {
                Local.Save();
            }

            HasNewThings = Local.IsNew;
        }