projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Project.cs (.ctor): Init timeOfLastDirty.
[mono.git]
/
mcs
/
class
/
Microsoft.Build.Engine
/
Microsoft.Build.BuildEngine
/
BuildWhen.cs
diff --git
a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildWhen.cs
b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildWhen.cs
index 60dfaa238f1825570c4c4b24159583c629de9887..9523b766603d5a0ab2f5f9b943994f1344bd5440 100644
(file)
--- a/
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildWhen.cs
+++ b/
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildWhen.cs
@@
-33,27
+33,21
@@
using System.Xml;
namespace Microsoft.Build.BuildEngine {
internal class BuildWhen {
namespace Microsoft.Build.BuildEngine {
internal class BuildWhen {
- XmlAttribute condition;
- //Project parentProject;
+ Project parentProject;
GroupingCollection groupingCollection;
XmlElement whenElement;
GroupingCollection groupingCollection;
XmlElement whenElement;
- public BuildWhen (Project parentProject)
+ public BuildWhen (
XmlElement whenElement,
Project parentProject)
{
{
- // this.parentProject = parentProject;
- this.groupingCollection = new GroupingCollection ();
- }
- public void BindToXml (XmlElement whenElement)
- {
+ this.parentProject = parentProject;
+ this.groupingCollection = new GroupingCollection (null);
if (whenElement == null)
throw new ArgumentNullException ("whenElement");
this.whenElement = whenElement;
if (whenElement == null)
throw new ArgumentNullException ("whenElement");
this.whenElement = whenElement;
- if (whenElement.GetAttribute ("Condition") != String.Empty)
- condition = whenElement.GetAttributeNode ("Condition");
foreach (XmlElement xe in whenElement.ChildNodes) {
if (xe.Name == "ItemGroup") {
foreach (XmlElement xe in whenElement.ChildNodes) {
if (xe.Name == "ItemGroup") {
- BuildItemGroup big = new BuildItemGroup ();
+ BuildItemGroup big = new BuildItemGroup (
xe, parentProject, null, true
);
//big.BindToXml (xe);
groupingCollection.Add (big);
// FIXME: add nested chooses
//big.BindToXml (xe);
groupingCollection.Add (big);
// FIXME: add nested chooses
@@
-64,11
+58,17
@@
namespace Microsoft.Build.BuildEngine {
} else
throw new InvalidProjectFileException ("Invalid element in When.");
}
} else
throw new InvalidProjectFileException ("Invalid element in When.");
}
+
+ }
+
+ public void Evaluate()
+ {
+ groupingCollection.Evaluate ();
}
public string Condition {
}
public string Condition {
- get { return
condition.Value
; }
- set {
condition.Value = value
; }
+ get { return
whenElement.GetAttribute ("Condition")
; }
+ set {
whenElement.SetAttribute ("Condition", value)
; }
}
public GroupingCollection GroupingCollection {
}
public GroupingCollection GroupingCollection {
@@
-78,4
+78,4
@@
namespace Microsoft.Build.BuildEngine {
}
}
}
}
-#endif
\ No newline at end of file
+#endif