當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。