using System.Xml;
namespace Microsoft.Build.BuildEngine {
- internal class ConditionAndExpression : ConditionExpression {
+ internal sealed class ConditionAndExpression : ConditionExpression {
readonly ConditionExpression left;
readonly ConditionExpression right;
get { return right; }
}
- public override bool Evaluate (Project context)
+ public override bool BoolEvaluate (Project context)
{
- if (!left.Evaluate (context))
+ if (!left.BoolEvaluate (context))
return false;
- if (!right.Evaluate (context))
+ if (!right.BoolEvaluate (context))
return false;
return true;
}
+
+ public override float NumberEvaluate (Project context)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public override string StringEvaluate (Project context)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public override bool CanEvaluateToBool (Project context)
+ {
+ return left.CanEvaluateToBool (context) && right.CanEvaluateToBool (context);
+ }
+
+ public override bool CanEvaluateToNumber (Project context)
+ {
+ return false;
+ }
+
+ public override bool CanEvaluateToString (Project context)
+ {
+ return false;
+ }
}
}