public PatcherStoreListingVm( GitPatcherInitVm gitInit, PatcherListing listing, RepositoryListing repositoryListing, INavigateTo navigate) { Repository = new RepositoryStoreListingVm(repositoryListing); Raw = listing; try { Name = Raw.Customization?.Nickname ?? Path.GetFileName(Raw.ProjectPath).TrimEnd(".csproj"); } catch (Exception) { Name = "Error"; } _isSelected = gitInit.WhenAnyValue(x => x.SelectedPatcher) .Select(x => x == this) .ToGuiProperty(this, nameof(IsSelected)); OpenWebsite = ReactiveCommand.Create(() => navigate.Navigate(RepoPath)); AddCommand = ReactiveCommand.CreateFromTask(async() => { await gitInit.AddStorePatcher(this); }); }
public RepositoryStoreListingVm(RepositoryListing listing) { Raw = listing; }