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


C# Project.AddDependency方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: get_nuget_directory

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

            var project = new Project("something.csproj");
            var dependency = new NugetDependency("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.Config.SourceFolder, "packages", "FubuCore.0.9.1.37"));
        }
开发者ID:ianbattersby,项目名称:ripple,代码行数:17,代码来源:SolutionTester.cs

示例7: saving_the_solution_with_changed_projects

        public void saving_the_solution_with_changed_projects()
        {
            var storage = MockRepository.GenerateStub<INugetStorage>();

            var solution = new Solution();
            var project = new Project("Test.csproj");

            solution.AddProject(project);
            solution.UseStorage(storage);

            project.AddDependency("FubuCore");

            solution.Save(true);

            storage.AssertWasCalled(x => x.Write(solution));
            storage.AssertWasCalled(x => x.Write(project));
        }
开发者ID:bobpace,项目名称:ripple,代码行数:17,代码来源:SolutionTester.cs


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