コード例 #1
0
        /// <summary>
        /// Apply changes
        /// </summary>
        /// <param name="changeList"></param>
        public void ApplyChanges(ChangeList changeList)
        {
            // clear the log provider
            ChangeLogProvider.Clear();

            // separate out the changes
            var speakerChanges = changeList.SpeakerChanges;
            var sessionChanges = changeList.SessionChanges;

            // apply the changes
            ApplySpeakerChanges(speakerChanges);
            ApplySessionChanges(sessionChanges);

            // save the changes
            SpeakerRepository.SaveChanges();
            SessionRepository.SaveChanges();

            // indicate to the service that we are up to date (we will not work on the response to this)
            if (changeList.Count > 0)
            {
                int changeSet = changeList.Max(c => c.Changeset);
                UpdateClientChangesetToLatest(changeSet);
            }
        }
コード例 #2
0
        /// <summary>
        /// Apply changes
        /// </summary>
        /// <param name="changeList"></param>
        public void ApplyChanges(ChangeList changeList)
        {
            // clear the log provider
            ChangeLogProvider.Clear();

            // separate out the changes
            var speakerChanges = changeList.SpeakerChanges;
            var sessionChanges = changeList.SessionChanges;

            // apply the changes
            ApplySpeakerChanges(speakerChanges);
            ApplySessionChanges(sessionChanges);

            // save the changes
            SpeakerRepository.SaveChanges();
            SessionRepository.SaveChanges();

            // indicate to the service that we are up to date (we will not work on the response to this)
            if (changeList.Count > 0)
            {
                int changeSet = changeList.Max(c => c.Changeset);
                UpdateClientChangesetToLatest(changeSet);
            }
        }