示例#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, MSBuildChoose choose, bool evalItems)
 {
     foreach (var op in choose.GetOptions())
     {
         if (op.IsOtherwise || SafeParseAndEvaluate(project, context, op.Condition, true))
         {
             EvaluateObjects(project, context, op.GetAllObjects(), evalItems);
             break;
         }
     }
 }
		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 "Choose": ob = new MSBuildChoose (); break;
				default: ob = new MSBuildXmlElement (); break;
			}
			if (ob != null) {
				ob.ParentNode = this;
				ob.Read (reader);
				ChildNodes = ChildNodes.Add (ob);
			} else
				reader.Read ();
		}
示例#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 "Choose": ob = new MSBuildChoose(); break;

            default: ob = new MSBuildXmlElement(); break;
            }
            ob.ParentNode = this;
            ob.Read(reader);
            ChildNodes = ChildNodes.Add(ob);
        }
示例#5
0
		void Evaluate (ProjectInfo project, MSBuildEvaluationContext context, MSBuildChoose choose, bool evalItems)
		{
			foreach (var op in choose.GetOptions ()) {
				if (op.IsOtherwise || SafeParseAndEvaluate (project, context, op.Condition, true)) {
					EvaluateObjects (project, context, op.GetAllObjects (), evalItems);
					break;
				}
			}
		}