Example #1
0
        public void Sync()
        {
            //Get entries from the Source
            var sourceEntries = new HashSet <CalendarEntry>(source.GetEntries());

            //Remove entries already synced
            sourceEntries.ExceptWith(SyncedEntries);

            //Add to destination
            foreach (var entry in sourceEntries)
            {
                dest.AddEntry(entry);
                Debug.Print("Adding {0}", entry);
            }

            //Update synced list
            SyncedEntries.UnionWith(sourceEntries);
        }