本文整理汇总了C#中ripple.Model.Solution类的典型用法代码示例。如果您正苦于以下问题:C# Solution类的具体用法?C# Solution怎么用?C# Solution使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Solution类属于ripple.Model命名空间,在下文中一共展示了Solution类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ForSolution
public static PersistenceExpression<Solution> ForSolution(Solution target)
{
var file = "{0}-{1}.config".ToFormat(typeof(Solution).Name, Guid.NewGuid());
var fileSystem = new FileSystem();
if (fileSystem.FileExists(file))
{
fileSystem.DeleteFile(file);
}
var writer = ObjectBlockWriter.Basic(new RippleBlockRegistry());
var contents = writer.Write(target);
Debug.WriteLine(contents);
fileSystem.WriteStringToFile(file, contents);
var reader = SolutionLoader.Reader();
var specification = new PersistenceSpecification<Solution>(x =>
{
var fileContents = fileSystem.ReadStringFromFile(file);
var readValue = Solution.Empty();
reader.Read(readValue, fileContents);
fileSystem.DeleteFile(file);
return readValue;
});
specification.Original = target;
return new PersistenceExpression<Solution>(specification);
}
开发者ID:modulexcite,项目名称:ripple,代码行数:32,代码来源:CheckObjectBlockPersistence.cs
示例2: 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
示例3: SetUp
public void SetUp()
{
theScenario = SolutionGraphScenario.Create(scenario =>
{
scenario.Solution("Test", sln =>
{
sln.LocalDependency("FubuCore", "1.1.0.0");
sln.ProjectDependency("Test1", "FubuCore");
});
});
theSolution = theScenario.Find("Test");
FeedScenario.Create(scenario =>
{
scenario.For(theSolution.Cache.ToFeed())
.Add("FubuCore", "1.1.0.0")
.Add("FubuCore", "1.2.0.0");
scenario.Offline();
});
theBuilder = new NugetPlanBuilder();
theRequest = new NugetPlanRequest
{
Solution = theSolution,
Dependency = new Dependency("FubuCore"),
Operation = OperationType.Update,
ForceUpdates = false
};
}
开发者ID:kjnilsson,项目名称:ripple,代码行数:33,代码来源:update_an_existing_floated_dependency_offline.cs
示例4: SetUp
public void SetUp()
{
FeedScenario.Create(scenario =>
{
scenario.For(Feed.Fubu)
.Add("FubuCore", "1.1.0.0")
.Add("FubuCore", "1.2.0.0");
});
theScenario = SolutionScenario.Create(scenario =>
{
scenario.Solution("Test", sln =>
{
sln.LocalDependency("FubuCore", "1.1.0.0");
sln.ProjectDependency("Test1", "FubuCore");
});
});
theSolution = theScenario.Find("Test");
theBuilder = new NugetPlanBuilder();
var request = new NugetPlanRequest
{
Solution = theSolution,
Dependency = new Dependency("FubuCore"),
Operation = OperationType.Update,
ForceUpdates = false
};
thePlan = theBuilder.PlanFor(request);
}
开发者ID:modulexcite,项目名称:ripple,代码行数:33,代码来源:update_an_existing_floated_dependency.cs
示例5: SetUp
public void SetUp()
{
FeedScenario.Create(scenario => scenario.For(Feed.Fubu).Add("fubu", "1.2.0.0"));
theScenario = SolutionGraphScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.SolutionDependency("fubu", "1.0.0.1", UpdateMode.Fixed);
test.LocalDependency("fubu", "1.0.0.1");
});
});
theSolution = theScenario.Find("Test");
theBuilder = new NugetPlanBuilder();
var request = new NugetPlanRequest
{
Solution = theSolution,
Dependency = new Dependency("fubu"),
Operation = OperationType.Update,
ForceUpdates = false
};
thePlan = theBuilder.PlanFor(request);
}
开发者ID:4lexm,项目名称:ripple,代码行数:27,代码来源:updating_to_a_higher_version_of_an_existing_fixed_solution_dependency.cs
示例6: SetUp
public void SetUp()
{
theCacheFeed = new Feed("file://cache");
theFileSystemFeed = new Feed("file://feed");
FeedScenario.Create(scenario =>
{
scenario.For(theCacheFeed)
.Add("Dependency1", "1.0.0.0");
scenario.For(theFileSystemFeed)
.Add("Dependency1", "1.1.0.0");
scenario.For(Feed.NuGetV2)
.Add("Dependency1", "1.0.23.0");
});
theScenario = SolutionGraphScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.SolutionDependency("Dependency1", "1.1.0.0", UpdateMode.Float);
});
});
theSolution = theScenario.Find("Test");
theSolution.ClearFeeds();
theSolution.AddFeed(theFileSystemFeed);
theSolution.AddFeed(Feed.NuGetV2);
theSolution.UseCache(new InMemoryNugetCache(theCacheFeed));
}
开发者ID:johnsimons,项目名称:ripple,代码行数:32,代码来源:feed_order_with_cache.cs
示例7: SetUp
public void SetUp()
{
theSolution = new Solution();
theProject = theSolution.AddProject("Project1");
theRunner = new NugetStepRunner(theSolution);
}
开发者ID:bobpace,项目名称:ripple,代码行数:7,代码来源:NugetStepRunnerTester.cs
示例8: FeedService
public FeedService(Solution solution)
{
_solution = solution;
_dependenciesCache.OnMissing = key => findDependenciesFor(key.Dependency, key.Mode, SearchLocation.Local);
ServicePointManager.DefaultConnectionLimit = 10;
}
开发者ID:modulexcite,项目名称:ripple,代码行数:7,代码来源:FeedService.cs
示例9: 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
示例10: 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
示例11: SetUp
public void SetUp()
{
theScenario = SolutionGraphScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.SolutionDependency("FubuCore", "1.2.0.0", UpdateMode.Float);
test.SolutionDependency("UnneededAnywhereButHere", "1.2.0.0", UpdateMode.Float);
test.ProjectDependency("Test1", "FubuCore");
test.ProjectDependency("Test1", "UnneededAnywhereButHere");
test.ProjectDependency("Test2", "FubuCore");
test.LocalDependency("FubuCore", "1.2.0.0");
test.LocalDependency("UnneededAnywhereButHere", "1.2.0.0");
});
});
theSolution = theScenario.Find("Test");
RippleOperation
.With(theSolution)
.Execute<RemoveInput, RemoveCommand>(new RemoveInput { Nuget = "FubuCore", ProjectFlag = "Test1"});
RippleOperation
.With(theSolution)
.Execute<RemoveInput, RemoveCommand>(new RemoveInput { Nuget = "UnneededAnywhereButHere", ProjectFlag = "Test1" });
theSolution = SolutionBuilder.ReadFrom(theScenario.DirectoryForSolution("Test"));
}
开发者ID:4lexm,项目名称:ripple,代码行数:30,代码来源:remove_a_dependency_from_a_project.cs
示例12: 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"));
}
开发者ID:modulexcite,项目名称:ripple,代码行数:30,代码来源:NuspecGenerationPlanTester.cs
示例13: SetUp
public void SetUp()
{
theScenario = SolutionScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.SolutionDependency("StructureMap", "2.6.3", UpdateMode.Fixed);
test.ProjectDependency("Test", "structuremap");
});
});
theSolution = theScenario.Find("Test");
FeedScenario.Create(scenario =>
{
scenario.For(Feed.Fubu)
.Add("structuremap", "2.6.4.54");
scenario.For(Feed.NuGetV2)
.Add("structuremap", "2.6.3");
});
RippleOperation
.With(theSolution)
.Execute<RestoreInput, RestoreCommand>();
}
开发者ID:modulexcite,项目名称:ripple,代码行数:26,代码来源:restore_dependencies_case_insensitive.cs
示例14: SetUp
public void SetUp()
{
theScenario = SolutionGraphScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.SolutionDependency("TestNuGet", "1.1.0.1", UpdateMode.Float);
test.ProjectDependency("Test", "TestNuGet");
});
});
theCache = new Feed("cache");
theSolution = theScenario.Find("Test");
theSolution.UseCache(new InMemoryNugetCache(theCache));
FeedScenario.Create(scenario =>
{
scenario.For(theCache)
.Add("TestNuGet", "1.1.0.1");
});
RippleOperation
.With(theSolution)
.Execute<RestoreInput, RestoreCommand>();
}
开发者ID:kjnilsson,项目名称:ripple,代码行数:26,代码来源:restore_dependencies_that_only_exist_in_cache.cs
示例15: SetUp
public void SetUp()
{
theScenario = SolutionScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
// Defacto a float
test.ProjectDependency("Test", "Spark");
});
});
theCache = new Feed("cache");
theSolution = theScenario.Find("Test");
theSolution.UseCache(new InMemoryNugetCache(theCache));
FeedScenario.Create(scenario =>
{
scenario.For(theCache)
.Add("Spark", "1.0.0.0");
scenario.For(Feed.NuGetV2)
.Add("Spark", "1.1.0.1");
});
RippleOperation
.With(theSolution)
.Execute<RestoreInput, RestoreCommand>();
}
开发者ID:modulexcite,项目名称:ripple,代码行数:29,代码来源:restore_float_dependency_with_no_version.cs
示例16: SetUp
public void SetUp()
{
theScenario = SolutionGraphScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.SolutionDependency("FubuTransportation", "0.9.0.1", UpdateMode.Float);
});
});
theSolution = theScenario.Find("Test");
FeedScenario.Create(scenario =>
{
scenario
.For(Feed.Fubu)
.Add("FubuTransportation", "0.9.0.1")
.Add("FubuTransportation", "0.9.1.0");
scenario
.For(theSolution.Cache.ToFeed())
.Add("FubuTransportation", "0.9.0.1");
});
RippleOperation
.With(theSolution)
.Execute<UpdateInput, UpdateCommand>(input =>
{
input.NugetFlag = "FubuTransportation";
});
}
开发者ID:kjnilsson,项目名称:ripple,代码行数:31,代码来源:updating_a_float_dependency_when_a_cached_version_exists.cs
示例17: SetUp
public void SetUp()
{
theScenario = SolutionGraphScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.SolutionDependency("Dovetail.SDK", "3.3.0.23", UpdateMode.Fixed);
test.ProjectDependency("Test", "Dovetail.SDK");
test.LocalDependency("Dovetail.SDK", "3.2.10.27");
});
});
theSolution = theScenario.Find("Test");
FeedScenario.Create(scenario =>
{
scenario
.For(Feed.Fubu)
.Add("Dovetail.SDK", "3.2.10.27")
.Add("Dovetail.SDK", "3.3.0.23");
});
RippleOperation
.With(theSolution)
.Execute<RestoreInput, RestoreCommand>();
}
开发者ID:kjnilsson,项目名称:ripple,代码行数:26,代码来源:restore_fixed_dependency_with_min_version_higher_than_local.cs
示例18: SetUp
public void SetUp()
{
theScenario = SolutionGraphScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.SolutionDependency("FubuMVC.Core", "1.0.0.0", UpdateMode.Float);
test.ProjectDependency("Test", "FubuMVC.Core");
});
});
FeedScenario.Create(scenario =>
{
scenario.For(Feed.Fubu)
.Add("FubuCore", "1.1.0.0")
.Add("Bottles", "1.0.0.5")
.Add("FubuMVC.Core", "1.0.0.0")
.ConfigureRepository(fubu =>
{
fubu.ConfigurePackage("FubuMVC.Core", "1.0.0.0", mvc =>
{
mvc.DependsOn("FubuCore");
mvc.DependsOn("Bottles");
});
});
});
theSolution = theScenario.Find("Test");
RippleOperation
.With(theSolution)
.Execute<FixInput, FixCommand>();
theSolution = SolutionBuilder.ReadFrom(theScenario.DirectoryForSolution("Test"));
}
开发者ID:kjnilsson,项目名称:ripple,代码行数:35,代码来源:fix_command_installs_missing_dependencies.cs
示例19: SetUp
public void SetUp()
{
theScenario = SolutionScenario.Create(scenario =>
{
scenario.Solution("Test", test =>
{
test.SolutionDependency("TestNuGet", "1.1.0.1", UpdateMode.Float);
test.ProjectDependency("Test", "TestNuGet");
test.LocalDependency("TestNuGet", "1.0.0.0");
});
});
theSolution = theScenario.Find("Test");
FeedScenario.Create(scenario =>
{
scenario.For(Feed.Fubu)
.Add("TestNuGet", "1.1.0.1");
});
RippleOperation
.With(theSolution)
.Execute<RestoreInput, RestoreCommand>();
}
开发者ID:modulexcite,项目名称:ripple,代码行数:25,代码来源:restore_float_dependency_with_min_version_higher_than_local.cs
示例20: SetUp
public void SetUp()
{
FeedScenario.Create(scenario =>
{
scenario.For(Feed.Fubu)
.Add("FubuMVC.Katana", "1.0.0.1")
.Add("FubuMVC.Core", "1.0.1.1")
.Add("FubuMVC.OwinHost", "1.2.0.0")
.ConfigureRepository(teamcity =>
{
teamcity.ConfigurePackage("FubuMVC.Katana", "1.0.0.1", katana =>
{
katana.DependsOn("FubuMVC.Core");
katana.DependsOn("FubuMVC.OwinHost");
});
teamcity.ConfigurePackage("FubuMVC.OwinHost", "1.2.0.0", owin => owin.DependsOn("FubuMVC.Core"));
});
});
theScenario = SolutionScenario.Create(scenario =>
{
scenario.Solution("Test", fubumvc => { });
});
theSolution = theScenario.Find("Test");
}
开发者ID:modulexcite,项目名称:ripple,代码行数:27,代码来源:installing_a_new_package_with_no_versions_on_dependencies.cs
注:本文中的ripple.Model.Solution类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论