if (read_only)
return;
- if (propertiesByName.ContainsKey (propertyName))
- propertiesByName.Remove (propertyName);
-
- BuildProperty bp;
if (treatPropertyValueAsLiteral)
- bp = new BuildProperty (propertyName, Utilities.Escape (propertyValue));
- else
- bp = new BuildProperty (propertyName, propertyValue);
-
- if (Char.IsDigit (propertyName [0]))
- throw new ArgumentException (String.Format ("The name \"{0}\" contains an invalid character \"{1}\".", propertyName, propertyName [0]));
+ propertyValue = Utilities.Escape (propertyValue);
+
+ if (FromXml) {
+ int idx = properties.FindIndex (delegate (BuildProperty p) {
+ return p.Name == propertyName;
+ });
- AddProperty (bp);
+ if (idx == -1)
+ AddNewProperty (propertyName, propertyValue, false);
+ else
+ properties [idx].Value = propertyValue;
+ } else {
+ if (propertiesByName.ContainsKey (propertyName))
+ propertiesByName.Remove (propertyName);
+
+ BuildProperty bp = new BuildProperty (propertyName, propertyValue);
+ if (Char.IsDigit (propertyName [0]))
+ throw new ArgumentException (String.Format (
+ "The name \"{0}\" contains an invalid character \"{1}\".", propertyName, propertyName [0]));
- if (IsGlobal)
- parentProject.NeedToReevaluate ();
+ AddProperty (bp);
+
+ if (IsGlobal)
+ parentProject.NeedToReevaluate ();
+ }
}
internal void Evaluate ()
+2007-01-26 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * BuildPropertyGroup.cs (SetProperty): Made it work with persisted
+ properties.
+
2007-01-23 Marek Sieradzki <marek.sieradzki@gmail.com>
* BuildTask.cs, ConditionFactorExpression.cs, Target.cs,