コード例 #1
0
 public void RemoveTask(MSBuildTask task)
 {
     AssertCanModify();
     if (task.ParentObject != this)
     {
         throw new InvalidOperationException("Task doesn't belong to the target");
     }
     task.RemoveIndent();
     ChildNodes = ChildNodes.Remove(task);
 }
コード例 #2
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;
            }
            if (ob != null)
            {
                ob.ParentNode = this;
                ob.Read(reader);
                ChildNodes = ChildNodes.Add(ob);
                return;
            }

            var task = new MSBuildTask();

            task.ParentNode = this;
            task.Read(reader);
            ChildNodes = ChildNodes.Add(task);
        }
コード例 #3
0
		public void RemoveTask (MSBuildTask task)
		{
			AssertCanModify ();
			if (task.ParentObject != this)
				throw new InvalidOperationException ("Task doesn't belong to the target");
			task.RemoveIndent ();
			ChildNodes = ChildNodes.Remove (task);
		}
コード例 #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;
			}
			if (ob != null) {
				ob.ParentNode = this;
				ob.Read (reader);
				ChildNodes = ChildNodes.Add (ob);
				return;
			}

			var task = new MSBuildTask ();
			task.ParentNode = this;
			task.Read (reader);
			ChildNodes = ChildNodes.Add (task);
		}