public void Update() { IsInitialized = false; SendBeforeUpdateMessage(); RepoConfigs = new RepoConfigsReader(); TestConfigs = new TestConfigsReader(); Repositories = Config.Repositories.With(x => x.Where(IsValidConfig).Select(repo => new RepositoryViewModel(repo.Name, repo, this))).With(x => x.ToList()); IsInitialized = true; SendUpdateMessage(); }
public EditConfigViewModel(Config config) { this.config = config; this.configsReader = new RepoConfigsReader(); KeyGesture = config.KeyGesture; SupportsTesting = config.SupportsTesting; DefaultTheme = config.DefaultTheme; Configs = this.configsReader.RegisteredConfigs; UpdateDelay = AtomFeed.FeedWorker.UpdateDelay; RefreshUpdateCommand = DelegateCommandFactory.Create(AtomFeed.FeedWorker.Update); CommonXaml = GetWpf2SlKey("Common"); DiagramXaml = GetWpf2SlKey("Diagram"); XPFGITXaml = GetWpf2SlKey("XPF"); Repositories = CreateEditRepositories(config); Repositories.CollectionChanged += RepositoriesOnCollectionChanged; AlwaysSure4 = AlwaysSure3 = AlwaysSure2 = AlwaysSure1 = config.AlwaysSure; TestByDefault = config.TestByDefault; UpdateWpf2SLProperties = new AsyncCommand(OnUpdateWpf2SLProperties); UpdateTokens(); }