Ensure that properties are fully expanded.
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / ConditionAndExpression.cs
index e6006a3e180b55d13a5caf1227a9e16c7087a033..326e055bb43cc0bf5cdfaa0d27343ab90e70e944 100644 (file)
@@ -31,7 +31,7 @@ using System;
 using System.Xml;
 
 namespace Microsoft.Build.BuildEngine {
-       internal class ConditionAndExpression : ConditionExpression {
+       internal sealed class ConditionAndExpression : ConditionExpression {
        
                readonly ConditionExpression left;
                readonly ConditionExpression right;
@@ -50,15 +50,40 @@ namespace Microsoft.Build.BuildEngine {
                        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;
+               }
        }
 }