예제 #1
0
        internal override void ReadChildElement(MSBuildXmlReader reader)
        {
            MSBuildObject ob = null;

            switch (reader.LocalName)
            {
            case "ItemGroup": ob = new MSBuildItemGroup(); break;

            case "PropertyGroup": ob = new MSBuildPropertyGroup(); break;

            case "ImportGroup": ob = new MSBuildImportGroup(); break;

            case "Import": ob = new MSBuildImport(); break;

            case "Target": ob = new MSBuildTarget(); break;

            case "Choose": ob = new MSBuildChoose(); break;

            case "ProjectExtensions": ob = new MSBuildProjectExtensions(); break;

            default: ob = new MSBuildXmlElement(); break;
            }
            if (ob != null)
            {
                ob.ParentNode = this;
                ob.Read(reader);
                ChildNodes = ChildNodes.Add(ob);
            }
            else
            {
                base.ReadChildElement(reader);
            }
        }
예제 #2
0
 void Evaluate(ProjectInfo project, MSBuildEvaluationContext context, MSBuildTarget target)
 {
     if (SafeParseAndEvaluate(project, context, target.Condition))
     {
         var newTarget = new MSBuildTarget(target.Name, target.Tasks);
         newTarget.AfterTargets         = context.EvaluateString(target.AfterTargets);
         newTarget.Inputs               = context.EvaluateString(target.Inputs);
         newTarget.Outputs              = context.EvaluateString(target.Outputs);
         newTarget.BeforeTargets        = context.EvaluateString(target.BeforeTargets);
         newTarget.DependsOnTargets     = context.EvaluateString(target.DependsOnTargets);
         newTarget.Returns              = context.EvaluateString(target.Returns);
         newTarget.KeepDuplicateOutputs = context.EvaluateString(target.KeepDuplicateOutputs);
         project.Targets.Add(newTarget);
     }
 }
		static MSBuildTask FindErrorTaskForImport (MSBuildTarget target, string import)
		{
			string condition = String.Format ("!Exists('{0}')", import);
			return target.Tasks
				.FirstOrDefault (task => IsMatchIgnoringCase (task.Condition, condition));
		}
예제 #4
0
		internal override void ReadChildElement (MSBuildXmlReader reader)
		{
			MSBuildObject ob = null;
			switch (reader.LocalName) {
				case "ItemGroup": ob = new MSBuildItemGroup (); break;
				case "PropertyGroup": ob = new MSBuildPropertyGroup (); break;
				case "ImportGroup": ob = new MSBuildImportGroup (); break;
				case "Import": ob = new MSBuildImport (); break;
				case "Target": ob = new MSBuildTarget (); break;
				case "Choose": ob = new MSBuildChoose (); break;
				case "ProjectExtensions": ob = new MSBuildProjectExtensions (); break;
				default: ob = new MSBuildXmlElement (); break;
			}
			if (ob != null) {
				ob.ParentNode = this;
				ob.Read (reader);
				ChildNodes = ChildNodes.Add (ob);
			} else
				base.ReadChildElement (reader);
		}
예제 #5
0
		void Evaluate (ProjectInfo project, MSBuildEvaluationContext context, MSBuildTarget target)
		{
			bool condIsTrue = SafeParseAndEvaluate (project, context, target.Condition);
			var newTarget = new MSBuildTarget (target.Name, target.Tasks);
			newTarget.AfterTargets = context.EvaluateString (target.AfterTargets);
			newTarget.Inputs = context.EvaluateString (target.Inputs);
			newTarget.Outputs = context.EvaluateString (target.Outputs);
			newTarget.BeforeTargets = context.EvaluateString (target.BeforeTargets);
			newTarget.DependsOnTargets = context.EvaluateString (target.DependsOnTargets);
			newTarget.Returns = context.EvaluateString (target.Returns);
			newTarget.KeepDuplicateOutputs = context.EvaluateString (target.KeepDuplicateOutputs);
			project.TargetsIgnoringCondition.Add (newTarget);
			if (condIsTrue)
				project.Targets.Add (newTarget);
		}
 void Evaluate(ProjectInfo project, MSBuildEvaluationContext context, MSBuildTarget target)
 {
     // TODO NPM
     project.Targets.Add(target);
 }
		void Evaluate (ProjectInfo project, MSBuildEvaluationContext context, MSBuildTarget target)
		{
			// TODO NPM
			project.Targets.Add (target);
		}