Esempio n. 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, '.');
 }
Esempio n. 2
0
        public SourceSetIgnoreList Get(SourceSetType type)
        {
            SourceSetIgnoreList ignoreList;
            if (!ignoreLists.TryGetValue(type, out ignoreList))
            {
                ignoreList = new SourceSetIgnoreList();
                ignoreLists.Add(type, ignoreList);
            }

            return ignoreList;
        }
Esempio n. 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);
 }
Esempio n. 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;
        }
Esempio n. 5
0
 protected virtual string GetLogicalPath(Project project, SuiteRelativePath file, SourceSetType sourceSetType)
 {
     return(ToProjectRelativePath(project, file, sourceSetType));
 }
Esempio n. 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();
        }
Esempio n. 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, '.'));
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 9
0
 protected virtual string GetLogicalPath(Project project, SuiteRelativePath file, SourceSetType sourceSetType)
 {
     return ToProjectRelativePath(project, file, sourceSetType);
 }
Esempio n. 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));
 }