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


C# Model.Dependency类代码示例

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


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

示例1: Find

        public static Task<NugetResult> Find(Solution solution, Dependency dependency)
        {
            var finders = Finders.Where(x => x.Matches(dependency)).ToArray();
            var search = new NugetSearch(finders);

            return search.FindDependency(solution, dependency);
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:7,代码来源:NugetSearch.cs

示例2: make_float

        public void make_float()
        {
            var dependency = new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed);
            dependency.Float();

            dependency.IsFloat().ShouldBeTrue();
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:7,代码来源:DependencyTester.cs

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

示例4: project_level_dependency

        public void project_level_dependency()
        {
            var dependency = new Dependency("FubuCore", "1.2.0.0", UpdateMode.Fixed);
            theRunner.AddProjectDependency("Project1", dependency);

            theProject.Dependencies.Find("FubuCore").ShouldEqual(dependency.AsFloat());
        }
开发者ID:bobpace,项目名称:ripple,代码行数:7,代码来源:NugetStepRunnerTester.cs

示例5: IsUpdateFor

        public static bool IsUpdateFor(this IRemoteNuget nuget, Dependency dependency)
        {
            var version = dependency.SemanticVersion();
            if (version == null) return false;

            return nuget.Version > version;
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:7,代码来源:IRemoteNuget.cs

示例6: solution_level_dependency

        public void solution_level_dependency()
        {
            var dependency = new Dependency("FubuCore", "1.2.0.0", UpdateMode.Fixed);
            theRunner.AddSolutionDependency(dependency);

            theSolution.Dependencies.Find("FubuCore").ShouldEqual(dependency);
        }
开发者ID:bobpace,项目名称:ripple,代码行数:7,代码来源:NugetStepRunnerTester.cs

示例7: CopyFor

        public NugetPlanRequest CopyFor(Dependency dependency)
        {
            var request = (NugetPlanRequest) MemberwiseClone();
            request.Dependency = dependency;

            return request;
        }
开发者ID:bobpace,项目名称:ripple,代码行数:7,代码来源:NugetPlanRequest.cs

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

示例9: Find

        public NugetResult Find(Solution solution, Dependency dependency)
        {
            var cache = FeedRegistry.CacheFor(solution);
            var nuget = cache.Find(dependency);

            return new NugetResult { Nuget = nuget };
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:7,代码来源:CacheFinder.cs

示例10: theVersionIs

        private void theVersionIs(Dependency dependency, string version)
        {
            var task = theSolution.Restore(dependency);
            task.Wait();

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

示例11: UpdateDependency

        public void UpdateDependency(Dependency dependency)
        {
            var existing = _solution.Dependencies.Find(dependency.Name);
            dependency.Mode = existing.Mode;

            _solution.UpdateDependency(dependency);
        }
开发者ID:bobpace,项目名称:ripple,代码行数:7,代码来源:INugetStepRunner.cs

示例12: NugetFor

        public virtual IRemoteNuget NugetFor(Solution solution, Dependency dependency)
        {
            IRemoteNuget nuget = null;
            var feeds = feedsFor(solution);
            foreach (var feed in feeds)
            {
                nuget = getLatestFromFloatingFeed(feed, dependency);
                if (nuget != null) break;

                if (dependency.IsFloat() || dependency.Version.IsEmpty())
                {
                    nuget = feed.FindLatest(dependency);
                    if (nuget != null) break;
                }

                nuget = feed.Find(dependency);
                if (nuget != null) break;
            }

            if (nuget == null)
            {
                RippleAssert.Fail("Could not find " + dependency);
            }

            return remoteOrCached(solution, nuget);
        }
开发者ID:bobpace,项目名称:ripple,代码行数:26,代码来源:FeedService.cs

示例13: findDependenciesFor

        private Task<NugetResult> findDependenciesFor(Dependency dependency, UpdateMode mode, int depth, SearchLocation location, List<Dependency> dependencies)
        {
            var result = findLocal(dependency, location);
            return Task.Factory.StartNew(() =>
            {
                if (result.Found)
                {
                    processNuget(result.Nuget, dependency, mode, depth, location, dependencies);
                    return result;
                }

                var search = NugetSearch.Find(_solution, dependency);

                search.ContinueWith(task =>
                {
                    if (!task.Result.Found)
                    {
                        return;
                    }

                    result.Import(task.Result);
                    var nuget = task.Result.Nuget;
                    processNuget(nuget, dependency, mode, depth, location, dependencies);

                }, TaskContinuationOptions.NotOnFaulted | TaskContinuationOptions.AttachedToParent);

                return result;

            }, TaskCreationOptions.AttachedToParent);
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:30,代码来源:FeedService.cs

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

示例15: equals_uses_semantic_version

        public void equals_uses_semantic_version()
        {
            var dep1 = new Dependency("structuremap", "2.6.3");
            var dep2 = new Dependency("structuremap", "2.6.3.0");

            dep1.ShouldEqual(dep2);
            dep2.ShouldEqual(dep1);
        }
开发者ID:4lexm,项目名称:ripple,代码行数:8,代码来源:DependencyTester.cs


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