Inheritance: NuGet.DefaultPackagePathResolver
Esempio n. 1
0
 /// <summary>
 /// Creates a WebProjectManager service.
 /// </summary>
 /// <param name="remoteSource">URL of the NuGet server API (ex, http://nuget.org/api/v2 ).</param>
 /// <param name="siteRoot">The physical path to the web root.</param>
 public WebProjectManager( string remoteSource, string siteRoot )
 {
     string webRepositoryDirectory = GetWebRepositoryDirectory( siteRoot );
     var fileSystem = new PhysicalFileSystem( webRepositoryDirectory );
     var packagePathResolver = new RockPackagePathResolver( fileSystem );
     _projectManager = new ProjectManager( sourceRepository: PackageRepositoryFactory.Default.CreateRepository( remoteSource ),
                                pathResolver: packagePathResolver,
                                localRepository: new LocalPackageRepository( packagePathResolver, fileSystem ),
                                project: new WebProjectSystem( siteRoot ) );
 }
Esempio n. 2
0
        /// <summary>
        /// Creates a WebProjectManager service.
        /// </summary>
        /// <param name="remoteSource">URL of the NuGet server API (ex, http://nuget.org/api/v2 ).</param>
        /// <param name="siteRoot">The physical path to the web root.</param>
        public WebProjectManager(string remoteSource, string siteRoot)
        {
            string webRepositoryDirectory = GetWebRepositoryDirectory(siteRoot);
            var    fileSystem             = new PhysicalFileSystem(webRepositoryDirectory);
            var    packagePathResolver    = new RockPackagePathResolver(fileSystem);

            _projectManager = new ProjectManager(sourceRepository: PackageRepositoryFactory.Default.CreateRepository(remoteSource),
                                                 pathResolver: packagePathResolver,
                                                 localRepository: new LocalPackageRepository(packagePathResolver, fileSystem),
                                                 project: new WebProjectSystem(siteRoot));
        }
        /// <summary>
        /// Creates a WebProjectManager service.
        /// </summary>
        /// <param name="remoteSource">URL of the NuGet server API (ex, http://nuget.org/api/v2 ).</param>
        /// <param name="siteRoot">The physical path to the web root.</param>
        public WebProjectManager( string remoteSource, string siteRoot )
        {
            string webRepositoryDirectory = GetWebRepositoryDirectory( siteRoot );
            var fileSystem = new PhysicalFileSystem( webRepositoryDirectory );
            var packagePathResolver = new RockPackagePathResolver( fileSystem );
            _projectManager = new RockProjectManager( sourceRepository: PackageRepositoryFactory.Default.CreateRepository( remoteSource ),
                                       pathResolver: packagePathResolver,
                                       localRepository: new LocalPackageRepository( packagePathResolver, fileSystem ),
                                       project: new WebProjectSystem( siteRoot ) );

            // Add event for reference files added (See note below)
            _projectManager.PackageReferenceAdded += ProjectManager_PackageReferenceAdded;
        }
Esempio n. 4
0
        /// <summary>
        /// Creates a WebProjectManager service.
        /// </summary>
        /// <param name="remoteSource">URL of the NuGet server API (ex, http://nuget.org/api/v2 ).</param>
        /// <param name="siteRoot">The physical path to the web root.</param>
        public WebProjectManager(string remoteSource, string siteRoot)
        {
            string webRepositoryDirectory = GetWebRepositoryDirectory(siteRoot);
            var    fileSystem             = new PhysicalFileSystem(webRepositoryDirectory);
            var    packagePathResolver    = new RockPackagePathResolver(fileSystem);

            _projectManager = new RockProjectManager(sourceRepository: PackageRepositoryFactory.Default.CreateRepository(remoteSource),
                                                     pathResolver: packagePathResolver,
                                                     localRepository: new LocalPackageRepository(packagePathResolver, fileSystem),
                                                     project: new WebProjectSystem(siteRoot));

            // Add event for reference files added (See note below)
            _projectManager.PackageReferenceAdded += ProjectManager_PackageReferenceAdded;
        }