void ReadPackageSources()
        {
            IEnumerable <PackageSource> savedPackageSources = packageSourceProvider.LoadPackageSources();

            packageSources = new RegisteredPackageSources(savedPackageSources, defaultPackageSource);
            packageSources.CollectionChanged += PackageSourcesChanged;
        }
 public PackageRepositoryCache(
     RegisteredPackageSources packageSources,
     IList <RecentPackageInfo> recentPackages)
 {
     this.factory        = new SharpDevelopPackageRepositoryFactory();
     this.recentPackages = recentPackages;
     this.packageSources = packageSources;
 }
 void ResetPackageSources()
 {
     if (packageSources != null)
     {
         packageSources.CollectionChanged -= PackageSourcesChanged;
         packageSources = null;
     }
 }
 public RegisteredPackageRepositories(
     IPackageRepositoryCache repositoryCache,
     PackageManagementOptions options)
 {
     this.repositoryCache     = repositoryCache;
     this.options             = options;
     registeredPackageSources = options.PackageSources;
 }
 public RegisteredPackageSourcesViewModel(
     RegisteredPackageSources packageSources,
     IFolderBrowser folderBrowser)
 {
     this.packageSources = packageSources;
     this.folderBrowser  = folderBrowser;
     CreateCommands();
 }
 public PackageRepositoryCache(
     RegisteredPackageSources registeredPackageSources,
     IList <RecentPackageInfo> recentPackages)
     : this(
         new SharpDevelopPackageRepositoryFactory(),
         registeredPackageSources,
         recentPackages)
 {
 }
 public PackageRepositoryCache(
     ISharpDevelopPackageRepositoryFactory factory,
     RegisteredPackageSources registeredPackageSources,
     IList <RecentPackageInfo> recentPackages)
 {
     this.factory = factory;
     this.registeredPackageSources = registeredPackageSources;
     this.recentPackages           = recentPackages;
 }
Example #8
0
 public RegisteredPackageSourcesViewModel(
     IRegisteredPackageRepositories registeredPackageRepositories,
     IFolderBrowser folderBrowser)
 {
     this.registeredPackageRepositories = registeredPackageRepositories;
     this.packageSources = registeredPackageRepositories.PackageSources;
     this.folderBrowser  = folderBrowser;
     CreateCommands();
 }
Example #9
0
 RegisteredPackageSourcesViewModel CreateRegisteredPackageSourcesViewModel(RegisteredPackageSources packageSources)
 {
     CreateRegisteredPackageRepositories();
     if (IsInDesignMode())
     {
         return(new DesignTimeRegisteredPackageSourcesViewModel());
     }
     else
     {
         return(new RegisteredPackageSourcesViewModel(registeredPackageRepositories));
     }
 }
        void ReadPackageSources()
        {
            IEnumerable <PackageSource> savedPackageSources = packageSourceProvider.LoadPackageSources();

            packageSources = new RegisteredPackageSources(savedPackageSources, defaultPackageSource);
            packageSources.CollectionChanged += PackageSourcesChanged;

            if (!savedPackageSources.Any())
            {
                UpdatePackageSourceSettingsWithChanges();
            }
        }
        void ReadPackageSources()
        {
            var savedPackageSources = GetPackageSourcesFromSettings();

            packageSources = new RegisteredPackageSources(savedPackageSources);
            packageSources.CollectionChanged += PackageSourcesChanged;

            if (!savedPackageSources.Any())
            {
                UpdatePackageSourceSettingsWithChanges();
            }
        }
 RegisteredPackageSourcesViewModel CreateRegisteredPackageSourcesViewModel(RegisteredPackageSources packageSources)
 {
     CreateRegisteredPackageRepositories();
     return(new RegisteredPackageSourcesViewModel(packageSources));
 }
 public RegisteredPackageSourcesViewModel(
     RegisteredPackageSources packageSources)
     : this(packageSources, new FolderBrowser())
 {
 }
 public RegisteredProjectTemplatePackageSources()
 {
     packageSources = new RegisteredPackageSources(GetPackageSources());
 }
 public PackageRepositoryCache(
     RegisteredPackageSources packageSources)
 {
     this.factory        = new SharpDevelopPackageRepositoryFactory();
     this.packageSources = packageSources;
 }