Ejemplo n.º 1
0
        private static void ProcessDependencies(GraphBuildContext context, Target target, XElement targetElement)
        {
            var dependencies = SafeAttribute(targetElement, "depends");
            if (string.IsNullOrWhiteSpace(dependencies)) return;

            foreach (var dependency in dependencies.Split(',').Select(d => d.Trim()))
            {
                context.PushScript();
                var targetDependency = context.FindTarget(dependency) ??
                                       ResolveTarget(context, ResolveTargetElement(context, targetElement.Document, dependency));

                context.PopScript();
                target.AddDependency(targetDependency);
            }
        }
Ejemplo n.º 2
0
        private static Target ResolveTarget(GraphBuildContext context, XElement targetElement)
        {
            var targetName = SafeAttribute(targetElement, "name");

            var found = context.FindTarget(targetName);
            return	found ??
                    AddNewTarget(context, targetElement);
        }