Exemple #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);
            }
        }
Exemple #2
0
        void Evaluate(ProjectInfo project, MSBuildEvaluationContext context, MSBuildImportGroup imports, bool evalItems)
        {
            if (!string.IsNullOrEmpty(imports.Condition) && !SafeParseAndEvaluate(project, context, imports.Condition, true))
            {
                return;
            }

            foreach (var item in imports.Imports)
            {
                Evaluate(project, context, item, evalItems);
            }
        }
		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 ();
		}
Exemple #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);
        }
		void Evaluate (ProjectInfo project, MSBuildEvaluationContext context, MSBuildImportGroup imports, bool evalItems)
		{
			if (!string.IsNullOrEmpty (imports.Condition) && !SafeParseAndEvaluate (project, context, imports.Condition, true))
				return;

			foreach (var item in imports.Imports)
				Evaluate (project, context, item, evalItems);
		}