本文整理汇总了C#中ripple.Model.Solution.FindProject方法的典型用法代码示例。如果您正苦于以下问题:C# Solution.FindProject方法的具体用法?C# Solution.FindProject怎么用?C# Solution.FindProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ripple.Model.Solution
的用法示例。
在下文中一共展示了Solution.FindProject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetUp
public void SetUp()
{
theScenario = SolutionScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.Publishes("MyProject");
test.Publishes("AnotherProject");
test.SolutionDependency("Bottles", "1.1.0.0", UpdateMode.Fixed);
test.SolutionDependency("FubuCore", "1.0.0.0", UpdateMode.Float);
test.SolutionDependency("FubuLocalization", "1.8.0.0", UpdateMode.Fixed);
test.LocalDependency("Bottles", "1.1.0.255");
test.LocalDependency("FubuCore", "1.0.1.244");
test.LocalDependency("FubuLocalization", "1.8.0.0");
test.ProjectDependency("MyProject", "Bottles");
test.ProjectDependency("MyProject", "FubuCore");
test.ProjectDependency("MyProject", "FubuLocalization");
test.ProjectDependency("AnotherProject", "FubuCore");
});
});
theSolution = theScenario.Find("Test");
theSolution.FindProject("AnotherProject").AddProjectReference(theSolution.FindProject("MyProject"));
var templates = new NuspecTemplateFinder().Templates(theSolution);
var current = templates.FindByProject("AnotherProject");
theContext = new NuspecTemplateContext(current, templates, theSolution, new SemanticVersion("1.1.0.0"));
theTokens = new ProjectDependenciesSource().DetermineDependencies(theContext);
}
示例2: 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"));
}
示例3: SetUp
public void SetUp()
{
theScenario = SolutionGraphScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.Publishes("Something");
test.Publishes("SomeProject");
test.SolutionDependency("Bottles", "1.1.0.0", UpdateMode.Fixed);
test.SolutionDependency("FubuCore", "1.0.0.0", UpdateMode.Float);
test.SolutionDependency("FubuLocalization", "1.8.0.0", UpdateMode.Fixed);
test.LocalDependency("Bottles", "1.1.0.255");
test.LocalDependency("FubuCore", "1.0.1.244");
test.LocalDependency("FubuLocalization", "1.8.0.0");
test.ProjectDependency("SomeProject", "Bottles");
test.ProjectDependency("SomeProject", "FubuCore");
test.ProjectDependency("SomeProject", "FubuLocalization");
test.ProjectDependency("JustToBeComplicated", "FubuMVC.Core");
});
});
theSolution = theScenario.Find("Test");
// Map Something.nuspec to the "JustToBeComplicated" project
theSolution.Nuspecs.Add(new NuspecMap { File = "Something.nuspec", Project = "JustToBeComplicated"});
var someProject = theSolution.FindProject("SomeProject");
var justToBeComplicated = theSolution.FindProject("JustToBeComplicated");
someProject.AddProjectReference(justToBeComplicated);
theSolution.FindDependency("FubuLocalization").Constraint = "Current,NextMinor";
RippleOperation
.With(theSolution, false)
.Execute<CreatePackagesInput, LocalNugetCommand>(input =>
{
input.VersionFlag = "1.0.1.244";
input.UpdateDependenciesFlag = true;
});
}
示例4: parseLine
private static IEnumerable<NugetPlanRequest> parseLine(Solution solution, string[] values)
{
var subject = values[0].Trim();
var tokens = values[1].Split(',').Select(x => x.Trim());
var project = solution.FindProject(subject);
if (project != null)
{
return projectRequests(solution, project, tokens);
}
return nugetRequests(solution, subject, tokens);
}
示例5: installs_the_dependency
public void installs_the_dependency()
{
RippleOperation
.With(theSolution)
.Execute<InstallInput, InstallCommand>(x =>
{
x.Package = "FubuCore";
x.ProjectFlag = "Test";
});
theSolution = SolutionBuilder.ReadFrom(theScenario.DirectoryForSolution("Test"));
theSolution.FindProject("Test").Dependencies.Has("FubuCore").ShouldBeTrue();
}
示例6: ToSpec
public ProjectNuspec ToSpec(Solution solution)
{
var project = solution.FindProject(Project);
if (project == null)
{
throw new ArgumentOutOfRangeException("Project", Project + " is not a valid project name");
}
var spec = solution.Specifications.SingleOrDefault(x => x.MatchesFilename(File));
if (spec == null)
{
throw new ArgumentOutOfRangeException("File", File + " is not a valid nuspec file name");
}
return new ProjectNuspec(project, spec);
}