예제 #1
0
        public Task UpdateAsync()
        {
            if (_updateTask != null)
            {
                return(_updateTask);
            }

            var checksum = EnabledSources.Aggregate(0L, (current, source) => (current * 397) ^ source.ChangeId);

            if (checksum == _previousChecksum)
            {
                return(Task.Delay(0));
            }

            _previousChecksum = checksum;
            return(_updateTask = UpdateAsyncInner());
        }