本文整理汇总了C#中Suite.GetProduct方法的典型用法代码示例。如果您正苦于以下问题:C# Suite.GetProduct方法的具体用法?C# Suite.GetProduct怎么用?C# Suite.GetProduct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Suite
的用法示例。
在下文中一共展示了Suite.GetProduct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetUp
public void SetUp()
{
fallback = new Mock<ISlnNameGenerator>();
suite = new Suite(new TestFileSystemDirectory("root"));
suiteContents = new DefaultSuiteContentsAnalyzer(suite);
generator = new ReadableSlnNameGenerator(fallback.Object, suiteContents);
fallback.Setup(f => f.GetName(It.IsAny<IEnumerable<Project>>())).Returns("fallback");
// mod1: proj11, testproj11
// mod2: proj21, proj22
// mod3: proj31
// mod4: proj41
// mod5: proj51
// mod6: proj61
// mod7: proj71
// prod1: mod1, mod2
// prod2: mod2, mod3
mod1 = suite.GetModule("mod1");
mod2 = suite.GetModule("mod2");
mod3 = suite.GetModule("mod3");
mod4 = suite.GetModule("mod4");
mod5 = suite.GetModule("mod5");
mod6 = suite.GetModule("mod6");
mod7 = suite.GetModule("mod7");
mod8 = suite.GetModule("mod8");
proj11 = mod1.GetProject("proj1");
tproj11 = mod1.GetTestProject("test1");
proj21 = mod2.GetProject("proj21");
proj22 = mod2.GetProject("proj22");
proj31 = mod3.GetProject("proj3");
proj41 = mod4.GetProject("proj4");
proj51 = mod5.GetProject("proj5");
proj61 = mod6.GetProject("proj6");
proj71 = mod7.GetProject("proj7");
proj81 = mod8.GetProject("proj8");
tproj81 = mod8.GetTestProject("test8");
prod1 = suite.GetProduct("prod1");
prod1.AddModule(mod1);
prod1.AddModule(mod2);
prod2 = suite.GetProduct("prod2");
prod2.AddModule(mod2);
prod2.AddModule(mod3);
}
示例2: Issue90_SingleProjectProduct
public void Issue90_SingleProjectProduct()
{
var s = new Suite(new TestFileSystemDirectory("z"));
var m = s.GetModule("m");
var p = m.GetProject("p");
var prod = s.GetProduct("prod");
prod.AddModule(m);
var sc = new DefaultSuiteContentsAnalyzer(s);
var g = new ReadableSlnNameGenerator(fallback.Object, sc);
var name = g.GetName(new[] { p });
name.Should().Be("prod");
}
示例3: SetUp
public void SetUp()
{
suite = new Suite(new TestFileSystemDirectory("root"));
suiteNoExe = new Suite(new TestFileSystemDirectory("root"));
suite.GetModule("TestModule").GetProject("TestLib").Type = ProjectType.Library;
suiteNoExe.GetModule("TestModule").GetProject("TestLib").Type = ProjectType.Library;
suite.GetModule("TestModule").GetProject("TestExe").Type = ProjectType.Executable;
product = suite.GetProduct("TestProduct");
product.AddModule(suite.GetModule("TestModule"));
targetParser = new Mock<ICommandTargetParser>();
buildTargetSource = new Mock<IHasBuildTarget>();
data = new AddonSupportSolutionItemData(targetParser.Object, buildTargetSource.Object, new Goal("test"));
}
示例4: PublishProduct
private void PublishProduct(Suite suite, string productName)
{
if (suite.HasProduct(productName))
{
var product = suite.GetProduct(productName);
if (product.Packager != null)
{
var packager = productPackagerFactory.CreateProductPackager(product.Packager.PackagerType);
packager.Publish(product);
}
else
{
throw new InvalidCommandParameterException("publish", "The product has no packager definition!");
}
}
else
{
throw new InvalidCommandParameterException("publish", String.Format("Product {0} is not defined!", productName));
}
}