本文整理汇总了C#中Project.HasNonEmptySourceSet方法的典型用法代码示例。如果您正苦于以下问题:C# Project.HasNonEmptySourceSet方法的具体用法?C# Project.HasNonEmptySourceSet怎么用?C# Project.HasNonEmptySourceSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Project
的用法示例。
在下文中一共展示了Project.HasNonEmptySourceSet方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HasNonEmptySourceSetMethodWorks
public void HasNonEmptySourceSetMethodWorks()
{
var project = new Project("test", new Module("testmod", new Suite(new TestFileSystemDirectory("module"))));
var set1 = project.GetSourceSet("cs");
project.HasNonEmptySourceSet("cs").Should().BeFalse();
project.HasNonEmptySourceSet("vb").Should().BeFalse();
set1.Add(new SuiteRelativePath("testfile"));
project.HasNonEmptySourceSet("cs").Should().BeTrue();
project.HasNonEmptySourceSet("vb").Should().BeFalse();
}
示例2: HasNonEmptySourceSetDoesNotCreateSet
public void HasNonEmptySourceSetDoesNotCreateSet()
{
var project = new Project("test", new Module("testmod", new Suite(new TestFileSystemDirectory("module"))));
project.HasNonEmptySourceSet("cs");
project.SourceSets.Should().BeEmpty();
}
示例3: GetDefaultPlatform
public string GetDefaultPlatform(Project project)
{
var suite = project.Module.Suite;
if (project.HasNonEmptySourceSet("cpp"))
return suite.ActiveGoal.Has("x64") ? "x64" : "Win32";
else
return baseImpl.GetDefaultPlatform(project);
}
示例4: SupportsProject
/// <summary>
/// Checks if the given project is supported by this implementation
/// </summary>
/// <param name="project">Project to check</param>
/// <returns>Returns <c>true</c> if the project is supported</returns>
public virtual bool SupportsProject(Project project)
{
return project.HasNonEmptySourceSet(SourceSetName);
}
示例5: WriteAppConfig
private void WriteAppConfig(XmlWriter writer, Project project)
{
// Must be called within an open PropertyGroup
if (project.HasNonEmptySourceSet("appconfig"))
{
var sourceSet = project.GetSourceSet("appconfig");
var configs = sourceSet.Files.ToList();
if (configs.Count > 1)
throw new TooManyAppConfigsException(project);
var appConfigPath = configs.FirstOrDefault();
if (appConfigPath != null)
{
writer.WriteElementString("AppConfig", ToProjectRelativePath(project, appConfigPath, "cs"));
}
}
}
示例6: WriteManifest
private void WriteManifest(XmlWriter writer, Project project)
{
// Must be called within an open PropertyGroup
if (project.HasNonEmptySourceSet("manifest"))
{
var sourceSet = project.GetSourceSet("manifest");
var manifests = sourceSet.Files.ToList();
if (manifests.Count > 1)
throw new TooManyManifestsException(project);
var manifestPath = manifests.FirstOrDefault();
if (manifestPath != null)
{
writer.WriteElementString("ApplicationManifest", ToProjectRelativePath(project, manifestPath, "cs"));
}
}
}
示例7: FillProjectSpecificMissingInfo
public void FillProjectSpecificMissingInfo(Project project)
{
if (RootNamespace == null)
RootNamespace = project.Name;
if (project.HasNonEmptySourceSet("resources"))
{
var resources = project.GetSourceSet("resources");
var icons = resources.Files.Where(p => Path.GetExtension(p) == ".ico").ToList();
if (icons.Count == 1 && ApplicationIcon == null)
{
ApplicationIcon = project.Module.Suite.SuiteRoot.GetRelativePathFrom(project.RootDirectory.GetChildDirectory("resources"), icons[0]);
}
}
}