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


C# Project.HasNonEmptySourceSet方法代码示例

本文整理汇总了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();
        }
开发者ID:vigoo,项目名称:bari,代码行数:13,代码来源:ProjectTest.cs

示例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();
        }
开发者ID:vigoo,项目名称:bari,代码行数:7,代码来源:ProjectTest.cs

示例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);
 }
开发者ID:zvrana,项目名称:bari,代码行数:8,代码来源:CppProjectPlatformManagement.cs

示例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);
 }
开发者ID:vigoo,项目名称:bari,代码行数:9,代码来源:SlnProjectBase.cs

示例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"));
                }
            }
        }
开发者ID:vigoo,项目名称:bari,代码行数:19,代码来源:PropertiesSection.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"));
                }
            }
        }
开发者ID:vigoo,项目名称:bari,代码行数:19,代码来源:PropertiesSection.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]);
                }
            }
        }
开发者ID:zvrana,项目名称:bari,代码行数:16,代码来源:CsharpProjectParameters.cs


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