Example #1
0
 protected override string GetLogicalPath(Project project, SuiteRelativePath file, SourceSetType sourceSetType)
 {
     var path = base.GetLogicalPath(project, file, sourceSetType);
     if (path.StartsWith("wpf" + Path.DirectorySeparatorChar))
         return path.Substring(4).Replace(Path.DirectorySeparatorChar, '/');
     else
         return PrefixWithRootNamespace(project, PrefixNumericComponents(path)).Replace(Path.DirectorySeparatorChar, '.');
 }
Example #2
0
        public SourceSetIgnoreList Get(SourceSetType type)
        {
            SourceSetIgnoreList ignoreList;
            if (!ignoreLists.TryGetValue(type, out ignoreList))
            {
                ignoreList = new SourceSetIgnoreList();
                ignoreLists.Add(type, ignoreList);
            }

            return ignoreList;
        }
Example #3
0
 /// <summary>
 /// Converts a suite relative path to project relative
 /// </summary>
 /// <param name="project">Project to be relative to</param>
 /// <param name="suiteRelativePath">Suite relative path</param>
 /// <param name="sourceSetName">Source set name where the project being built stores its files</param>
 /// <returns>Returns the path relative to the project's root directory</returns>
 protected string ToProjectRelativePath(Project project, string suiteRelativePath, SourceSetType sourceSetName)
 {
     return suite.SuiteRoot.GetRelativePathFrom(project.RootDirectory.GetChildDirectory(sourceSetName.AsString), suiteRelativePath);
 }
Example #4
0
        /// <summary>
        /// Creates an empty source set
        /// </summary>
        /// <param name="type">Type of sources in this set</param>
        public SourceSet(SourceSetType type)
        {
            Contract.Requires(type != null);

            this.type = type;
        }
Example #5
0
 protected virtual string GetLogicalPath(Project project, SuiteRelativePath file, SourceSetType sourceSetType)
 {
     return(ToProjectRelativePath(project, file, sourceSetType));
 }
Example #6
0
        protected virtual void WriteItem(XmlWriter writer, Project project, SuiteRelativePath file, string relativePath, SourceSetType sourceSetType, string logicalPath)
        {
            writer.WriteStartElement(GetElementNameFor(project, file));
            writer.WriteAttributeString("Include", relativePath);

            if (ProjectSourceSetName != sourceSetType)
            {
                writer.WriteElementString("LogicalName", logicalPath);
            }

            WriteAdditionalOptions(writer, project, file);

            writer.WriteEndElement();
        }
Example #7
0
        protected override string GetLogicalPath(Project project, SuiteRelativePath file, SourceSetType sourceSetType)
        {
            var path = base.GetLogicalPath(project, file, sourceSetType);

            if (path.StartsWith("wpf" + Path.DirectorySeparatorChar))
            {
                return(path.Substring(4).Replace(Path.DirectorySeparatorChar, '/'));
            }
            else
            {
                return(PrefixWithRootNamespace(project, PrefixNumericComponents(path)).Replace(Path.DirectorySeparatorChar, '.'));
            }
        }
Example #8
0
        protected override void WriteItem(XmlWriter writer, Project project, SuiteRelativePath file, string relativePath, SourceSetType sourceSetType, string logicalPath)
        {
            var resrelativePath = ToProjectRelativePath(project, file, "resources");

            if (!resrelativePath.StartsWith("win32" + Path.DirectorySeparatorChar))
            {
                base.WriteItem(writer, project, file, relativePath, sourceSetType, logicalPath);
            }
        }
Example #9
0
 protected virtual string GetLogicalPath(Project project, SuiteRelativePath file, SourceSetType sourceSetType)
 {
     return ToProjectRelativePath(project, file, sourceSetType);
 }
Example #10
0
 /// <summary>
 /// Converts a suite relative path to project relative
 /// </summary>
 /// <param name="project">Project to be relative to</param>
 /// <param name="suiteRelativePath">Suite relative path</param>
 /// <param name="sourceSetName">Source set name where the project being built stores its files</param>
 /// <returns>Returns the path relative to the project's root directory</returns>
 protected string ToProjectRelativePath(Project project, string suiteRelativePath, SourceSetType sourceSetName)
 {
     return(suite.SuiteRoot.GetRelativePathFrom(project.RootDirectory.GetChildDirectory(sourceSetName.AsString), suiteRelativePath));
 }