Share via


IVsBooleanSymbolExpressionEvaluator.EvaluateExpression(String, String) Method

Definition

Tests whether a set of symbols causes the expression to evaluate to true.

public:
 bool EvaluateExpression(System::String ^ wszExpression, System::String ^ wszSymbols);
public:
 bool EvaluateExpression(Platform::String ^ wszExpression, Platform::String ^ wszSymbols);
bool EvaluateExpression(std::wstring const & wszExpression, std::wstring const & wszSymbols);
public bool EvaluateExpression (string wszExpression, string wszSymbols);
abstract member EvaluateExpression : string * string -> bool
Public Function EvaluateExpression (wszExpression As String, wszSymbols As String) As Boolean

Parameters

wszExpression
String

[in, unique] The expression to evaluate, for example, P1 & P2 & (!P3 | P4). Null and empty are allowed and results in a true return value.

wszSymbols
String

[in, unique] Space-delimited list of symbols that evaluate to true, using the same format as VSHPROPID_ProjectCapabilities. Null and empty are allowed and results in an empty set of project capabilities during evaluation.

Returns

The result of the evaluation. true if the evaluation succeeded.

Remarks

Valid expression syntax is defined as:

  • The capability expression, such as "(VisualC | CSharp) + (MSTest | NUnit)".

  • The "|" is the OR operator.

  • The "&" and "+" characters are both AND operators.

  • The "!" character is the NOT operator.

  • Parentheses force evaluation precedence order.

  • A null or empty expression is evaluated as a match.

  • Project capabilities may be any character except these reserved characters: "'`:;,+-*/\!~|&%$@^()={}[]<>? \t\b\n\r

Applies to