X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FMicrosoft.Build.Engine%2FMicrosoft.Build.BuildEngine%2FConditionAndExpression.cs;h=326e055bb43cc0bf5cdfaa0d27343ab90e70e944;hb=b75ff503063b30246eb81770e082f3f54799d52a;hp=e6006a3e180b55d13a5caf1227a9e16c7087a033;hpb=36d056ef18ad7c4b97a4bf5a93d79a3a1233d853;p=mono.git diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionAndExpression.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionAndExpression.cs index e6006a3e180..326e055bb43 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionAndExpression.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionAndExpression.cs @@ -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; + } } }