当前位置: 首页>>代码示例>>C#>>正文


C# Solution.AddProject方法代码示例

本文整理汇总了C#中ripple.Model.Solution.AddProject方法的典型用法代码示例。如果您正苦于以下问题:C# Solution.AddProject方法的具体用法?C# Solution.AddProject怎么用?C# Solution.AddProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ripple.Model.Solution的用法示例。


在下文中一共展示了Solution.AddProject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUp

        public void SetUp()
        {
            theFinder = MockRepository.GenerateStub<INuspecTemplateFinder>();
            
            theSolution = new Solution();
            theSolution.AddProject("Project1");
            theSolution.AddProject("Project2");

            d1 = new NuspecDependencyToken("DependencyA", "1.0.0.0", VersionConstraint.DefaultFixed);
            d2 = new NuspecDependencyToken("DependencyB", "1.0.0.0", VersionConstraint.DefaultFixed);

            g1 = new NuspecTemplate(new NugetSpec("Spec1", "Spec1.nuspec"), new[] { ProjectNuspec.For(theSolution.FindProject("Project1")) });
            g2 = new NuspecTemplate(new NugetSpec("Spec2", "Spec2.nuspec"), new[] { ProjectNuspec.For(theSolution.FindProject("Project2")) });

            theTemplates = new NuspecTemplateCollection(new[] { g1, g2 });

            src1 = MockRepository.GenerateStub<INuspecDependencySource>();
            src2 = MockRepository.GenerateStub<INuspecDependencySource>();

            theFinder.Stub(x => x.Templates(theSolution)).Return(theTemplates);

            src1.Stub(x => x.DetermineDependencies(new NuspecTemplateContext(g1, theTemplates, theSolution))).Return(new[] { d1 });
            src1.Stub(x => x.DetermineDependencies(new NuspecTemplateContext(g2, theTemplates, theSolution))).Return(new NuspecDependencyToken[0]);

            src2.Stub(x => x.DetermineDependencies(new NuspecTemplateContext(g1, theTemplates, theSolution))).Return(new NuspecDependencyToken[0]);
            src2.Stub(x => x.DetermineDependencies(new NuspecTemplateContext(g2, theTemplates, theSolution))).Return(new[] { d2 });

            theGenerator = new NuspecGenerator(theFinder, new[] { src1, src2 });
            thePlan = theGenerator.PlanFor(theSolution, new SemanticVersion("1.0.0.0"));
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:30,代码来源:NuspecGenerationPlanTester.cs

示例2: SetUp

        public void SetUp()
        {
            theSolution = new Solution();
            p1 = theSolution.AddProject("MyProject");

            p1.AddDependency("Bottles");
            p1.AddDependency("FubuCore");
            p1.AddDependency("FubuLocalization");

            p2 = theSolution.AddProject("MyOtherProject");
            p2.AddDependency("FubuMVC.Core");

            theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed));
            theSolution.AddDependency(new Dependency("FubuCore", "1.1.0.0", UpdateMode.Float));
            theSolution.AddDependency(new Dependency("FubuLocalization", "1.2.0.0", UpdateMode.Fixed));
            theSolution.AddDependency(new Dependency("FubuMVC.Core", "1.4.0.0", UpdateMode.Fixed));

            theNugetSpec = new NugetSpec("MyProject", "myproject.nuspec");

            theGroup = new NuspecTemplate(theNugetSpec, new[]
            {
                new ProjectNuspec(p1, new NugetSpec("MyProject", "MyProject.nuspec")), 
                new ProjectNuspec(p2, new NugetSpec("MyOtherProject", "MyOtherProject.nuspec"))
            });
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:25,代码来源:SpecGroupTester.cs

示例3: SetUp

        public void SetUp()
        {
            theSolution = new Solution(new SolutionConfig()
                                       {
                                           SourceFolder = "src",
                                           BuildCommand = RippleFileSystem.RakeRunnerFile(),
                                           FastBuildCommand = "rake compile",
                                           Floats = new string[] { "Nug1", "Nug2" },
                                       }, "directory1");

            var project1 = new Project("something.csproj");
            project1.AddDependency(new NugetDependency("Nug1"));
            project1.AddDependency(new NugetDependency("Nug2"));
            project1.AddDependency(new NugetDependency("Nug3"));
            project1.AddDependency(new NugetDependency("Nug4"));

            theSolution.AddProject(project1);

            var project2 = new Project("something.csproj");
            project2.AddDependency(new NugetDependency("Nug1"));
            project2.AddDependency(new NugetDependency("Nug3"));
            project2.AddDependency(new NugetDependency("Nug5"));
            project2.AddDependency(new NugetDependency("Nug6"));

            theSolution.AddProject(project2);
        }
开发者ID:spascoe,项目名称:ripple,代码行数:26,代码来源:UpdateInputTester.cs

示例4: SetUp

        public void SetUp()
        {
            theSolution = new Solution();
            theProject = theSolution.AddProject("Project1");

            theRunner = new NugetStepRunner(theSolution);
        }
开发者ID:bobpace,项目名称:ripple,代码行数:7,代码来源:NugetStepRunnerTester.cs

示例5: can_read_and_write_the_packages_config

		public void can_read_and_write_the_packages_config()
		{
			var theFileSystem = new FileSystem();

			theFileSystem.WriteStringToFile(NuGetDependencyStrategy.PackagesConfig, "<?xml version=\"1.0\" encoding=\"utf-8\"?><packages></packages>");
			
			var theSolution = new Solution();
			theSolution.AddDependency(new Dependency("Bottles", "1.0.1.1"));
			theSolution.AddDependency(new Dependency("FubuCore", "1.2.0.1"));

			var theProject = new Project("Test.csproj");
			theProject.AddDependency("Bottles");
			theProject.AddDependency("FubuCore");

			theSolution.AddProject(theProject);

			var theStrategy = new NuGetDependencyStrategy();
			theStrategy.Write(theProject);

			theStrategy
				.Read(theProject)
				.ShouldHaveTheSameElementsAs(
					new Dependency("Bottles", "1.0.1.1"),
					new Dependency("FubuCore", "1.2.0.1")
				);

			theFileSystem.DeleteFile(NuGetDependencyStrategy.PackagesConfig);
		}
开发者ID:modulexcite,项目名称:ripple,代码行数:28,代码来源:NugetDependencyStrategyTester.cs

示例6: SetUp

        public void SetUp()
        {
            theSolution = new Solution();
            theSolution.ClearFeeds();

            theSolution.AddFeed(Feed.Fubu);
            theSolution.AddFeed(Feed.NuGetV2);

            theSolution.AddDependency(fubucore = new Dependency("FubuCore", "1.0.1.201"));

            var theProject = new Project("Test.csproj");
            theSolution.AddProject(theProject);

            theProject.AddDependency(bottles = new Dependency("Bottles"));
            theProject.AddDependency(rhinomocks = new Dependency("RhinoMocks", "3.6.1", UpdateMode.Fixed));
            theProject.AddDependency(structuremap = new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed));

            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.Fubu)
                    .Add("Bottles", "1.0.2.2")
                    .Add("FubuCore", "1.0.2.232")
                    .Add("StructureMap", "2.6.4.71");

                scenario.For(Feed.NuGetV2)
                    .Add("RhinoMocks", "3.6.1")
                    .Add("StructureMap", "2.6.3");

                scenario.For(theSolution.Cache.ToFeed());

                scenario.Online();
            });
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:33,代码来源:finding_project_nugets_to_restore.cs

示例7: SetUp

        public void SetUp()
        {
            theSolution = new Solution();
            theSolution.ClearFeeds();

            theSolution.AddFeed(Feed.Fubu);
            theSolution.AddFeed(Feed.NuGetV2);

            theSolution.AddDependency(fubucore = new Dependency("FubuCore", "1.0.1.201"));

            var theProject = new Project("Test.csproj");
            theSolution.AddProject(theProject);

            theProject.AddDependency(bottles = new Dependency("Bottles"));
            theProject.AddDependency(rhinomocks = new Dependency("RhinoMocks", "3.6.1", UpdateMode.Fixed));
            theProject.AddDependency(structuremap = new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed));

            theFubuFeed = MockRepository.GenerateStub<IFloatingFeed>();
            theFubuFeed.Stub(x => x.GetLatest()).Return(new IRemoteNuget[]
            {
                new StubNuget("Bottles", "1.0.2.2"),
                new StubNuget("FubuCore", "1.0.2.232"),
                new StubNuget("StructureMap", "2.6.4.71"),
            });

            theNugetFeed = MockRepository.GenerateStub<INugetFeed>();
            theNugetFeed.Stub(x => x.Find(rhinomocks)).Return(new StubNuget("RhinoMocks", "3.6.1"));
            theNugetFeed.Stub(x => x.Find(structuremap)).Return(new StubNuget("StructureMap", "2.6.3"));

            theFeedProvider = MockRepository.GenerateStub<IFeedProvider>();
            theFeedProvider.Stub(x => x.For(Feed.Fubu)).Return(theFubuFeed);
            theFeedProvider.Stub(x => x.For(Feed.NuGetV2)).Return(theNugetFeed);

            FeedRegistry.Stub(theFeedProvider);
        }
开发者ID:bobpace,项目名称:ripple,代码行数:35,代码来源:finding_solution_nugets_to_restore.cs

示例8: SetUp

        public void SetUp()
        {
            theSolution = Solution.NuGet("Test");
            p1 = theSolution.AddProject("Project1");
            p2 = theSolution.AddProject("Project2");

            p1.AddDependency(new Dependency("NuGetA", "1.0.0.0", UpdateMode.Fixed));
            p1.AddDependency(new Dependency("NuGetB", "1.1.0.0", UpdateMode.Fixed));
            p1.AddDependency(new Dependency("NuGetC", "1.4.5.0", UpdateMode.Fixed));

            p2.AddDependency(new Dependency("NuGetD", "1.3.0.0", UpdateMode.Fixed));
            p2.AddDependency(new Dependency("NuGetE", "3.3.0.0", UpdateMode.Fixed));
            p2.AddDependency(new Dependency("NuGetF", "2.1.0.0", UpdateMode.Fixed));

            p2.AddDependency(new Dependency("NuGetB", "1.2.0.0", UpdateMode.Fixed)); // Conflict

            new NuGetSolutionLoader().SolutionLoaded(theSolution);
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:18,代码来源:finalizing_nuget_solution_loading.cs

示例9: SetUp

        public void SetUp()
        {
            theConfig = new SolutionConfig();

            theSolution = new Solution();
            p1 = theSolution.AddProject("Project1");
            p2 = theSolution.AddProject("Project2");

            p1.AddDependency(new Dependency("Bottles"));
            p1.AddDependency(new Dependency("FubuCore", "1.1.2.3", UpdateMode.Fixed));

            p2.AddDependency(new Dependency("FubuCore", "1.1.2.3", UpdateMode.Fixed));
            p2.AddDependency(new Dependency("FubuLocalization"));
            p2.AddDependency(new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed));

            theLoader = new NuGetSolutionLoader();
            theLoader.ExtractSolutionLevelConfiguration(theConfig, theSolution);
        }
开发者ID:bobpace,项目名称:ripple,代码行数:18,代码来源:NuGetSolutionLoaderTester.cs

示例10: adding_a_project_sets_the_solution

        public void adding_a_project_sets_the_solution()
        {
            var solution = new Solution();
            var project = new Project("MyProject.csproj");

            solution.AddProject(project);
            solution.Projects.ShouldHaveTheSameElementsAs(project);

            project.Solution.ShouldBeTheSameAs(solution);
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:10,代码来源:SolutionTester.cs

示例11: combines_the_dependencies

        public void combines_the_dependencies()
        {
            var solution = new Solution();
            solution.AddDependency(new Dependency("Bottles", "1.0.1.1"));

            var project = new Project("MyProject.csproj");
            project.AddDependency(new Dependency("FubuCore", "1.2.3.4"));

            solution.AddProject(project);

            solution.Dependencies.ShouldHaveTheSameElementsAs(new Dependency("Bottles", "1.0.1.1"), new Dependency("FubuCore", "1.2.3.4"));
        }
开发者ID:bobpace,项目名称:ripple,代码行数:12,代码来源:SolutionTester.cs

示例12: SetUp

		public void SetUp()
		{
			theSolution = new Solution();

			theProject = new Project("TestProject.csproj");
			theProject.AddDependency(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed));
			theProject.AddDependency(new Dependency("FubuCore", "1.0.0.0", UpdateMode.Fixed));

			theSolution.AddProject(theProject);

			theSolution.Update("Bottles", "1.1.0.0");
			theSolution.Update("FubuCore", "1.2.0.1");
		}
开发者ID:modulexcite,项目名称:ripple,代码行数:13,代码来源:updating_solution_dependencies.cs

示例13: SetUp

        public void SetUp()
        {
            theSolution = new Solution();
            p1 = theSolution.AddProject("MyProject");

            p1.AddDependency("Bottles");
            p1.AddDependency("FubuCore");
            p1.AddDependency("FubuLocalization");

            p2 = theSolution.AddProject("MyOtherProject");
            p2.AddDependency("FubuMVC.Core");

            theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed));
            theSolution.AddDependency(new Dependency("FubuCore", "1.1.0.0", UpdateMode.Float));
            theSolution.AddDependency(new Dependency("FubuLocalization", "1.2.0.0", UpdateMode.Fixed));
            theSolution.AddDependency(new Dependency("FubuMVC.Core", "1.4.0.0", UpdateMode.Fixed));

            theNugetSpec = new NugetSpec("MyProject", "myproject.nuspec");
            // explicit dependencies are not overridden
            theNugetSpec.Dependencies.Add(new NuspecDependency("Bottles", "1.0.0.0"));

            theGroup = new SpecGroup(theNugetSpec, new[] { p1, p2 });
        }
开发者ID:ventaur,项目名称:ripple,代码行数:23,代码来源:SpecGroupTester.cs

示例14: get_nuget_directory

        public void get_nuget_directory()
        {
            var solution = new Solution
            {
                SourceFolder = "source",
                Directory = ".".ToFullPath()
            };

            var storage = new StubNugetStorage();
            storage.Add("FubuCore", "0.9.1.37");
            solution.UseStorage(storage);

            var project = new Project("something.csproj");
            var dependency = new Dependency("FubuCore", "0.9.1.37");
            project.AddDependency(dependency);
            solution.AddProject(project);

            var spec = new NugetSpec("FubuCore", "somefile.nuspec");

            solution.NugetFolderFor(spec)
                .ShouldEqual(".".ToFullPath().AppendPath(solution.PackagesDirectory(), "FubuCore"));
        }
开发者ID:bobpace,项目名称:ripple,代码行数:22,代码来源:SolutionTester.cs

示例15: adding_a_project_should_set_the_update_mode_on_all_nuget_dependencies

        public void adding_a_project_should_set_the_update_mode_on_all_nuget_dependencies()
        {
            var solution = new Solution(new SolutionConfig()
            {
                SourceFolder = "src",
                BuildCommand = RippleFileSystem.RakeRunnerFile(),
                FastBuildCommand = "rake compile",
                Floats = new string[]{"Nug1", "Nug2"},
            }, "directory1");

            var project = new Project("something.csproj");
            project.AddDependency(new NugetDependency("Nug1"));
            project.AddDependency(new NugetDependency("Nug2"));
            project.AddDependency(new NugetDependency("Nug3"));
            project.AddDependency(new NugetDependency("Nug4"));

            solution.AddProject(project);

            project.FindDependency("Nug1").UpdateMode.ShouldEqual(UpdateMode.Float);
            project.FindDependency("Nug2").UpdateMode.ShouldEqual(UpdateMode.Float);
            project.FindDependency("Nug3").UpdateMode.ShouldEqual(UpdateMode.Locked);
            project.FindDependency("Nug4").UpdateMode.ShouldEqual(UpdateMode.Locked);
        }
开发者ID:ianbattersby,项目名称:ripple,代码行数:23,代码来源:SolutionTester.cs


注:本文中的ripple.Model.Solution.AddProject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。