//ExportFactory<PickContactViewModel> pickContactFactory, Lazy<ModsViewModel> mods
        public CustomRepoAvailabilityWarningViewModel(CustomCollection customCollection) {
            DisplayName = "Third party content";
            _customRepo = customCollection.CustomRepo;
            _customCollection = customCollection;

            this.SetCommand(x => x.OkCommand).Subscribe(() => {
                HandleDontAskAgain();
                TryClose(true);
            });
        }
 public AddCustomRepoConfirmationViewModel(SixRepo customRepo) {
     DisplayName = "Third Party Content";
     _customRepo = customRepo;
     this.SetCommand(x => x.OkCommand).Subscribe(() => {
         HandleDontAskAgain();
         TryClose(true);
     });
     this.SetCommand(x => x.CancelCommand).Subscribe(() => {
         HandleDontAskAgain();
         TryClose(false);
     });
 }
        ContentLibraryItemViewModel CreateCustomRepo(SixRepo repo, LibraryGroupViewModel group)
        {
            var libItem = new BrowseContentLibraryItemViewModel <SixRepo>(_library, repo, @group: group, isFeatured: true);

            foreach (var modSet in repo.CollectionItems)
            {
                modSet.UpdateState();
                var customRepoCollectionLibraryItem = new CustomRepoCollectionLibraryItemViewModel(_library, modSet,
                                                                                                   null, true);
                libItem.Children.AddLocked(customRepoCollectionLibraryItem);
                libItem.Items.AddLocked(modSet);
            }
            return(libItem);
        }
        public void UpdateCustomRepoInfo(IContentManager modList, string url, SixRepo repo)
        {
            if (modList == null)
            {
                throw new ArgumentNullException(nameof(modList));
            }
            if (url == null)
            {
                throw new ArgumentNullException(nameof(url));
            }
            if (repo == null)
            {
                throw new ArgumentNullException(nameof(repo));
            }

            UpdateSharedRepoInfo(url, repo);

            GetNameFromRepo(repo);

            HandleModsetMods(modList);
        }
     static string GetNameFromRepo(SixRepo repo) => String.IsNullOrWhiteSpace(repo.Config.Name)
 ? "Custom Repo Collection (NAME NOT DEFINED)"
 : repo.Config.Name;
 static string GetNameFromServerOrRepo(SixRepoServer repoServer, SixRepo repo) => String.IsNullOrWhiteSpace(repoServer.Name) ? GetNameFromRepo(repo) : repoServer.Name;
 ContentLibraryItemViewModel <SixRepo> GetRepo(SixRepo repo)
 {
     lock (OnlineGroup.Children)
         return
             (OnlineGroup.Children.OfType <ContentLibraryItemViewModel <SixRepo> >().FirstOrDefault(y => y.Model == repo));
 }