コード例 #1
0
ファイル: MockVsPackageManager.cs プロジェクト: rikoe/nuget
        public override IProjectManager GetProjectManager(Project project)
        {
            IProjectManager projectManager;
            if (_projectManagers.TryGetValue(project, out projectManager))
            {
                return projectManager;
            }

            var projectSystem = new MockVsProjectSystem(project);
            var localRepository = new PackageReferenceRepository(
                new MockFileSystem(project.GetFullPath()),
                project.Name,
                LocalRepository);
            projectManager = new ProjectManager(
                this,
                PathResolver, 
                projectSystem,
                localRepository);
            _projectManagers[project] = projectManager;
            return projectManager;
        }
コード例 #2
0
        public override IProjectManager GetProjectManager(Project project)
        {
            IProjectManager projectManager;

            if (_projectManagers.TryGetValue(project, out projectManager))
            {
                return(projectManager);
            }

            var projectSystem   = new MockVsProjectSystem(project);
            var localRepository = new PackageReferenceRepository(
                new MockFileSystem(project.GetFullPath()),
                project.Name,
                LocalRepository);

            projectManager = new ProjectManager(
                this,
                PathResolver,
                projectSystem,
                localRepository);
            _projectManagers[project] = projectManager;
            return(projectManager);
        }