Example #1
0
        private void UpdateButton_OnClick(object s, RoutedEventArgs e)
        {
            var bw = new BackgroundWorker();

            bw.DoWork += delegate
            {
                Application.Current.Dispatcher.Invoke(
                    () => OnProgressStart(UpdateButton, UpdateLog, () => UpdateProgress));
                if (Config.Repositories.Count == 0)
                {
                    Utility.Log(LogStatus.Info, "No Repositories", UpdateLog);
                }
                Parallel.ForEach(Config.Repositories, repository =>
                {
                    SvnUpdater.Update(repository, UpdateLog, _repositoryDir);
                    Application.Current.Dispatcher.Invoke(() => UpdateProgress++);
                });
            };
            bw.RunWorkerCompleted += (sender, args) => OnProgressFinish(UpdateButton, "Update");
            bw.RunWorkerAsync();
        }
        public static SvnUpdateResult SvnUpdate(this ICakeContext context, DirectoryPath directoryPath, SvnUpdateSettings settings)
        {
            var svnUpdater = new SvnUpdater(context.Environment, SvnClientFactoryMethod);

            return(svnUpdater.Update(directoryPath, settings ?? new SvnUpdateSettings()));
        }