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


C# Solution.AddDependency方法代码示例

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


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

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

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

示例3: SetUp

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

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

            theSolution.AddDependency(bottles = new Dependency("Bottles"));
            theSolution.AddDependency(fubucore = new Dependency("FubuCore", "1.0.1.201"));
            theSolution.AddDependency(rhinomocks = new Dependency("RhinoMocks", "3.6.1", UpdateMode.Fixed));
            theSolution.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,代码行数:29,代码来源:finding_solution_nugets_to_restore.cs

示例4: SetUp

        public void SetUp()
        {
            theSolution = new Solution();
            theSolution.AddDependency(new Dependency("FubuCore"));
            theSolution.AddDependency(new Dependency("Bottles"));
            theSolution.AddDependency(new Dependency("FubuLocalization"));

            theInput = new UpdateInput();
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:9,代码来源:UpdateInputTester.cs

示例5: SetUp

		public void SetUp()
		{
			theSolution = new Solution();
			theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed));
			theSolution.AddDependency(new Dependency("FubuCore", "1.0.0.0", UpdateMode.Fixed));

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

示例6: persists_and_retrieves_the_solution

        public void persists_and_retrieves_the_solution()
        {
            var solution = new Solution
            {
                Name = "Test",
                BuildCommand = "rake",
                FastBuildCommand = "rake compile",
                Feeds = new[] { Feed.NuGetV2, Feed.NuGetV1 },
                Nugets = new[] { new Dependency("FubuCore", "1.0.1.0") }
            };

            var group = new DependencyGroup();
            group.Dependencies.Add(new GroupedDependency("FubuCore"));
            solution.Groups.Add(group);

            var constrainedDependency = new Dependency("Bottles", "1.0.0.0")
            {
                VersionConstraint = VersionConstraint.DefaultFloat
            };
            solution.AddDependency(constrainedDependency);

            solution.Nuspecs.Add(new NuspecMap { File = "Temp", Project = "Test"});

            CheckXmlPersistence.For(solution);
        }
开发者ID:4lexm,项目名称:ripple,代码行数:25,代码来源:SolutionPersistence.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: falls_back_to_default_constraint_for_float

        public void falls_back_to_default_constraint_for_float()
        {
            var dep = new Dependency("FubuCore", UpdateMode.Float);

            var solution = new Solution();
            solution.AddDependency(dep);

            solution.ConstraintFor(dep).ShouldEqual(solution.NuspecSettings.Float);
        }
开发者ID:ventaur,项目名称:ripple,代码行数:9,代码来源:SolutionTester.cs

示例9: find_the_async_package

        public void find_the_async_package()
        {
            var asyncTargetPack = new Dependency("Microsoft.CompilerServices.AsyncTargetingPack");
            var solution = new Solution();
            solution.AddDependency(asyncTargetPack);

            var task = NugetSearch.Find(solution, asyncTargetPack);
            task.Wait();

            task.Result.Nuget.Version.ShouldEqual(new SemanticVersion("1.0.1"));
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:11,代码来源:NugetFeedTester.cs

示例10: ExtractSolutionLevelConfiguration

        public void ExtractSolutionLevelConfiguration(SolutionConfig config, Solution solution)
        {
            var specificDependencies = new List<Dependency>();
            solution.Projects.Each(project => specificDependencies.AddRange(project.Dependencies.Where(x => !x.IsFloat())));

            specificDependencies.Each(dependency =>
            {
                solution.AddDependency(new Dependency(dependency.Name, dependency.Version, UpdateMode.Fixed));

                dependency.Float();
            });
        }
开发者ID:kjnilsson,项目名称:ripple,代码行数:12,代码来源:ClassicRippleSolutionLoader.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()
        {
            theStorage = new StubNugetStorage();
            theStorage.Add("FubuCore", "1.0.0.0");
            theStorage.Add("Bottles", "1.0.0.0");
            theStorage.Add("StructureMap", "2.6.3");

            theSolution = Solution.Empty();
            theSolution.AddDependency(new Dependency("FubuCore", "1.0.0.0"));
            theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0"));
            theSolution.AddDependency(new Dependency("FubuLocalization", "1.0.0.0"));
            theSolution.AddDependency(new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed));
            theSolution.AddFeed(Feed.Fubu);
            theSolution.UseStorage(theStorage);

            FeedScenario.Create(scenario =>
            {
                scenario
                    .For(Feed.Fubu)
                    .Add("StructureMap", "2.6.4.54");
            });
        }
开发者ID:bobpace,项目名称:ripple,代码行数:22,代码来源:IntegratedSolutionUpdatesTester.cs

示例13: SetUp

        public void SetUp()
        {
            theFeed = new Feed("testing");
            theStorage = new StubNugetStorage();

            theSolution = new Solution();
            theSolution.UseStorage(theStorage);
            theSolution.AddFeed(theFeed);
            theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0"));
            theSolution.AddDependency(new Dependency("FubuCore"));
            theSolution.AddDependency(new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed));

            theFeedService = theSolution.FeedService.As<FeedService>();

            FeedScenario.Create(scenario =>
            {
                scenario.For(theFeed)
                        .Add(new Dependency("Bottles", "1.0.0.0"))
                        .Add(new Dependency("Bottles", "1.0.1.0"))
                        .Add(new Dependency("FubuCore", "1.2.0.0"))
                        .Add(new Dependency("StructureMap", "2.6.4.54"));
            });
        }
开发者ID:ventaur,项目名称:ripple,代码行数:23,代码来源:finding_the_latest_dependency.cs

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

示例15: persists_and_retrieves_the_solution

        public void persists_and_retrieves_the_solution()
        {
            var solution = new Solution
            {
                Name = "Test",
                Feeds = new[] { Feed.NuGetV2, Feed.NuGetV1 },
                Nugets = new[] { new Dependency("FubuCore", "1.0.1.0") }
            };

            var group = new DependencyGroup { Name = "Test"};
            group.Add(new GroupedDependency("FubuCore"));
            solution.AddGroup(group);

            solution.AddDependency(new Dependency("Bottles", "1.0.0.0")
            {
                VersionConstraint = VersionConstraint.DefaultFloat
            });

            solution.AddNuspec(new NuspecMap { PackageId = "Temp", PublishedBy = "Test" });

            solution.Ignore("Rhino.ServiceBus.dll", "Esent.Interop.dll");

            var registry = new RippleBlockRegistry();
            var solutionSettings = registry.SettingsFor(typeof (Solution));

            CheckObjectBlockPersistence
                .ForSolution(solution)
                .VerifyProperties(property =>
                {
                    if (!property.CanWrite)
                        return false;

                    if (solutionSettings.ShouldIgnore(solution, new SingleProperty(property)))
                        return false;

                    return true;
                });
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:38,代码来源:SolutionPersistence.cs


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