Exemplo n.º 1
0
        public Target AddTarget(string name, string dependencies, string parentProjectFilename)
        {
            string actualName = name;
            string relativeFilename = GetExpandedRelativeFilename(parentProjectFilename);
            string namespacedName = BuildNamespacedName(name, relativeFilename);

            while (Targets.ContainsKey(namespacedName))
            {
                namespacedName += "X";
            }

            Target target = new Target(actualName, dependencies, relativeFilename);
            Targets.Add(namespacedName, target);

            return target;
        }
Exemplo n.º 2
0
        private void ResolveDependencies(Target target, int level)
        {
            if (!target.AreDependenciesResolved())
            {
                List<Target> targets = new List<Target>();

                ParseDependencyList(level, target.DependencyList, target.ProjectFilename, targets);
                foreach (RemoteDependencyList item in target.RemoteDependencyLists)
                {
                    ParseDependencyList(level, item.DependencyList, item.ProjectFile, targets);
                }

                target.SetDependencies(targets);
            }
        }
Exemplo n.º 3
0
 private void WriteToFileAtLevel(StreamWriter writer, Target target, int level)
 {
     writer.WriteLine("{0}{1}:{2}", "".PadLeft(level, '\t'), target.ProjectFilename, target.Name);
     foreach (Target child in target.Dependencies)
     {
         WriteToFileAtLevel(writer, child, level + 1);
     }
 }
Exemplo n.º 4
0
 private string BuildNamespacedName(Target target)
 {
     return BuildNamespacedName(target.Name, target.ProjectFilename);
 }